GithubHelp home page GithubHelp logo

theportus / wikidata-historic-state-populations Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 88 KB

SPARQL Query of Wikidata for US historical state population and Python processing to estimate unknown years

License: MIT License

Python 100.00%

wikidata-historic-state-populations's Introduction

wikidata-historic-state-populations

Estimated population for every US state between 1600-2018

Uses a Wikidata SPARQL query (based off an example of national populations from Wikidata) to grab known historic US state population data between 1600-2018. Then, uses a Python script to ROUGHLY estimate population for every year between known data points.

Intended to be used in combination with other kinds of historic data sets, such as crime data for obtaining some kind of historical per-capita measurement.


David J. Thomas, thePortus.com
Instructor of Ancient History and Digital Humanities,
Department of History,
University of South Florida


To Use (Easiest)

Either...

  1. Use the raw results of the WikiData query from 1_wikidata_query_results.csv, OR...
  2. Use the complete estimated population results for every state and year from 2_wikidata_processed_results.csv

To Run

  1. Copy the query from the data_files/1_query_wikidata.rq file
  2. Head to Wikidata Query, paste the query, run the query
  3. Save the file in this directory
  4. Run the python script in this directory python 2_process_data.py -i INPUT_PATH -o OUTPUT_PATH replacing INPUT_PATH with the name of your saved Wikidata results and OUTPUT_PATH with whatever you would like to save the file as
  5. Use the saved results with full yearly population for your data needs

wikidata-historic-state-populations's People

Contributors

theportus avatar

Stargazers

 avatar

Watchers

 avatar  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.