Giter VIP home page Giter VIP logo

chronam_issue_counts's Introduction

Overview

The scripts available here will calculate the number of digitized newspaper issues available year by year, state by state in Chronicling America, the Library of Congress’ database of historic American newspapers.

Each script is named “state_issues_year_2019_[state_abbreviation]” and will create a .csv file of the number of digitized issues available in Chronicling America for each year of digitized content from state partners that is available.

Please visit https://chroniclingamerica.loc.gov/about/api/ for background information about the various views of data available from Chronicling America.

Output

state_issues_year_2019_DC.py or other files with state/territory abbreviations

The output from this script is one .csv file named "District of Columbia_total.csv". Each row in the .csv contains the state name, year, and number of issues available in Chronicling America.

state_issues_year_2019_NOSTATE

Use find and replace for "STATE_NAME" with the state or territory name you want the script run for. The output from this script is one .csv file named "STATE_NAME_total.csv". Each row in the .csv contains the state name, year, and number of issues available in Chronicling America.

Dependencies

To run this script, you'll need to have Python 3 installed. You will also need access to a command line interface such as Terminal on OS X, Anaconda on Windows, or other.

Instructions

Save the "state_issues_year_2019_[state_abbreviation]" file to a folder where you want the results file saved. Using the command line interface, navigate to the folder.

Run the script by typing: "python state_issues_year_2019_[state_abbreviation]"

Ex: python state_issues_year_2019_DC.py

There is no indication printed to the console that the script is running. When the script is complete, "done" will be printed to the console.

Customizations

The scripts can be changed to run for any state. The template file is state_issues_year_2019_NOSTATE.py. To change the states issues being counted, use find for "NO STATE" and replace for the state or territory name you would like the script run on. There is an issue count script for each state and territory available in Chronicling America as of May 2019. As additional content from new state partners is added to Chronicling America, the state_issues_year_2019_NOSTATE.py file can be updated to add the state information by using find "STATE_NAME" and replace with the state/territory you would like to add.

Implementation

We used this script to pull data from Chronicling America to create data visualizations available at http://www.loc.gov/ndnp/data-visualizations/.

Next Steps

Please provide any feedback you may have by filing an issue.

If you use this script, please let us know at LC Labs or [email protected].

For additional information about accessing the Library of Congress’ collections programmatically please visit LC for Robots.

Rights Statement

Script is free to use and reuse without restriction.

chronam_issue_counts's People

Contributors

cjehr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.