Select to view content in your preferred language

Can't download Congressional District shapefile for 117th Congress

3127
13
Jump to solution
04-09-2021 08:26 AM
SolLederman
Emerging Contributor

I'm trying to download the latest congressional district files from here:

https://hub.arcgis.com/datasets/7a29abb3bc1d4acf86903560dd95b98f_0?geometry=-179.861%2C-16.763%2C-17...

The download link is broken.

I've also tried fetching the shapefile via curl, using the url that shows up in the javascript console.

$ curl "https://opendata.arcgis.com/datasets/7a29abb3bc1d4acf86903560dd95b98f_0.zip"

{"status":"Failed/rescheduled","type":"Map Service","serviceUrl":"https://geo.dot.gov/server/rest/services/NTAD/Congressional_Districts/MapServer/0"}

Can someone help to fix this or give me an alternate path to the shape data? Thanks.

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

You could query the Esri layer, too.

- Josh Carlson
Kendall County GIS

View solution in original post

13 Replies
jcarlson
MVP Esteemed Contributor

If you just want the equivalent data, you can get this from the Living Atlas on AGOL. Getting that download link to work (I can't get it either) would probably require the data owner to change some settings on their end.

- Josh Carlson
Kendall County GIS
SolLederman
Emerging Contributor

Thanks, Josh! How can I download the Living Atlas data? I don't see a way.

0 Kudos
jcarlson
MVP Esteemed Contributor

If you're working with the service in desktop software, you should be able to export the features. If you want to skip that step and just directly download a shapefile, you'd need to find a direct download link that works, perhaps outside of the various Esri sites.

I've looked around at the usual places (data.gov, US Census shapefiles) and do not see the 117th districts as having been added yet. You might try contacting the user who manages the Living Atlas layer to find out more about the original source .

- Josh Carlson
Kendall County GIS
SolLederman
Emerging Contributor

Thanks, Josh! I called ESRI and they gave me the email of someone on the Living Atlas Team who might be able to at least direct me to someone who could help. If you have a contact on that team I'd love to have it.

Like you, I looked in the usual places and I googled a bunch and I couldn't find the dataset anywhere else.

It sounds like worst case is that I purchase a $100/year non-commercial license to the software and, as you say, I download the features I want.

Thanks again!

0 Kudos
jcarlson
MVP Esteemed Contributor

You need not purchase software just to get a copy of the data which ought to be downloadable anyway.

If you have a bit of know-how with a scripting language, you could fairly easily submit a series of queries to the REST endpoint and merge the outputs together. Python is my go-to for such things, together with the Pandas module.

I do not have any personal connections with the Esri staff, unfortunately, but they tend to be pretty helpful, so hopefully this gets worked out for you.

- Josh Carlson
Kendall County GIS
SolLederman
Emerging Contributor

I'm very comfortable with Python and APIs. But, the REST endpoint query link you provided goes to DOT and, when I query their endpoint I get an error. So, I'm back to waiting and hoping that someone at Living Atlas either has the shapefiles or has a contact at DOT that I can ask about them.

Keeping my fingers crossed.

Thanks!

jcarlson
MVP Esteemed Contributor

You could query the Esri layer, too.

- Josh Carlson
Kendall County GIS
SolLederman
Emerging Contributor

Oooh! That's very interesting. So, with enough queries, or one very broad query if it doesn't blow up, I could transfer all of the data to my local machine and then figure out how to turn it into a shape file, right? I have thousands of coordinate pairs to map to congressional districts so I prefer to download all of the data.

0 Kudos
jcarlson
MVP Esteemed Contributor

That's right! Not to toot my own horn, but there's a similar post related to "chunked" style queries I responded to here.

Outside of the ArcGIS Python API, GeoPandas can also read the JSON response from a URL query into geometry features.

- Josh Carlson
Kendall County GIS