Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Additional county-level NY data #201
Hi! I've eagerly followed this project / the blog posts by Mike Migurski / Planscore, and was inspired to file a FOIL (NY State's FOIA equivalent) to get at some further/better precinct shapes in my state.
The Secretary of State here doesn't control election district data (the various county secretaries of state do) so I went to the next best thing short of phoning up every county: the LATFOR, which is a permanent committee in NY State which "aids the Legislature by providing technical plans for meeting the requirements of legislative timetables for the reapportionment of Senate, Assembly and Congressional districts". After calling them and getting the runaround (you can google LATFOR, they are often tied to controversy!), I filed this FOIL request, which is where the data in this PR comes from:
https://www.muckrock.com/foi/new-york-16/ny-state-election-district-shapefiles-for-past-elections-60752/ (there's a downloadable ZIP there)
I haven't yet done the work to translate the data from all of these files to the
Thanks, and let me know if there's anything other conventions I should hew to in terms of folder naming or how to organize the additions to the Makefile
Great find, thanks for all your sleuthing! This will fill in a huge gap in the map :)
Wow, this is great! I took a quick peek at these layers, and they’re all pretty different. I can help with the Makefile syntax & testing if you can provide a bit of additional information about each county: which file has the county’s newest data, the year that data is from, and the column name where the precinct name or ID can be found.
OK, I think all of the counties should now be in that Makefile (and I've verified that the NY part of the Makefile runs OK). I also tweaked some of the NYC data specifically so that the per-borough counties get assigned correctly (+ added a related script to make this consistent into the future).
Some other notes/things that came up as I went thru these:
Nice work! I'll find time tonight or tomorrow to review the PR and verify locally.
I haven't been snapping to nearest election year in the rest of the data, so to be consistent please base on the creation of the data instead. (In some cases if I've verified it was for the earlier election year than I have moved the date backwards in time.)
They should all be added to the prereqs to keep Make informed. Else we'll update one of the counties later and it won't trigger a Make update.
I'll give these a once over, too. Some of it is guesswork, we can always fix something later if someone finds a bug ;)
I'll give this a once over, too. Generally as long as the output looks right (whole state with continuous fabric of coverage – no holes; and zooming to the NY state package layer extent just zooms to NY and not NY and also a null island with everything being tiny on screen – you've done the right thing.
Great progress! A few comments...
Some county source projections look off when viewing the New York state GPKG file in QGIS:
Compared to what NYSDOT says:
To something more like:
To generate that list I looked at your Makefile dependencies and did some text selection magic in BBedit as they all had the same pattern / character alignment. If you missed a dependency, it's FIPS is also missing above ;)
See screenshot at the bottom for example of what this larger exclusion looks like.
To get these I'm opening the SHP up in QGIS and layer's CRS and copying out the PROJ def which ORG knows how to deal with. But strip out the
In the middle (subset of "south"):
For example, Broome source has
An aside: NY state composite with the updated NOT SQL clause:
OK, I just pushed some updates that should rectify (to my eye) most of these weirdly projected counties (finally figured out how to color the counties separately in QGIS).
I'm not sure I understood your note about the
I'm also not sure if the patchy shapes in one of your screenshot was just an artifact of the incorrect SRS's, or something else — I tried playing around w/ feature blending modes to see if there were counties hiding under other counties, or something, but didn't see anything obvious...
The county filter and projections look good to me now!
My comment about