walkerke / tidycensus

Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
https://walker-data.com/tidycensus
Other
639 stars 100 forks source link

get_decennial inconsistent problems with block geography #588

Open aaron-k-cho opened 2 weeks ago

aaron-k-cho commented 2 weeks ago

The following code either ran or failed at complete random. Tested with combinations of different states and the following variables: 'P001001' ,'P005003' ,'P005004' ,'P004003'. This issue only arose at the block level and not at county, tract, or block group levels.

get_decennial(
  geography = "block",
  variables = 'P005003',
  state = "AL",
  year = 2010,
  sumfile = "sf1",
  key = census.key)

When the code failed, the following error message appeared.

Error in `get_decennial()`:
! Error in load_data_decennial(geography, variables, key, year, sumfile,  : 
  No content was returned from the API.  Please refine your selection.
walkerke commented 1 week ago

I can't reproduce this. Are you doing bulk block pulls from the API?