revolution

Historiographing the Era of the American Revolution: Changing political concepts, the most influential figures and networks of correspondence.

https://github.com/h-gear/revolution

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

georeferencing historical-correspondence-analysis natural-language-processing semi-supervised-topic-analysis shifting-concepts-in-time temporal-social-network-analysis word-vectors
Last synced: 10 months ago · JSON representation

Repository

Historiographing the Era of the American Revolution: Changing political concepts, the most influential figures and networks of correspondence.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 3
Topics
georeferencing historical-correspondence-analysis natural-language-processing semi-supervised-topic-analysis shifting-concepts-in-time temporal-social-network-analysis word-vectors
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

Historiographing the Era of the American Revolution

Contributors Forks Stargazers Issues Apache License LinkedIn


Logo



Table of Contents
  1. About The Project
  2. Getting Started
  3. Data
  4. Usage
  5. Contributing
  6. License
  7. Sources
  8. Contact
  9. Authors
  10. Acknowledgments

About the Project

The historical concept of democracy, liberry and freedom and its development through time is important to our understanding of the past. The goal of the HGEAR project is to chart shifts in the character and structure of political discourse during the era of the American Revolution. By comparing shifts in language usage (via ShiCo (Shifting Concepts Through Time) with changing formations in correspondence networks, we are able to measure how networks of communication within the Founders Online corpus and other resources such as the Letters of Delegates to Congress shaped the character, distribution, and spread of political ideas during the Revolutionary era. This project and associated analyses offer powerful new methods for addressing longstanding debates in the field of early American history. Also, by means of additional collected data, we show how the here included scripts and analyses can be easily accomodated to include other letter correspondence sources as well. Ultimately, this allows researchers to get a more complete picture of the fluxes in the political discourse during the American Revolution.

The project is organized as follows:

Documentation

Here's the link to learn more about the project's background.

Repository Structure

 LICENSE
 README.md           <- The top-level README for developers and users using this project.
 data
  external        <- Data from third party sources.
  interim         <- Intermediate data that has been transformed.
  processed       <- The final, canonical data sets for modeling.
  raw             <- The original, immutable data dump.

 w2v_models          <- word2vec models to be used with shico software.
  delegates       <- Delegates of Congress.
  ecco            <- Eighteenth Century Collections Online.
  evans           <- Evans Early American Imprints.
  founders        <- Founders Online.

 documentation       <- Data dictionaries, manuals, and all other explanatory materials.

 output              <- Generated analysis as HTML, PDF, LaTeX, etc.
  figures         <- Generated graphics and figures to be used in reporting.
  logs            <- Place for logs.
  tables          <- Location for documents describing results of data exploration, including tables.

 requirements.txt   <- The requirements file for reproducing the analysis environment

 scripts            <- Source code for use in this project.
  1. data_collection           <- Including scraping data.
  2. data_preparation          <- Data cleaning/preprocessing to enhance the data quality by organizing raw data in a suitable format.
  3. exploratory_data_analysis <- Getting a first and deeper understanding of the data.
  4. analysis_and_modeling     <- Data analysis and modeling.
  5. deployment                <- Geographical analysis.
  functions                    <- Applied accross the project and sourced in the code.

 notebooks               <- Example of analysis)

Getting Started

Prerequisites

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

To install hgear from this GitHub repository, go to a directory where you want to install your files. From there, go to a command prompt in Windows (e.g., powershell), for example by right-clicking the mouse and select 'Open in terminal'. Next, paste the following after the prompt:

console git clone git@github.com:h-gear/revolution.git This will download all the files from github

Installation

Next, we give a step by step instructions that tell you how to get you up and running. The code is written mostly in R and parts in Python. For R , RStudio is recommended, while for Python, we recommend anaconda.

Setting up the Virtual Environment for R

To ensure a consistent and reproducible environment, this project uses the venv package in R. The following will install the renv package, create and activate the virtual environment, and install the required R packages as specified in renv.lock.

1 Navigate to the project directory: cd revolution

2 Install renv (if not already installed):

Open R or RStudio and install renv:

install.packages("renv")

3 Initialize or load renv:

In the RStudio console, navigate to the project directory () and activate renv:

renv::activate()

4 Restore the environment:

Restore the project environment using the renv.lock file:

renv::restore() This will:

  • Automatically download and install all required packages as specified in the renv.lock file.
  • Use the appropriate versions for compatibility.

5 Verify setup:

After restoration, check for any missing packages using:

renv::status() Test whether the installtion is succesful by loading some key packages to ensure the environment works as expected: library(dplyr) # Replace with any other package name you just installed

6 Run the project:

Once renv is fully set up, you are ready to run the code within the virtual environment. Execute your R scripts or run your Rmarkdown documents as usual.

7 Deactivate the Virtual Environment:

When you are done, deactivate the virtual environment: venv::deactivate()

Python: Setting up a Virtual Environment

We recommend installing hgear in a new virtual environment to avoid dependency conflicts.

Run the following commands to create a virtual environment: For Windows: python -m venv ./.venv

For Unix or MacOS: python3 -m venv ./.venv

Activate the Virtual Environment: For Windows: .venv\Scripts\activate.bat

For Unix or MacOS: source .venv/bin/activate

Install Dependencies: Once the virtual environment is created and activated you can install the dependencies by running: pip install -r requirements.txt At this stage, you should be able to run the scripts.

Deactivate the Virtual Environment: When you are done, deactivate the virtual environment:

deactivate

Data

If you are interested in learning more about the data used in the project, then go here.

Usage

The code for the analyses can be found in the subfolder scripts. It is structured in parallel to the structure explained above:

In adition, the code and procedures to create the word2vec models needed as input for running shico can be found in the subfolder w2v_models/delegates. The code is applied to the data from the delegates of congress, but can be easily adapted and eqaully applied to create word2vec models for all other datasets in this project as well.

Contributing

If you want to contribute to the development of hgear, have a look at the contribution guidelines.Please submit pull requests to us in case you want to participate. Suggestions, improvements, and edits are most welcome!

License

This project is licensed under the Apache License 2.0 - see the licence file for details. This means that this project can be used, modified and redistributed for free, even for commercial purposes.

Other sources

Founders Online

  • Jay Timm: https://github.com/jaytimm/founders-online-corpus
  • People of the founding era: https://pfe.upress.virginia.edu/
  • Thomas Hoekstra: https://github.com/Rohrym/lettersoftherevolutionproject

Shifting Concepts in Time (Shico)

  • Shico: https://github.com/NLeSC/ShiCo
  • Shico deployment: https://github.com/c-martinez/ShiCo-deploy
  • Shico updated for Python 3: https://github.com/h-gear/ShiCo/

Contact

If you find any bugs or experience difficulties when using the code in this project, please create a issue on this Github page. If you have any specific questions with respect to our research, or methodology used, please email Thijs Vroegh t.vroegh@esciencecenter.nl

Authors

Impact and citation

This code has been used in the upcoming research article:

  • Vroegh, T., Tjong Kim Sang, E.,Olthof, J., & Thompson, M.L. (in progress). Drivers and dynamics of liberal and republican thought: Social Networks in the American Revolution.

Please cite if you use it. You can do this easily with one of these options:

  • The cite this repository menu in the right tab.
  • The citation file.
  • If you prefer to copypaste, here you have the APA and BibTex strings:

Vroegh, T. h-gear [Computer software]. https://github.com/h-gear/revolution


@software{Vroegh_hgear,author = {Vroegh, Thijs},license = {Apache 2.0},title = {{h-gear}},url = {https://github.com/h-gear/revolution}}

Acknowledgments

This code is being developed by the Netherlands eScience Center in collaboration with the faculty of American Studies at the University of Groningen. Our thanks go out to the authors that shared or open-sourced their code, enabling us to create this project that can hopefully be of service to many. Particularly, we like to thank the following people: * Cristian Marocico * Thomas Hoekstra * Ramona Roller



Back to top

Owner

  • Name: h-gear
  • Login: h-gear
  • Kind: organization

GitHub Events

Total
  • Watch event: 1
  • Push event: 6
Last Year
  • Watch event: 1
  • Push event: 6

Dependencies

requirements.txt pypi
  • igraph ==0.10.4
  • matplotlib ==3.8.2
  • numpy ==1.25.0
  • pandas ==2.1.3
  • pathpy ==2.2.0
  • scipy ==1.10.1
  • tqdm ==4.65.0