Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

AAL get_summary returning NA values for many ZCTAs #65

Open
mulderphilip opened this issue Jun 8, 2021 · 4 comments
Open

AAL get_summary returning NA values for many ZCTAs #65

mulderphilip opened this issue Jun 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@mulderphilip
Copy link

Hello,

When I run the aal.get_summary() command over a list of ZCTAs, many of the values return as for entire ZCTAs. In many cases, I see that valid_id still returns as True, which I take to mean that all the properties in the ZCTA have a floodfactor of 1 (analogous to the reason for AAL NAs at the property-level). However, most of the valid_id fields are false, with either an "incorrect address" or "incorrect congressional district" error code.

I have attached output for the NA ZCTAs. The First Street package is freshly installed and running on python 3.9. Here is the chunk of code that executes the pull:


fs = firststreet.FirstStreet("api-key",rate_limit=4950,rate_period=62, connection_limit=100)
pull_zip = "zip_list.csv"
fs.aal.get_summary(pull_zip, location_type='zcta', csv=True, output_dir=os.getcwd())

Thank you as always for your help!

missing_fsf.xlsx

@mulderphilip mulderphilip added the bug Something isn't working label Jun 8, 2021
@Lyetenth
Copy link
Contributor

Hey @mulderphilip,

Could you try running your code again? I can't seem to be able to reproduce the errors. I'm running it on a small subset of the failed FSIDs, and it seems to be working now: aal_test.xlsx

Let me know if it fails again

@mulderphilip
Copy link
Author

Hi @Lyetenth, thanks for the follow-up.

I tried running the full list again, and got the same missing values for the same zips. Then, I reran just a few of the missing ones and got data back that time.

It looks like whatever this bug is causes the same ZCTAs to be missing, but only when they're part of a sufficiently large list being run through. In the nearterm, we have a solution which is just to run the missing ones through again (and a third time as needed).

Thank you as always for your help.

@Lyetenth
Copy link
Contributor

Hey @mulderphilip,

If you can, could you provide me the ZCTA file that's causing the issue? I can see if I can run some tests to determine where the issue is coming from because you really shouldn't have to run it 3 times. Based on the error message (Congressional District could not be found), it might be something on the API side instead of on this Python wrapper

@mulderphilip
Copy link
Author

Sure thing, please see attached.

NB: I ran it through as a CSV, but had to change it to a txt file to share here. Just on the off chance that the error was specifically because it was a csv...
zip_list.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants