Author: Julia Christensen
Date: April 24, 2018
Project: Rural Geography
For this project, I used R to create maps of the United States at a county level. My purpose was to explore whether adequate data exists to analyze individual-level political behavior in rural America. I used data from the CCES, the US Census, and the USDA to explore the degree of variation within rural America and the distribution of CCES responses across counties. Using R, I created county-level maps for the following: (a) rural population, (b) economic and social measures, and (c) number of CCES respondents. These maps demonstrate how different criteria can produce substancially different rural vs. urban categories. They also suggest that there are fewer than 30 CCES respondents in many counties, particularly in rural areas. Lastly, they suggest that there is substancial variation within rural areas.
language: R
version.string: R version 3.4.4 (2018-03-15)
nickname: Someone to Lean On
The following files and folders are stored here: "ps239T-final-project\Data_Geo_Sophistication"
- ruralurbancodes2013.csv: Rural-Urban Continuum Codes (RUCC) - nonmetropolitan counties by degree of urbanization and adjacency to a metro area (https://www.ers.usda.gov/data-products/rural-urban-continuum-codes/).
- UrbanInfluenceCodes2013.csv: Urban Influence Codes (UIC) - distinguishes nonmetropolitan counties by size of the largest city or town and proximity to metro and micropolitan areas (https://www.ers.usda.gov/data-products/urban-influence-codes.aspx).
- ERSCountyTypology2015Edition.csv: County Typology Codes - six mutually exclusive categories of economic dependence and six overlapping categories of policy-relevant themes (https://www.ers.usda.gov/data-products/county-typology-codes.aspx).
- County_Rural_Lookup.csv: Census population data; broken down by county and rural vs. urban (https://www.census.gov/geo/reference/urban-rural.html).
- state_fips_codes.csv: Maps states to state FIPS codes.
- cumulative_2006_2016_sub.Rds: Subset of Cumulative CCES Common Content (2006-2016).
- [FOLDER] USDA_Shapefile: File folder containing shape file; R function requires reference to whole folder instead of single file (http://www2.census.gov/geo/tiger/GENZ2010/gz_2010_us_050_00_20m.zip).
The following files and folders are stored here: "ps239T-final-project\Geo_Project_PS239T\Data_R"
- cess_all.RData: Saved .R version of the following CCES files: cces_dat: Cumulative CCES Common Content (2006-2016)
- cess_cum.RData: Saved .R version of the following CCES files: cces_dat: Cumulative CCES Common Content (2006-2016)
- census_2016_poverty.RData: copy of data downloaded from census. Allows for data analysis even if API key is missing from script #5.
- 00_Install_Libraries.R - Installs packages used in later files.
- 01_CCES_Download_Data.R - Opens and saves CCES data as .RData file.
- 02_CCES_Map_Frequency.Rmd - Opens CCES data; create maps of CCES respondents by geography.
- 03_USDA_Map.Rmd - Opens USDA data; plots the following:
- Plot Rural-Urban Continuum Codes (RUCC) - nonmetropolitan counties by degree of urbanization and adjacency to a metro area (https://www.ers.usda.gov/data-products/rural-urban-continuum-codes/).
- Plot Urban Influence Codes (UIC) - distinguishes nonmetropolitan counties by size of the largest city or town and proximity to metro and micropolitan areas (https://www.ers.usda.gov/data-products/urban-influence-codes.aspx).
- Plot County Typology Codes - six mutually exclusive categories of economic dependence and six overlapping categories of policy-relevant themes
- 04_Census_Map_Density.Rmd - Opens data from USDA and Census; create maps of population density data.
- 05_Census_Map_Poverty.Rmd - Collects data from Census using API and tidycensus; create maps of poverty data.
- cces_count_USA.pdf: Map of CCES respondents by county
- [FOLDER] CCES_Count_States: Subfolder called "CCES_Count_States" contains map of CCES respondents by county for each state
- Census_Poverty_County_2016_ln_poverty_rate_A.pdf: Map of % population in poverty (according to US Census); continuous scale
- Census_Poverty_County_2016_ln_poverty_rate_scale_A.pdf: Map of % population in poverty (according to US Census); logged, continuous scale
- Census_Poverty_County_2016_poverty_rate_A.pdf: Map of % population in poverty (according to US Census); discrete scale
- Census_Poverty_County_2016_poverty_rate_scale_A.pdf: Map of % population in poverty (according to US Census); discrete scale of logged rate
- Census_rural_2010_s_USA_A.pdf: Map of % rural population by state using US Census data; color option A
- Census_rural_2010_s_USA_B.pdf: Map of % rural population by state using US Census data; color option B
- Census_rural_2010_s_USA_D.pdf: Map of % rural population by state using US Census data; color option D
- Census_rural_2010_USA_A.pdf: Map of % rural population by county using US Census data; color option A
- Census_rural_2010_USA_B.pdf: Map of % rural population by county using US Census data; color option B
- Census_rural_2010_USA_D.pdf: Map of % rural population by county using US Census data; color option D
- USDA_EconType_2013_USA.pdf: Map of Econ typology from USDA
- USDA_EconType_Alt1_2013_USA.pdf: Map of Econ typology from USDA; alternative color option 1
- USDA_EconType_Alt2_2013_USA.pdf: Map of Econ typology from USDA; alternative color option 2
- USDA_Low_Edu_2013_USA.pdf: Map of Low education indicator from USDA
- USDA_Low_Employment_2013_USA.pdf: Map of Low employment indicator from USDA
- USDA_Persistant_Child_Poverty_2013_USA.pdf: Map of Persistant Child Poverty indicator from USDA
- USDA_Persistant_Poverty_2013_USA.pdf: Map of Persistant Poverty indicator from USDA
- USDA_Pop_Loss_2010_USA.pdf: Map of population loss indicator from USDA
- USDA_Retirement_Dest_2013_USA.pdf: Map of retirement destination indicator from USDA
- USDA_RUCC_2013_USA_A.pdf: Map of RUCC from USDA; color option A
- USDA_RUCC_2013_USA_B.pdf: Map of RUCC from USDA; color option B
- USDA_RUCC_2013_USA_D.pdf: Map of RUCC from USDA; color option D
- USDA_UIC_2013_USA_A.pdf: Map of RUCC from USDA; color option A
- USDA_UIC_2013_USA_B.pdf: Map of RUCC from USDA; color option B
- USDA_UIC_2013_USA_D.pdf: Map of RUCC from USDA; color option D
- USDA_UIC6_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with UIC > 5
- USDA_UIC7_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with UIC > 6
- USDA_UIC8_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with UIC > 7
- USDA_UIC9_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with UIC > 8
- USDA_URCC4_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with RUCC > 3
- USDA_URCC5_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with RUCC > 4
- USDA_URCC6_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with RUCC > 5
- USDA_URCC7_rural_2010_USA_B.pdf: Map of estimated % rural population by state; defines rural population as people in counties with RUCC > 6
- Compare_UIC_v_Census_Rural_USA.pdf: Plot USDA scale (UIC) against Census % rural by county.
- Compare_RUCC_v_Census_Rural_USA.pdf: Plot USDA scale (RUCC) against Census % rural by county.
- Compare_UIC_v_Census_Rural_WY.pdf: Plot USDA scale (UIC) against Census % rural by county in Wyoming.
- Compare_RUCC_v_Census_Rural_WY.pdf: Plot USDA scale (RUCC) against Census % rural by county in Wyoming.
- Compare_UIC_v_Census_Rural_USA_rural.pdf: Plot USDA scale (UIC) against Census % rural by county with UIC > 3.
- Compare_RUCC_v_Census_Rural_USA_rural.pdf: Plot USDA scale (RUCC) against Census % rural by county with RUCC > 3.
Script #5 requires a Census API key. Either contact Julia for key or request key using this link:https://api.census.gov/data/key_signup.html.
Due to github size limitations, I replaced the original download with a subset. I removed two variables with duplicate information (state and cd).
I started this project using a differnt file structure which differentiates between raw data and manipulated data. Hopefully, it will not be a problem that I did not use the exact file structure described in the instructions.
- "ps239T-final-project\Data_Geo_Sophistication" - Raw Data
- "ps239T-final-project\Geo_Project_PS239T\Data_R" - Manipulated Data
- "ps239T-final-project\Geo_Project_PS239T\Analysis" - Code
- "ps239T-final-project\Geo_Project_PS239T\Output" - Results