This repository contains the necessary scripts to process and join the census data to a shapefile of tracts that correlate with desired Metropolitan Statistical Areas (MSAs).
Before you can start working through the scripts you will need to download the DP02, DP03, DP04, and DP05 tables from American Fact Finder for every census tract in the United States for the 2010-2015 ACS 5-Year estimates.
You will likely have 5 or more files for each table for each year because of download limitations. This will result in many files that look something like this ACS_10_5YR_DP02_with_ann
, ACS_10_5YR_DP02_with_ann_1
, ACS_10_5YR_DP02_with_ann_2
, ACS_10_5YR_DP02_with_ann_3
, etc.
These files should be saved in the data\census\input
folder in a file structure that is by year and then by table, such as data\census\input\2010\DP02\
. A folder called tables_rbind
also must be created inside of every year folder, such as data\census\input\2010\tables_rbind\
.
You will also need to download the census tracts for all of the MSAs in your list. This script uses a shapefile with the all of the census tracts for the top 55 MSA's by population as of 2017. The shapefile you download should be titled tracts_in_selected_msas
and saved in an input folder in this location data\spatial\input\
. Also create an output folder inside of the spatial folder, such as data\spatial\output\
.
Work through the census data scripts in the following order:
TransitCenter_combine_tract_data_2010-2015
TransitCenter_calculate_census_variables
This repository contains the necessary code and datasets to compile NTD and census datasets used in Azavea's visualization of transportation ridership for TransitCenter
The R scripts in this repository create the datasets used in the app. You can work through the scripts in the following order:
TransitCenter_match_agencies_to_msas.R
TransitCenter_data_wrangling_TS21.R
TransitCenter_create_shapefile_of_change_variables.R
All scripts rely on input files in the data/input/
directory and write final outputs to the data/output/
directory. Intermediate outputs (e.g. csvs that one script outputs but another uses as input) are written to data/input/
.
- Atlanta-Sandy Springs-Roswell, GA
- Austin-Round Rock, TX
- Baltimore-Columbia-Towson, MD
- Birmingham-Hoover, AL
- Boston-Cambridge-Newton, MA-NH
- Buffalo-Cheektowaga-Niagara Falls, NY
- Charlotte-Concord-Gastonia, NC-SC
- Chicago-Naperville-Elgin, IL-IN-WI
- Cincinnati, OH-KY-IN
- Cleveland-Elyria, OH
- Columbus, OH
- Dallas-Fort Worth-Arlington, TX
- Denver-Aurora-Lakewood, CO
- Detroit-Warren-Dearborn, MI
- Grand Rapids-Wyoming, MI
- Hartford-West Hartford-East Hartford, CT
- Houston-The Woodlands-Sugar Land, TX
- Indianapolis-Carmel-Anderson, IN
- Jacksonville, FL
- Kansas City, MO-KS
- Las Vegas-Henderson-Paradise, NV
- Los Angeles-Long Beach-Anaheim, CA
- Louisville/Jefferson County, KY-IN
- Memphis, TN-MS-AR
- Miami-Fort Lauderdale-West Palm Beach, FL
- Milwaukee-Waukesha-West Allis, WI
- Minneapolis-St. Paul-Bloomington, MN-WI
- Nashville-Davidson–Murfreesboro–Franklin, TN
- New Orleans-Metairie, LA
- New York-Newark-Bridgeport, NY-NJ-PA
- Oklahoma City, OK
- Orlando-Kissimmee-Sanford, FL
- Philadelphia-Camden-Wilmington, PA-NJ-DE-MD
- Phoenix-Mesa-Scottsdale, AZ
- Pittsburgh, PA
- Portland-Vancouver-Hillsboro, OR-WA
- Providence-Warwick, RI-MA
- Raleigh, NC
- Richmond, VA
- Riverside-San Bernardino-Ontario, CA
- Rochester, NY
- Sacramento–Roseville–Arden-Arcade, CA
- Salt Lake City, UT
- San Antonio-New Braunfels, TX
- San Diego-Carlsbad, CA
- San Francisco-Oakland-Hayward, CA
- San Jose-Sunnyvale-Santa Clara, CA
- Seattle-Tacoma-Bellevue, WA
- St. Louis, MO-IL
- Tampa-St. Petersburg-Clearwater, FL
- Tucson, AZ
- Tulsa, OK
- Urban Honolulu, HI
- Virginia Beach-Norfolk-Newport News, VA-NC
- Washington-Arlington-Alexandria, DC-VA-MD-WV