Giter Site home page Giter Site logo

cps-info-viz's Introduction

Current Population Survey (CPS) Info-Viz

Prerequisites

  • Poetry
python -m pip insall poetry --user

Install

poetry install

Setup CPS Token

  1. Request a U.S. Census Data API Key at: https://api.census.gov/data/key_signup.html

  2. Receive an email title with Census Data API Key Request, which includes the following content:

    Hello!
    
     Thank you for your interest in the Census Data API.
     Your API key is <your-api-key>. Please <a>click here to activate your key</a>.
    
     Save this email for future reference.
    
     Have Fun,
    
     The Census Bureau API Team
    
     Follow @uscensusbureau on twitter for API updates.
    

    Please click the link in the email to activate your key.

  3. After copying the API key from the email, setup your API key properly, please refer to this article for how to setup the API key: https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety

    The enviroment variable name should be CENSUS_API_KEY.

  4. Do not commit your API key in the git.

  5. Check your setup by:

    $ poetry run python examples/example.py
    df = df.apply(pd.to_numeric, errors="ignore")
            a_age  marsupwt
    0          56    687.71
    1          57    687.71
    2          78    646.86
    3          65   1516.95
    4          66   1516.95
    ...       ...       ...
    163538     69    514.11
    163539     70    516.25
    163540     66    516.25
    163541     55    386.37
    163542     52    386.37
    
    [163543 rows x 2 columns]
    326195439.67
    

Run

poetry run python

IPUMS Setup

  1. Download the asec.pkl.gz file and put under ipums/ directory

  2. Uncompress the pickle file

$ gzip -d asec.pkl.gz

Jupyter

poetry run jupyter

For IPUMS, check ipums_playground.ipynb.

cps-info-viz's People

Contributors

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