I'm trying to download the latest congressional district files from here:
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.
Solved! Go to Solution.
You could query the Esri layer, too.
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.
Thanks, Josh! How can I download the Living Atlas data? I don't see a way.
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 .
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!
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.
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!
You could query the Esri layer, too.
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.
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.