Skip to content

CT-Data-Haven/2020acs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2020 ACS update + community profiles

Distribution-ready files are in to_distro. CSV file for populating website’s community profiles is in website.

Output

                                            levelName
1  .                                                 
2   ¦--fetch_data                                    
3   ¦   °--acs_basic_2020_fetch_all.rds              
4   ¦--output_data                                   
5   ¦   ¦--acs_nhoods_by_city_2020.rds               
6   ¦   ¦--acs_town_basic_profile_2020.csv           
7   ¦   ¦--acs_town_basic_profile_2020.rds           
8   ¦   °--cws_basic_indicators_2021.rds             
9   ¦--to_distro                                     
10  ¦   ¦--bridgeport_acs_basic_neighborhood_2020.csv
11  ¦   ¦--hartford_acs_basic_neighborhood_2020.csv  
12  ¦   ¦--new_haven_acs_basic_neighborhood_2020.csv 
13  ¦   ¦--stamford_acs_basic_neighborhood_2020.csv  
14  ¦   °--town_acs_basic_distro_2020.csv            
15  °--website                                       
16      °--5year2020town_profile_expanded_CWS.csv    

Development

Several global functions and other objects are loaded when each script sources utils/pkgs_utils.R, including all loaded libraries. There are two global variables for years: yr and cws_yr, for the ACS endyear and the CWS year, respectively. Those are both taken as positional arguments by pkgs_utils.R and passed down to whatever script you want to run.

For example, on the command line run:

Rscript scripts/03_calc_acs_towns.R 2020 2021

to execute that script for ACS year 2020 & CWS year 2021. Similarly, those 2 variables are saved in the makefile and passed to scripts from there.

To build the full project in the proper order, on the command line run:

make
# or make all

or rebuild just once piece of it, e.g. make distro_nhood.