UrbanInstitute / education-data-package-stata

MIT License
19 stars 4 forks source link

AP enrollment data missing #61

Closed ericatheresa closed 4 years ago

ericatheresa commented 4 years ago

Hi @VivianSihanZHENG -- Grace just noticed that the stata package is not returning crdc AP enrollment or directory data. The data seem to exist on the api here: https://educationdata.urban.org/api/v1/schools/crdc/ap-ib-enrollment/2013/race/sex/?fips=11 (even though there are a lot of -2s, it's populated), but seem to be missing when using the equivalent stata command: educationdata using "school crdc ap-ib-enrollment race sex", sub(year=2013 fips=11) clear

Thanks for looking into this!

VivianSihanZHENG commented 4 years ago

@ericatheresa We figured out the issue, and it will be fixed in the next new version of STATA package, which will be published in the March release.

The issue existed because there are uppercase letters in some variable names in metadata tables, while STATA doesn't allow uppercase letters in variable names. So we need to map the variables to the api-values table before converting them all to lowercase. Thanks @grahamimac for fixing this!