Category: Accessibility

Download GIS data from ArcGIS servers using a simple command

A lot of geospatial data (GIS) in the world is stored on ArcGIS MapServers, a part of the Esri “stack” of products that municipalities and other governments use to manage and publish GIS data.

A lot of people want that data, and not every government has enabled the ArcGIS data hub features that make it easier to get. For an example data hub, check out Cook County, Illinois.

If you have ArcGIS software on your Windows computer, then it can be pretty easy to plug in the map server URL and manipulate and extract the data.

For the rest of us who don’t have a very expensive license for that software, you can use a “command line” tool (written in Python) on any computer to download any layer of GIS data hosted on the ArcGIS MapServer and automatically convert it to GeoJSON.

Tutorial

You’ll need to install the Python package pyesridump, from the OpenAddresses GitHub repository, created by Ian Dees and other contributors.

Installing pyesridump is easy if you have pip installed, using the command pip install esridump.

The next thing you’ll need is the URL to a layer in a MapServer, and these are not easy to find.

Finding data to download

I can almost guarantee the county where you live has one. Before you continue, check to see if your county (or other jurisdiction) has the “open data portal” add-on to their ArcGIS stack.

A handful of suggestions:

  • Here are links to the open data portals enabled by Esri for Lake County, Illinois, and Broomfield County, Colorado.
  • A reader suggested looking for MapServers for jurisdictions around the world by looking through Esri’s portal of open data called ArcGIS Hub.
  • Use a search engine to search for the URL pattern that’s common to ArcGIS servers: paste “inurl:arcgis/rest/services” into a search engine. (You can also limit this search to a particular domain name, say, “chicago.gov”, by adding “site:chicago.gov” to the search query, making the full search query “inurl:arcgis/rest/services site:chicago.gov”.

Once you locate a dataset you want, you can find the MapServer URL under About>Data Source on the right side of the page.

I normally find them by looking at the HTML source code of a MapServer I already know about.

For this example I’ll use one of the GIS layers in the Cook County, Illinois, election service MapServer – here’s the layer for the Cook County commissioners districts.

Fetch the data

Once you have the URL the command is simple:

esri2geojson http://cookviewer1.cookcountyil.gov/ArcGIS/rest/services/cookElectnSrvc/MapServer/11 cookcounty_commissioners.geojson

  • The first term, esri2geojson tells your computer which program to load.
  • The second term is the URL of the MapServer URL.
  • The third term is the filename and location where you want to store the file. I prefer running the command “inside” the folder where I want the file to be stored. You can also specify a full path of the file. On a Mac this would look like ~/Users/username/Documents/GIS/projectname/cookcounty_commissioners.geojson

After you enter the command into your computer’s terminal, press enter. esri2geojson will report back once, after it finds and understands the MapServer URL you gave it. When it’s done, the command will “close” and your computer’s terminal will wait for the next command.

Do you have questions, or need some help? Leave a comment below.

Cataloging the city’s emails about what staff said regarding Laquan McDonald’s death

Screen grab from the released Laquan McDonald video

The City of Chicago released a trove emails spread over eight PDF files containing 3,000 pages, on New Year’s Eve, wherein city staff, including from the mayor’s office, police department, law department, discussed how they should handle countless requests from the media for information about the police shooting of Laquan McDonald.

In the middle of the night on October 20, 2014, Chicago police officer Jason Van Dyke shot 17-year-old Laquan McDonald 16 times, killing him.

Over a year later, a dashcam video of the shooting was released, sparking protests, theresignation of Chicago’s Police Chief, a federal investigation, and calls for the Mayor and State’s Attorney to resign.

I set to work that night reading as many as I could, and gathering strangers on Twitter to help read and catalog them.

This blog post is intended to point to the Google Sheet where we – over a dozen people who congregated here via Twitter – recorded the details of each message, including what it said, what we think the communicators meant, and what information was missing.

Read the Laquan McDonald emails catalog.

Links between Emanuel’s campaign donors and their building projects

The Tribune called out Emanuel’s appearance at a press conference as an endorsement of a locally-designed skyscraper (Studio Gang and bKL Architecture) to be built by Wanda, a Chinese development company – it has yet to receive any approval. Photo: Ted Cox, DNAinfo.

The Chicago Tribune reviewed the campaign contributions of Mayor Rahm Emanuel’s top donors and linked each donor to how it does business with Emanuel or the city. The article overall discussed how easy it is for Rahm to raise more money than what’s probably necessary to be elected a second time.

The Tribune graciously provided this data as a simple table which I’ve republished here in order to add links to building permit information from Chicago Cityscape. The website I’ve developed lists company and person names in an immediately searchable form. Currently there are over 90,000 companies, architects, and property owners that have received a building permit since 2010. Use the Illinois Sunshine database to find out who’s contributing to whom in the Chicago election.

Note: You’ll see “listed under [many] names” for several companies; this indicates that the Chicago building permit database uses different spellings, or the company has changed their name.

[table id=1 /]

Neither the article nor this table are meant to indicate any wrongdoing – campaign donations are public and it’s common to receive them from companies that do business in Chicago. It’s the extent that the donation appears to pay for favors or favoritism over other donors (which may be competing companies), or what’s right, that determines when immorality becomes an issue (a connection that’s hard to demonstrate).

Respect the corner!

Buildings on corners should have corner entrances or minimally deviate.

Contractors work on building the new entrance.*

The residential building on the northwest corner of Milwaukee Avenue and Halsted Street was built in 2003 with a first-floor commercial space with an entrance on the Milwaukee Avenue side. Normally this wouldn’t be such a big deal – Milwaukee is a busy street and this side of the street has a fair amount of foot traffic. But the other side of the building, on Halsted Street, faces one of two entrances to the Grand Blue Line subway station and a major transfer bus stop.

7-11 is moving into the building and have built a new entrance out of the corner space with floor-to-ceiling windows. Now it’ll be much easier for transit riders to get to a convenience store. The other advantage is the added visibility: seeing the entrance from far away, from all sides, saves milliseconds in our internal GPS processing time – make a bee-line to the entrance instead of “hunting” it down after you make your way in the general direction of the building.


View Larger Map

* You can see that there’s a step here so it’s not currently accessible. Originally this wasn’t the entrance so that makes sense. I don’t know what these contractors are doing but 7-11 must make the entrance accessible.

Going to worship at The Beer Temple takes too long

Minor suggestion to improve Elston-California-Belmont

A map of Belmont, Elston, California with lines and labels that show how I get to The Beer Temple and where I think the city should add car parking.

The Beer Temple opened two blocks from my house in Avondale last year, at 3185 N Elston Ave, on the six-way intersection of Belmont Avenue, Elston Avenue, and California Avenue. This intersection is beastly.

And it’s timed wrong. Since I live southwest of the great craft and imported beer store and it’s on the northwest corner of Elston (a diagonal street) and California, I have to cross twice. I make the first crossing, east-west across California at my street, and then walk north to the second crossing, north-south across Elston.

I cross at my street across California because there’s no light to wait for, and the crossing isn’t diagonal like my other option at Elston (which would mean I walk north, then diagonally south and east). Once I get to Elston, though, I’m screwed because the walk signal is about 15 seconds long but the wait for the next walk signal is about 90 seconds long.

It’s so long because the green for Elston is held for Elston traffic, but also held green for eastbound Belmont traffic that makes a right turn onto southeast-bound Elston. Instead of the walk signal being green for two phases of the cycle (for two of the three streets), it’s green for only one cycle: California’s.

This is because this six-way intersection is the less common type, the type with an island in the middle. It’s got the island because the three streets cross each other at different points and don’t share a common cross point. I’ve got to wait for two phases because Elston needs to stay green for Belmont traffic because you can’t have drivers waiting in the island area – too many cars may stack up and block cross traffic during another phase.

(At many intersections I would just cross whenever there’s a gap between fast-moving cars, but with six-way intersections you don’t always know from where a car will be speeding towards you.)

I get that, but that makes it suck for walking in this area. This design also makes it suck for people biking and driving to turn left from certain streets to other streets because they can’t make the left turn and keep on going. They make the left turn and then have to stop and wait for a second phase to keep going.

I’ve racked my mind for ideas on how to improve this intersection just mildly, in such a way that few would oppose (because that’s really the threshold you can’t cross to have a nice outcome in Chicago).

My idea? Add car parking in front of Dragon Lady Lounge in the “non-identified lane” there. It’s used as a travel lane, or a right-turn lane, depending on who’s driving and how they choose to maneuver their vehicle. It’s not needed for either because of the way traffic moves southbound on Elston past Dragon Lady Lounge and that Elston only has one travel lane in each direction on either side of this big intersection.

The parking would have the obvious benefit of putting customers closer to their destination, but would have the less obvious benefits of protecting people on the sidewalk, buffering noise and speeding vehicles from sidewalk users, and slow traffic past Dragon Lady Lounge when people are parking.