FirstStreet / fsf_api_access_python

First Street API Access (Python)
https://firststreet.org/
MIT License
13 stars 7 forks source link

clarifying the order returned by the api #33

Closed erinjstpeter closed 3 years ago

erinjstpeter commented 3 years ago

Does the order returned by the API match the order of the input observations in the .txt file? It did on a test sample that I ran but I wanted to clarify that this was always the case.

Lyetenth commented 3 years ago

Hey @erinjstpeter,

As of version 2.0.0 for the fsf-api-access-python library, it -should- always return both the list of objects or the CSV file in the order that was inputted. If this isn't the case, open up a bug report and I can take a look.

Lyetenth commented 3 years ago

Hey @erinjstpeter,

I took a further look into the issues and it looks like in the last release, a bug got re-introduced that caused the input order and output order to become mismatched.

I've made a bug fix (to version 2.1.2) that fixes this issue. Let me know if updating the library still causes issues

Kelvin

erinjstpeter commented 3 years ago

Thanks @Lyetenth! The motivation for the question was so that I could match non-FSID inputs (like lat/longs) with the FSID-identified outputs in the standard output .csv. Since the inputs were already getting brought into the output file in cases where they didn't match FSIDs, we were able to do a fix that involves calling the inputs and including them in the output file as a separate column. But it sounds like that fix or matching on the order of the observations should now work going forward! I'll try replicating the run and matching on order just to double check!