Closed hrecht closed 6 years ago
This was addressed in https://github.com/hrecht/censusapi/commit/ff2c8e65e4cfe2e6f67160c5e9d33aadaceec16a . Leaving the issue open for more testing before CRAN submission. After fix:
fl_sd_pop <- getCensus(name="acs5",
vintage=2015,
vars=c("NAME", "B01003_001E"),
region="school district (unified)",
regionin="state:12")
colnames(fl_sd_pop)
> [1] "NAME" "state" "school_district_unified" "B01003_001E"
Closed in v0.3.0
In rare cases, data are returned with periods in the column names as a result of spaces in the json key. See for example (thanks to Andrew Tran):
returns a column named
fl_sd_pop$school.district..unified.
getCensus should clean up colnames by removing doubled and trailing periods/characters and turning the remaining periods/characters into underscores. The cleaned up column name in this example would be
school_district_unified