UrbanInstitute / education-data-package-stata

MIT License
19 stars 4 forks source link

Data types #36

Closed ericatheresa closed 6 years ago

ericatheresa commented 6 years ago

This could be on my end (I've experienced this with other datasets trying to read them into Stata; sometime it introduces slight random noise), but maybe there's a fix on the package end. In any case:

If I make this call: https://ed-data-portal.urban.org/api/v1/college-university/ipeds/grad-rates/2015/?unitid=236948&subcohort=2&race=99

The completion rate for sex=1 is 0.82. However, in the data that Stata loads, it is .81999999, and the "label" is different again at .81999999284744263.

It's probably not super big deal but it would be nice if we could get those numbers to read in a little more nicely.

grahamimac commented 6 years ago

This is very likely not a fixable error - most programming language deal with this, and it's a function of the fact that they store data in binary (base 2) and display numbers in base 10. I'll see if there's a solution in Stata, but I won't prioritize it unless you tell me to do so.

grahamimac commented 6 years ago

It turns out this was a fairly easy fix once I looked into it. Stata allows for another data type for decimals (double) that solves this issue. This should be fixed in the next release.