Skip to content

0-steve/census_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

census_api analysis

Goal #1 (1_build)

Call census api for social characteristics data for all recognized states (minus PR). Clean the data to create a human readable dataframe. The script census_tract_api can be run from terminal with the following parameters:

year = year of desired census api (integer)
profile = data profile type desired from census api (string)
  -default is "DP02"

output = csv file of the state's cleaned census tract dataframe
  -all 51 state codes returns 103,998,049 rows, 12 columns

Run the function get_state_codes to get a csv of all state codes (minus PR) from census. Make sure to place the csv file output in the folder state_codes. The script will use this file to collect census tract data for all included states.

Goal #2 (2_learn)

Conduct exploratory data analysis on social characteristics data for each state returned from 1_build. Learn trends & visualize analysis in a Jupyter notebook.

Alt text

Alt text

Goal #3 (3_query)

Load data into DuckDB to run SQL queries for futher data transformation and analysis. Create an interactive chart with Altair to see ancestral country of origin by state.

Alt text

References

https://www.census.gov/data/developers/data-sets/acs-5year.html
https://api.census.gov/data/2021/acs/acs5/profile/groups/DP02.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors