-
Notifications
You must be signed in to change notification settings - Fork 7
"Adaptation Serving" object not downloading #45
Comments
Hey @Steve-Koller, Thanks for finding that bug, looks like it wasn't being exported correctly in the CSV file. I just made an update to the library (2.2.3) that should fix this issue. A Alternatively, if you're unable to update the library at the moment, in the 2.2.2 version of the library the
Let me know if either solution works |
Hi @Lyetenth, thank you again for your help. I just ran the The second alternative returned many lines, some example output below:
I'm not quite sure what this information represents, and am also not sure how to integrate the output from this |
Hey @Steve-Koller, Re: The upgrade. Can you run If it does say Re: The second question. The serving data returns the count of locations that the adaptation project is serving broken down by location type. (https://github.com/FirstStreet/fsf_api_access_python/wiki/Adaptation-Detail) Ex: In the example you posted
I don't know which adaptation measure you used as an input, but for example a levee built to stop tidal floods along a coastline would have an adaptation serving where it serves X number of properties and Y neighbourhoods, etc. I'm not sure if that's what you're asking for, let me know if that answers your question on what the information represents. For merging the output object with the csv, if you're not too familiar with converting the objects to a csv file then it would probably be easier to try to get the library upgraded. Once it's at version 2.2.3, it should create a CSV file with the servings broken down like the image below: |
Hi @Lyetenth, thanks again! Below is a screenshot of the output when I run Also, thank you for the clarification on the second point. That is very helpful. I guess I was wondering whether it was possible to have .csv output that shows the individual properties served by a specific adaptation project. For example, in the case above, I'm wondering if it's possible to identify the unique parcel IDs of the 327 properties served by the project, e.g. a .csv with 327 observations uniquely ID'ed by parcel, with a common project ID they're served by. I'm not sure if that makes sense or if it's possible, but that's what I was getting at. |
Hey @Steve-Koller, This really is weird. The other libraries look good, and shouldn't be causing problems. Are you able to run If you can run
and post the resulting CSV file here to this google drive folder, I'll do a quick compare to see if something is still exporting incorrectly. Could you also upload your For the use-case you mentioned, I don't think we have something to do that at this time (ie: "For the adaptation measure with ID Z, give me all the fsids that this adaptation measure covers) but I believe the engineering team aims to get property-level fsids into the API services some time in the future. A brute-force and not-so-elegant solution is to run ie: Run Not very quick or elegant, but it would work while I see how far along the team is on getting the above implemented. |
Hi @Lyetenth, thanks again for the clarification. I just uploaded the resulting .csv output from Thank you as well for providing this info about accessing records showing the adaptation measure(s) each property is covered by (or vice versa). I'll give the brute-force method a try, and if it's not too cumbersome or time-consuming, I'll let you know how it goes. Also if you find out the engineering team's timeline re: property-level FSIDs, I'd be grateful for that info as well. Thanks again! |
@Lyetenth also, I noticed in your screenshot above you have "latitude" and "longitude" data for Lockington Dam & Reservoir. In my download from the API, the Lockington Dam & Reservoir records (both dam and detention pond) have "NA" values for the "latitude" and "longitude" columns. In total, of the 16,800+ climate adaptation project records I've downloaded, <50 have latitude and longitude data. The overwhelming majority have "NA." Do you think this is an error? One last thing— the data dictionary and Wiki don't mention this, so I'm assuming data like this aren't currently available, but I was wondering if the API makes (or has plans to make) any info available describing the date or time period when adaptation projects were completed? Guessing the answer is "no," but asking just to be 100% sure. Thank you again! |
Hey @Steve-Koller, You should be able to see the lat / lngs values in the CSV now. Do a quick check and let me know if it's still NULL |
Hi @Lyetenth, thanks again for your help getting this sorted. Really appreciate it. Was able to download a CSV with the lat/longs. On a slightly different topic, I was in today's FSF webinar, and Mike Kaminski mentioned First Street provides info on the original data source of the adaptation project (e.g., Army Corps, FEMA, etc.). Similar to the lat/long issue, the CSV that downloads after running |
Hi @Steve-Koller, The API currently does not currently export the data sources for adaptation projects so it makes sense for there to not be any data in the export CSV file. Let me see if there are any plans to add this data to the API |
Hi @Lyetenth gotcha, thanks for clarifying. I understand if it's only available internally. If there are any plans to add this data to the API, please let me know! Thanks again for your help. |
I am running the
adaptation_detail = fs.adaptation.get_detail(search_items="Adaptation.txt", csv=True)
command where "Adaptation.txt" is a file of search items. The .csv file successfully downloads and contains all objects, except for the "serving" array/dict. In the Wiki and data dictionary, I have not seen any instructions about how to manage this situation and access the "serving" object. Any guidance you can provide on this would be most appreciated! Thank you.The text was updated successfully, but these errors were encountered: