Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure if reopening #175193: Zip code database out of date makes sense at this point, but the zipcodes.us.mysql file still has holes. As one specific example, the 10065 zipcode on the Upper East Side of New York City isn't there. All you get are:
('10060', 'New York', 'NY', '40.780751', '-73.977182', -5, 1, 'us'),
('10069', 'New York', 'NY', '40.775477', '-73.990500', -5, 1, 'us'),
('10072', 'New York', 'NY', '40.780751', '-73.977182', -5, 1, 'us'),
('10079', 'New York', 'NY', '40.780751', '-73.977182', -5, 1, 'us'),
I don't know how to reliably find all the zip codes to compare what's in the DB with reality, but clearly 10065 is missing. Should I just open separate issues for any zipcodes I find that are missing? Is manually keeping this file accurate really the strategy here?
Thanks,
-Derek
Comment | File | Size | Author |
---|---|---|---|
#1 | 1460880-1.NY-zipcode-fixes.patch | 1.43 KB | dww |
Comments
Comment #1
dwwBased on http://www.zip-codes.com/zip-code/10065/zip-code-10065.asp and http://www.zip-codes.com/zip-code/10075/zip-code-10075.asp here's a patch to add two of the missing zip codes. Some of the other entries for NY seem bogus, but I'm not sure about removing existing entries that no longer appear to correspond with actual zip codes. Also, some of the lat/lon data in the file doesn't match what's listed on this site, but I'm not sure how reliable that site is, either. So, let's at least start with this. I guess we don't need a hook_update_N() to insert missing records, right, since the idea is that people would just drop and rebuild the table or something?
Comment #2
ankur CreditAttribution: ankur commentedThanks for the data correction. The original data was extracted from some 2000 Census files, by Schuyler Erle, the person that offers the geocoding service at http://geocoder.us
I do, however, have mixed thoughts on this.
On one hand, I'd like to avoid maintaining zipcode data on Drupal.org's servers. I'm not sure if I remember the internals of git correctly, but whenever a file is modified, rather than storing just the differential, git stores the entire new revision of the file, correct? I guess that wouldn't be too much of an issue if compression is being used.
There's a similar thread on this for UK postcodes: #765564: Full UK zipcodes mysql file using Google
I think, in the future, the best way to go would be to try to have this data hosted elsewhere.
For now, maybe we can take the middle road of allowing changes to existing zipcode data files, but not allowing the addition of new ones.
In any case, I'm thinking that, if you have commit access for this project, you can just go ahead and push this change through (while also merging it to the 7.x-3.x and 7.x-5.x branches). Also, let's leave this stuff out of the .install files.
Comment #3
dwwGit is very efficient at storing changes. It stores diffs. It even tries to store diffs on binary files. Don't worry about that. ;)
But yeah, it is a can of worms trying to keep this data accurate. :/ Not sure the best long term solution for that.
Duly noted on leaving these changes out of the .install file.
I'll push to all relevant branches of location later today. In the middle of a bunch of other stuff right now.
Comment #4
podarokpostponed before tests fix
#1931088: [META] Fixing tests
Comment #5
podaroktests fixed #1931088: [META] Fixing tests
lets go
Comment #6
podarok#1 commited pushed to 6.x-3.x
thanks!
Comment #8
dwwCool, thanks. This fell off my radar (obviously). ;) Shouldn't we merge this to the D7 branches, too?
Thanks,
-Derek
Comment #9
podarokpatch are welcome
Comment #10
dwwQuestion is do you want to use Git merge or do you want to just commit the same fix to multiple branches? If you just want to commit, the patch in #1 still applies cleanly to both 7.x-3.x and 7.x-5.x.
Thanks!
-Derek
Comment #11
podarok#1: 1460880-1.NY-zipcode-fixes.patch queued for re-testing.
Comment #12
podarokcommited pushed to 7.x-3.x
thanks!!!
Comment #13
dwwThank you!