waldoj / frostline

A dataset, API, and parser for USDA plant hardiness zones.
https://phzmapi.org/
MIT License
151 stars 25 forks source link

Some zipcodes with PHZ data are not in zipcodes.csv file, and therefore have no api json file #35

Open philvarner opened 3 years ago

philvarner commented 3 years ago

For example, 90840 is in the US (CONUS) PHZ csv, but not in zipcodes.csv, so it results in a 404 https://phzmapi.org/90840.json

This seems to be opposite of the case mentioned in the readme (some zips don't have PHZ data).

According to https://public.opendatasoft.com/explore/dataset/us-zip-code-latitude-and-longitude/table/ there should be 43,191, whereas the csv only has 29,809 rows (incl header).

I think the underlying cause of this is that the UPDATE silently has no effect if there was no row inserted for that zip from the zipcodes.csv.

Running some modified code, I see:

PHZ zipcodes with no location: 11348 zipcodes with no PHZs: 36

Using the CSV from the OpenDataSoft URL above, I see:

PHZ zipcodes with no location: 459 zipcodes with no PHZs: 2530

So, it looks like there are still some PHZ zips not covered by the ODS list.