datalab-dev / graves-endocrine_surgeons

Claire Graves' 2022 collaboration to identify access to endocrine surgery centers
GNU General Public License v3.0
1 stars 1 forks source link

Analyze Census Data #19

Open MicheleTobias opened 1 year ago

MicheleTobias commented 1 year ago

Once the variables are identified, we need to run the analysis with the census data to understand the characteristics of the people inside and outside the access polygons.

We need to:

MicheleTobias commented 1 year ago

A useful document from Sebastian about the Census API which might also apply to the TidyCensus package: https://www.census.gov/content/dam/Census/library/publications/2020/acs/acs_api_handbook_2020_ch02.pdf

MicheleTobias commented 1 year ago

@alisonsnwong the estimate_population.R file is throwing an error for me in the read_census_variable_csv() function. On line 38, it throws an error trying to get the decennial census data. I thought it might be that my R session was giving me trouble setting my API key, so I tried it hardcoded into the request, but that didn't fix it. I'm going to try updating my R version to see if that's it.

This is the error:

Error in `stop_rate_excess()`:
! Request failed after 3 attempts
alisonsnwong commented 1 year ago

@MicheleTobias Hmm is the csv you are using the same as the current version on GitHub? I updated some of the column names and census variables because there were typos.

MicheleTobias commented 1 year ago

That might be it. I'm using the csv that's in the estimate_population branch.

MicheleTobias commented 1 year ago

What's the status of the code for analyzing the census data? It should output