azh2 / Social-Vulnerability-R

Provides tools for calculating a Social Vulnerability or Adaptive Capacity Index in R using the US Census API and Tidycensus. Creates an interactive leaflet web map, CSV and ESRI Shapefile.
GNU General Public License v3.0
10 stars 2 forks source link

Error when running script due to unknown variable #1

Closed reneherrera-cocohhs closed 2 years ago

reneherrera-cocohhs commented 2 years ago

When running the script I get this error:

Error: Your API call has errors. The API message returned is error: error: unknown variable 'B09008_001E'.

azh2 commented 2 years ago

Thank you for your question and sorry for the late response!

Not all variables are available for all block groups or geographies so you may have to find an alternative variable or pull the data at the tract level. Other options for deriving the percent of single-parent households include the B23008 or B05009 tables, but there may be others available. Please see the note here: https://github.com/azh2/Social-Vulnerability-R#percent-of-children-living-in-single-parent-households

A list of variables is attached here, you can also access these by calling tidycensus::load_variables() or going to https://api.census.gov/data/2019/acs/acs5/variables.html

ACS_5YR_VARIABLES.csv

reneherrera-cocohhs commented 2 years ago

Thanks for the explanation.