openstates / openstates-geo

Source for state legislative district map tiles for openstates.org
MIT License
24 stars 12 forks source link

Switch to TigerRD18 source #28

Closed johnseekins closed 1 year ago

johnseekins commented 1 year ago

Data in https://www2.census.gov/geo/tiger/TIGER_RD18/ appears to be more correctly up to date than data we collected from the Redistricting Data Hub. This code switches us to using that data instead. And also includes steps to upload bulk boundary files to S3.

johnseekins commented 1 year ago

Two major concerns:

  1. Is this datasource relatively accurate (and how can we verify it)
  2. Are the manual districts (MD, NH, VT, etc.) correct?
NewAgeAirbender commented 1 year ago

I've got a few addresses that have been flagged as incorrect to test, I wouldn't know how without it being added to Mapbox. I think the manual ones look right

showerst commented 1 year ago

I just did a fresh checkout of this and poetry install, then did a poetry run scripts/get-shapefiles.py and got an error --

ModuleNotFoundError: No module named 'utils'

Possibly a missing file or dependency there?

johnseekins commented 1 year ago

I just did a fresh checkout of this and poetry install, then did a poetry run scripts/get-shapefiles.py and got an error --

ModuleNotFoundError: No module named 'utils'

Possibly a missing file or dependency there?

Missed adding a file. Dang git.

showerst commented 1 year ago

Thanks -- that worked. I"ll download these and run them through our (unrelated to OS) geo stack and see if I can verify that the districts look good. Probably wont' be until monday, so feel free to merge w/out my review.

showerst commented 1 year ago

@John Seekins -- I might be looking in the wrong spot here, so double check me, but:

showerst commented 1 year ago

Ah better yet here the generated geojson --

https://gist.github.com/showerst/78595589521f01f079063d71da5f7bb0

johnseekins commented 1 year ago

@john Seekins -- I might be looking in the wrong spot here, so double check me, but:

* I did a fresh checkout of out https://github.com/johnseekins/openstates-geo/tree/tigerrd18-source

* i did a poetry install, then ran `poetry run ./scripts/get-shapefiles.py` and `poetry run scripts/to-geojson.py`

* i looked at my output KS SLDU geojson, and it appears to be showing me the 2025 shapes. This is most visible if you pop the file into https://geojson.io/ and look in the bottom left corner; district 39 has an "r" shape instead of a moyai shape. https://ballotpedia.org/Redistricting_in_Kansas#District_maps

That's what I'm seeing with tests, too. I think we may need to add overrides for some jurisdictions.

showerst commented 1 year ago

Cool. I dropped my test case in the other bug, but FYI:

712 Main St, Scott City, KS 67871

[lat] => 38.480357
[lng] => -100.906731

Changes from 33 (now) to 39 (future), it's in the "r" shape of the district in the bottom left corner.