tyrauber / census_api

A Ruby Gem for querying the US Census Bureau API
MIT License
30 stars 9 forks source link

API Format Changes: 2010 SF1 #20

Open tyrauber opened 6 years ago

tyrauber commented 6 years ago

About a year ago, the U.S. Census Bureau began the process of centralizing all data in the Census API into a uniform and consistent format across all datasets and surveys. We are continuing with that transformation by releasing a more consistent format for the 2010 Decennial Summary File 1 (SF1) counts. We understand that standardization means changes for our developers, but the tradeoff will be greater data accessibility in an easier, more customer-focused experience.

We released new endpoints as a Beta to allow time for you to become familiar with the new format and adjust your programs to reflect these changes. In addition to new endpoints, you also will see changes to variable names and new annotation fields. To accommodate this format change, the endpoints will change to add program name (e.g., '/dec/') into the URL after the year. The old endpoints will be removed on August 30th.

ENDPOINT CHANGE: Old endpoint: https://api.census.gov/data/2010/sf1 New endpoint: https://api.census.gov/data/2010/dec/sf1

VARIABLE NAME CHANGES: Please note the changes to some variable names. H00010001 is now H001001, and PCT0210001 is now PCT021001, for example. A complete variable mapping is not available.

ANNOTATION FIELDS: These endpoints now include annotation fields for many counts. This will enable the counts to be numeric and the character overrides to be stored in corresponding annotation fields. For example, the annotation field for H001001 is H001001ERR. The variables with corresponding annotation fields include: H001001,H002001,H003001,H003002,H003003,H004001,H005001,H006001,H007001, H010001,H011001,H013001,H014001,H015001,H016001,H017001,H018001,H019001, H020001,H021001,HCT001001,HCT002001,HCT003001,HCT004001,P001001,P002001, P003001,P004001,P005001,P008001,P009001,P012001,P013G002,P013H001,P013H002, P015001,P016001,P018001,P019001,P020001,P021001,P022001,P023001,P024001, P025001,P026001,P027001,P028001,P029001,P029002,P029026,P030001,P042001, P043001,P044001,P051001,PCO001001,PCT011001,PCT012001,PCT013001,PCT014001, PCT015001,PCT016001,PCT020001

ik-fractel commented 5 years ago

I tried to use the library over the weekend, and was receiving 404 errors, I believe related to this move. I'm not sure the best way to fix them, I'm new to this world. I cargo-culted a dec/ subdirectory as indicated above, and started getting different (400) errors.

(ps — hello, Ty)

tyrauber commented 5 years ago

@ik-fractel, Ok, I had a branch ready, fix/api_changes (#23), which attempts to address the api changes. Readme and specs are updated. Specs passed. Merged in and version bumped to 2.0.0.
Let me know if it resolves your issues. Thanks for the heads up, Ian. Hope all is well with you.

ik-fractel commented 5 years ago

I got a chance to test it out last night. Seems to be working, I'll let you know if I run into any problems. Thanks for the quick response!