CategoryTools

At least 2.5 percent of the land area in Chicago is covered in parking lots and garages

Here’s how I know that at least 2.5 percent of the land area in Chicago is covered in parking lots and garages, as of February 5, 2017.

That’s a lot of polluted water runoff.

I grabbed the land area of 227.3 from the Wikipedia page.

I grabbed all the parking lots from OpenStreetMap via Metro Extracts, which is going to be the most complete map of parking lots and garages.

Volunteer mappers, including me, drew these by tracing satellite imagery.

With the parking lots data in GIS, I can count their area in square feet, which comes out to 160,075,942.42. Convert that to square miles and you get 5.74.

5.74/227.3*100 = 2.5 percent

The last snapshot of parking lot data I have is from February 2016, when only 3.39 square miles of parking lots have been drawn.

There are still many more parking lots to be drawn!

Essential apps for traveling in parts of Europe

Train Radar

The Train Radar in Reisplanner Xtra (from NS, the Dutch intercity train operator) is a fun feature to show you trains nearby. The rest of the app is essential for efficient use of NS trains.

I’ve used a bunch of apps that are necessary when you’re traveling within and between countries in the parts of Europe I’m staying in an visiting this year.

The first app you should install is maps.me (iOS, Android, Amazon). It stores maps offline by downloading them from OpenStreetMap. Before leaving for the next city, download it on wifi! Each city takes up 25-60 MB on your phone, and it’s easy to delete a city’s map after you depart. This app is super fast, looks nice, has offline route planning, and can show any area in the world.

Travel apps for the Netherlands

  • Reisplanner Xtra, is essential because it has a journey planner for traveling within the country. It also shows real-time information, and even has a map of all the trains running in the country at that moment. It lists real-time OV-fiets bike availability.
  • NS International, for looking up timetables for trains between the Netherlands and France, Germany, and Belgium. You can’t buy tickets in the app, but it will link you to a shopping cart on the NS International website.
  • 9292.nl, journey planner app for all public transport in the Netherlands. It doesn’t have network maps, though, if you’re only interested in where the Rotterdam Metro goes.
maps.me gets data from OpenStreetMap, the wiki-style map that regular people around the world edit (including myself). The map improves as more people add more information!

maps.me gets data from OpenStreetMap, the wiki-style map that regular people around the world edit (including myself). The map improves as more people add more information!

Travel apps for Germany

  • DB Navigator, this has all public transport in Germany, including intercity trains. It even has intercity trains for so many other countries, regardless if that train has service in Germany. When you look up timetables for trains outside Germany, it will rarely be able to show you the price, but just seeing the schedule, and what trains are available, is important. You can buy tickets within the app, and use the app as a mobile ticket.

Other travel apps

  • Rome2rio, is remarkable because it will show you all ways to get between two cities, and it works worldwide. It incorporates timetables and maps from local transit systems, intercity coach buses, intercity trains, flights, and driving. It’s multimodal, too. It won’t book tickets, but it’s the only service I know of that focuses on showing the multitude of options – simultaneously, with prices! – for future travel planning. And it’s super fast – I think it’s getting results before you even push the “search” button.
Rome2rio showing directions between Stockholm and Malmo

Rome2rio shows results for all modes (and combined modes) between two cities, here listing 11 options on trains, buses, cars, and plans between Stockholm and Mälmo, Sweden.

  • Skyscanner, this flight-finding service has more intra-Europe airlines than services popular in the United States (like Hipmunk, Orbitz, and KAYAK).
  • Captain Train is a continental train ticketing company with a nice app that will sell you tickets for service within and between many countries.
  • Voyages-sncf, is useful if you’ll be taking fast or regular intercity trains in France, but I don’t believe it has mobile ticketing. However, you can buy tickets in the app or on the website and pick up the tickets at a vending machine at many train stations in France. This is where I bought a Thalys (high-speed train) ticket; it’s better than NS International and the Belgian equivalent from SNCB.
  • United, this airline has implemented a superior entertainment system. I call it “Netflix in the sky”. To be clear, Netflix isn’t involved. It works like this: Install the United app on your device, and then connect to the airplane’s wifi network. There’s a server in the plane that has a lot of movies and TV shows, and these stream directly to your device. This is especially useful in United’s older 767 planes that don’t have seatback screens (IFE).

What apps do you recommend and why?

Oh, how Chicago land use is controlled by spot zoning

If you only had a zoning map to try and understand how the different blocks in the City of Chicago relate to their neighborhoods and the city at large, you might have the idea that the city has no neighborhoods, but is actually a collection of tiny, randomly dispersed zones of differing land uses.

And then when you walked those areas you’d find that the zones, which attempt to prescribe a land use, at least nominally, don’t have anything to do with the restaurant, housing, and commercial building mix of uses actually present.

No plan would have been devised to create a map like this.

Over the last five years, and surely over the last 14, the City of Chicago has been divided (really, split) into an increasing number of distinct zoning districts.

The city’s zoning map is updated after each monthly city council meeting, to reflect the numerous changes that the 50 alders have approved individually. (Their collective approval occurs unanimously in an omnibus bill.)

Every few months I ask the Chicago Department of Innovation and Technology (DoIT) for the latest zoning map, in the form of a shapefile (a kind of file that holds geographic information that can be analyzed by many computer programs). While Chicago has one of the country’s best open data offerings, some datasets, like zoning, don’t get updated in the catalog.

There are two ways I can analyze and present the data about the quantity of zoning districts. Both, however, show that the number of distinct zoning districts has increased. This means that the city is divided even more finely than it was just six months ago.

Analysis 1: Period snapshots

I have the zoning shapefile for five periods, snapshots of the city’s zoning map at that time. From August 2012 to now, May 2016, the number of discrete zoning districts (the sum of all B3-5, RS-1, DX-7, etc. zoning classes) has increased 7.8 percent.

Period Zoning districts change

August 2012

11,278

September 2014

11,677

3.42%

June 2015

11,918

2.02%

November 2015

12,015

0.81%

May 2016

12,162

1.21%

I collect the period snapshots to show the history of zoning at a specific address or building in Chicago, which is listed on Chicago Cityscape. For example, the zoning for the site of the new mixed-use development in Bucktown that includes a reconstructed Aldi has changed four times in four years.

aldi zoning history

Analysis 2: Creation date

The zoning shapefiles also have the date at which a zoning district was split or combined to create a new district, either with a different zoning class (RT-4, C1-1, etc.) or a different shape.

With the most recent zoning shapefile I can tell how many new zoning districts were split or combined and a record representing it was added to the list. The records start in 2002, and by the end of the year 7,717 records were created.

The following year, only 14 records were added, and in 2004, only 6. The Chicago City Council adopted a rewritten zoning code in 2004, and I guess that the zoning map was modified prior to adoption. After 2004, the number of new zoning districts picks up:

year zoning districts added by splitting/combining cumulative change

2002

7717

7717

2003

14

7731

0.18%

2004

6

7737

0.08%

2005

267

8004

3.45%

2006

497

8501

6.21%

2007

561

9062

6.60%

2008

592

9654

6.53%

2009

304

9958

3.15%

2010

245

10203

2.46%

2011

271

10474

2.66%

2012

277

10751

2.64%

2013

299

11050

2.78%

2014

397

11447

3.59%

2015

367

11814

3.21%

2016

173

11987

1.46%

none listed

175

12,162

It seems there’s a light relationship between the recession that started in 2008 and the number of zoning changes made. There are more made annually before the recession than after it. It actually seems to track with building permits (sorry, no chart handy).

The U.S. DOT should collaborate with existing “National Transit Maps” makers

The U.S. DOT demonstrated one idea for how a National Transit Map might look and work at a conference in February.

The Washington Post reported this month that the United States Department of Transportation is going to develop a “National Transit Map” because, frankly, one doesn’t exist. The U.S. DOT said such a map could reveal “transit deserts” (the screen capture above shows one example from Salt Lake City, discussed below).

Secretary Anthony Foxx wrote in an open letter to say that the department and the nation’s transit agencies “have yet to recognize the full potential” of a data standard called the General Transit Feed Specification that Google promoted in order to integrate transit routing on its maps. Foxx described two problems that arose out of not using “GTFS”.

  1. Transit vehicles have significantly greater capacity than passenger cars, but are often considered just vehicles because we are unable to show where and when the transit vehicles are scheduled to operate. The realistic treatment of transit for planning, performance measures, and resiliency requires real data on transit system operations.
  2. One of the most important social values of transit is that it makes transportation available to people who do not have access to private automobiles, and provides transportation options for those who do. Yet, we cannot describe this value at a national level and in many regions because we do not have a national map of fixed transit routes.

“The solution is straightforward”, Foxx continued, “[is] a national repository of voluntarily provided, public domain GTFS feed data that is compiled into a common format with data from fixed route systems.”

The letter went on to explain exactly how the DOT would compile the GTFS files, and said the first “collection day” will be March 31, this week. As of this writing, the website to which transit agencies must submit their GTFS files is unavailable.

What Foxx is asking for has already been done to some degree. Two national transit maps and one data warehouse already exist and the DOT should engage those producers, and others who would use the map, to determine the best way to build a useful but inexpensive map and database. Each of the two existing maps and databases was created by volunteers and are already-funded projects so it would make sense to maximize the use of existing projects and data.

“Transitland” is a project to host transit maps and timetables for transit systems around the world. It was created by Mapzen, a company funded by Samsung to build open source mapping and geodata tools. Transitland is also built upon GTFS data from agencies all over the world. Its data APIs and public map can help answer the question: How many transit operators serve Bay Area residents, and what areas does each service?

For the United States, Transitland hosts and queries data from transit agencies in 31 states and the District of Columbia. In Washington, D.C., Transitland is aware of four transit agencies. It’s a great tool in that respect: Not all of the four transit agencies are headquartered in D.C. or primarily serve that city. The app is capable of understanding spatial overlaps between municipal and regional geographies and transit agencies.

Transitland has a “GUI” to show you how much transit data it has around the world.

“Transit Explorer” is an interactive map of all rail transit and bus rapid transit lines in the United States, Mexico, and Canada. Yonah Freemark, author of The Transport Politic, created the map using data culled from OpenStreetMap, the National Transit Atlas Database (administered by the DOT and which shows fixed-guideway transit), and his own research. I wrote the custom JavaScript code for the Leaflet-powered map.

No other agency or project has collected this much data about fixed-guideway transit lines in any of the three countries, since the map includes detailed information about line lengths, ridership, and other characteristics that are not included in GTFS data. Transit Explorer, though, does not include local bus service or service frequencies, which the DOT’s map may if it incorporates the full breadth of GTFS data.

Transit Explorer also goes a step further by providing data about under construction and proposed fixed-guideway transit lines, which is information that is very relevant to understanding future neighborhood accessibility to transit, but which is not available through GTFS sources.

Finally, “GTFS Data Exchange” is a website that has been storing snapshots of GTFS feeds from agencies around the world for almost a decade, or about as long as GTFS has been used in Google Maps. The snapshots allow for service comparisons of a single agency across time. For example, there are over 100 versions of the GTFS data for the Chicago Transit Authority, stretching back to November 2009; new versions are added – by “cta-archiver” – twice a month.

Josh Cohen, writing in Next City, highlighted the significance of Google’s invention of GTFS, saying, “Prior to the adoption of GTFS, creating such a map would’ve been unwieldy and likely produced an out-of-date product by the time it was completed.” The DOT’s own National Transit Atlas Database includes only fixed-guideway (a.k.a. trains) routes, and hasn’t been updated since 2004.

Not all GTFS feeds are created equal, though. Some transit agencies don’t include all of the data, some of which is optional for Google Map’s purpose, that would make the National Transit Map useful for the spatial analysis the DOT intends. Many agencies don’t include the “route shapes”, or the geographic lines between train stations and bus stops. Researchers are able to see where the vehicles stop, but not which streets or routes they take. Foxx’s letter doesn’t acknowledge this. It does, however, mention that transit agencies can use some federal funds to create the GTFS data.

David Levinson, professor at the University of Minnesota, believes the map will bias coverage (geographic reach of transit service) over frequency (how many buses are run each day that someone could ride).

The U.S. DOT’s chief data officer, Dan Morgan, whom I met at Transportation Camp 2015 in Washington, D.C., presented at the FedGIS Conference this year one idea to demonstrate coverage and frequency in Salt Lake City, using the GTFS data from the Utah Transit Authority.

Levinson also tweeted that it will be difficult for a national map to show service because of the struggles individual transit providers have symbolizing their own service patterns.

Foxx’s letter doesn’t describe how planners will be able to download the data in the collection, but whichever app they build or modify will cost money. Before going much further, and before spending any significant funds, Foxx should consult potential users and researchers to avoid duplicating existing projects that may ultimately be superior resources.

Foxx can also take advantage of “18F” a new agency within the General Services Administration to overcome government’s reputation for creating costly and difficult to use apps. The GSA procures all kinds of things the federal government needs, and 18F may be able to help the DOT create the National Transit Map (and database) in a modern, tech and user-friendly way – or write a good RFP for someone else to make it.

Look for the National Transit Map this summer.

Converting a transit agency’s GTFS to shapefile and GeoJSON with QGIS

Many years ago I wrote a tutorial on how to use an ArcGIS plugin to convert a transit agency’s GTFS package – a group of files that describe when and where their buses and trains stop – into files that could easily be manipulated by popular GIS desktop software.

That was so long ago, before I became an expert in using QGIS, a free and open source alternative to ArcGIS.

This tutorial will show you how to convert GTFS to a shapefile and to GeoJSON so you can edit and visualize the transit data in QGIS.

Prerequisites

First you’ll need to have QGIS installed on your computer (it works with Linux, Mac, and Windows). Second you’ll need a GTFS package for the transit agency of your choice (here’s the one for Pace Suburban Bus*, which operates all suburban transit buses in Chicagoland). You can find another transit agency around the world on the GTFS Data Exchange website.

Section 1: Let’s start

  1. Open QGIS.
  2. Load your GTFS data into the QGIS table of contents (also called the Layers Panel). Click Layer>Add Layer>Add Delimited Text Layer. You will be adding one or two files depending on which ones are provided.

    QGIS add delimited text layer

    Add delimited text layer.

  3. Now, here it can get tricky. Not all transit agencies provide a “shapes.txt” file. The shapes.txt file draws out the routes of buses and trains. If it’s not provided, that’s fine, but if you turn them into routes based on the stops.txt data, then you will have funny looking and impossible routes.

    QGIs browse for the stops.txt file

    Browse for the stops.txt file

  4. Click on “Browse…” and find the “stops.txt”. QGIS will read the file very quickly and determine which fields hold the latitude and longitude coordinates. If its determination is wrong, you can choose a different “X field” (longitude) and “Y field” (latitude).
  5. Click “OK”. A new dialog box will appear asking you to choose a coordinate reference system (EPSG). Choose or filter for “WGS 84, EPSG:4326”. Then click “OK”.
  6. The Pace bus stops in the Chicagoland region are now drawn in QGIS!

    Pace bus stops are shown

    Pace bus stops are shown

  7. If the GTFS package you downloaded includes a “shapes.txt” file (that represents the physical routes and paths that the buses or trains take), import that file also by repeating steps 4 and 5.

Section 2: Converting the stops

It’s really easy now to convert the bus or train stops into a shapefile or GeoJSON representing all of those points.

  1. Right-click the layer “stops” in the table of contents (Layers Panel) and click “Save As…”.
  2. In the “Save vector layer as…” dialog box, choose the format you want, either “ESRI Shapefile” or “GeoJSON”. **
  3. Then click “Browse” to tell QGIS where in your computer’s file browser you want to save the file. Leave the “CRS” as-is (EPSG:4326).

    Convert the bus stops to a shapefile or GeoJSON.

    Convert the Pace bus stops to a shapefile or GeoJSON.

  4. Then click “OK” and QGIS will quickly report that the file has been converted and saved where you specified in step 3.

Section 3: Converting the bus or train routes

The “shapes.txt” file is a collection of points that when grouped by their route number, show the physical routes and paths that buses and trains take. You’ll need a plugin to make the lines from this data.

  1. Install the plugin “Points to Paths”. Click on Plugins>Manage and Install Plugins… Then click “All” and search for “points”. Click the “Points to Paths” plugin and then click the “Install plugin” button. Then click “Close”.

    Install the Points to Paths plugin.

    Install the Points to Paths plugin.

  2. Pace bus doesn’t provide the “shapes.txt” file so we’ll need to find a new GTFS package. Download the GTFS package provided by the Chicago Transit Authority, which has bus and rail service in Chicago and the surrounding municipalities.
  3. Load the CTA’s “shapes.txt” file into the table of contents (Layers Panel) by following steps 4 and 5 in the first section of this tutorial.  Note that this data includes both the bus routes and the train routes.

    QGIS load CTA bus and train stops

    Import CTA bus and train stops into QGIS

  4. Now let’s start the conversion process. Click on Plugins>Points to Paths. In the next dialog box choose the “shapes” layer as your “Input point layer”.
  5. Select “shape_id” as the field with which you want to “Point group field”. This tells the plugin how to distinguish one bus route from the next.
  6. Select “shape_pt_sequence” as the field with which you want to “Point order field”. This tells the plugin in what order the points should be connected to form the route’s line.
  7. Click “Browse” to give the converted output shapefile a name and a location with your computer’s file browser.
  8. Make sure all  of the options look like the one in this screenshot and then click “OK”. QGIS and the plugin will start working to piece together the points into lines and create a new shapefile from this work.

    These are the options you need to set to convert the CTA points (stops) to paths (routes).

    These are the options you need to set to convert the CTA points to paths (routes).

  9. You’ll know it’s finished when the hourglass or “waiting” cursor returns to a pointer, and when you see a question asking if you would like the resulting shapefile added to your table of contents (Layers Panel). Go ahead and choose “Yes”.

    QGIS: CTA bus and train points are converted to paths (routes)

    The CTA bus and train points, provided in a GTFS package, have been converted to paths (routes/lines).

  10. Now follow steps 1-4 from Section 3 to convert the routes/lines data to a shapefile or GeoJSON file.**

Notes

* As of this writing, the schedules in Pace’s GTFS package are accurate as of January 18, 2016. It appears their download link always points to the latest version. Transit schedules typically change several times each year. Pace says, “Only one package is posted at any given time, typically representing Pace service from now until a couple of months in the future. Use the Calendar table to see on which days and dates service in the Trips table are effective.”

** Choose GeoJSON if you want to show this data on a web map (like in Leaflet or the Google Maps API), or if you want to share the data on GitHub.

Updated: 311 is back in the spotlight after 3 years

Updated October 21: Rahm has dropped the plan to privatize 311, but explained that the offer was less about saving $1 million annually than it was to upgrade the tech. I still don’t think it was explained well enough – or challenged enough by City Council – why a privatization was the “only” way to get an upgrade worth $25-50 million, or why the upgrade would cost that much. Then, there’s still the open question as to what happened to the RFP in 2014, looking for bidders to create a new 311 system. I’m also curious if any of the nascent civic-oriented CRM and Open311 startups would have a reasonable chance at responding to an RFP or privatization effort, or if the RFP process would largely exclude new or small players. 

Last week, for budget “season” in Chicago, Mayor Rahm Emanuel proposed privatizing the 311 system – where citizens and aldermen request services from any city department, and citizens get information about city services – as a way to pay for the technology upgrade the system desperately needs.

There are over 300 service request types (codes), of which many are available to the public (the rest being for internal or aldermanic use). Here’s the full list of codes and the department that administers or manages the requests.

The topic of analyzing 311 data came up tonight at ChiHackNight, and I talked to a DePaul University Student interested in using their predictive analytics study on this rich (maybe) dataset.

I brought them up to speed on the changes made to the 311 technology system and created this “status” document to demonstrate the wild and whacky year of changes in 2012, and the stagnation since then. I’m publishing this because I also want to collect ideas and feedback about things I don’t know regarding the progress in redeveloping the tech that powers Chicago’s 311.

311 technology chronology

2012

Code for America fellows come to Chicago and work with DoIT to develop 13 service request types (codes) for Open311, a layer on 311 that enables third-party apps to submit new service requests – with photos. See what other cities have adopted Open311.

I pled with the Chief Technology Officer at the time, John Tolva, holding a new position in the mayor’s office, to enable 5 of the bicycle and pedestrian-related codes in the Open311 system, so that I can build apps for Grid Chicago, and later, Streetsblog Chicago, readers to request city services that impact the safety and quality around walking and biking.

Ben Sheldon, one of the four Code for America fellows, made SuperMayor.io, and it’s one of the few Open311-based apps that’s still working (most of the apps linked to from this Smart Chicago Collaborative blog post are dead).

2013

The City of Chicago releases an RFP to remake the 311 system (September). One aspect of operating the system I noticed that better tech could probably have a big impact on is the number of service request taken by phone: 74%!

Channels through which 311 service requests are submitted

According to the RFP issued in 2013, 74% of service requests are taken by phone. Only about 6% are done through the web.

2014

Companies respond to the RFP (I assume). Are these responses hosted anywhere? Smart Chicago Collaborative made Chicago Works For You, a dashboard that’s also  the only Chicago + Open311 map.

The RFP never made it past “Step 4” in the Bid Tracker, or, “Short List Determination”. The Bid Tracker is really unhelpful at this point, though, because it doesn’t mark the date at which Step 4 was reached.

Bid tracker for the 311 RFP

The helpful (to a point) Bid Tracker for the 311 RFP.

2015

Mayor Emanuel announces a proposal to privatize the 311 system, including the technology and the staff, to be able to pay for the tech upgrade. Emanuel says it would save the city about $1 million annually.

Aldermen don’t like this. While I haven’t read up on their specific complaints, I believe they have to do with the quality of the jobs that would exist under a private operator.

Currently the 73** employees work for the city and have benefits like healthcare and probably some retirement assistance. The new jobs could be, well, anything, and if they’re like other call centers, probably pay less and could have worse benefits.

There’s also the question of whether anyone else can actually do the same (or better) job for less money (a question that 6th Ward Alderman Roderick Sawyer raised). That means someone other than people in the mayor’s office need to be able to get a detailed look at the expenses of the 311 call center and tech.

Andy Shaw questions why the privatization proposal is coming up now: “The timing is odd because the administration recently sent an enlightened privatization ordinance to the Council for approval, so it’s logical for the city to wait until it’s analyzed, and then adopted, before embarking on new privatization initiatives” and “the ordinance has 40 aldermanic co-sponsors but hasn’t been heard in committee yet, so it’s premature to consider privatizing 3-1-1”.

Shaw suggests using the do-nothing legally-separate-entity Chicago Infrastructure Trust to upgrade the service. (The new board members Emanuel installed this year have “set an ambitious goal”, Shaw said, to convert the city’s streetlights to something more energy efficient. It would likely work by splitting the cost savings with a private contractor.

** The city’s salary dataset on the open data portal lists 56 employees with “311” in the job title. They collectively earn $3,519,732.00 annually.

Thank you to Derek Eder, Eric Sherman, George Nakhleh, and Dan O’Neil for the discussion and links.

Updated Monday, Oct. 12 to add quotes from Better Government Association’s Andy Shaw (a former investigative reporter for a TV station).

How to make a map of places of worship in Cook County using OpenStreetMap data

The screenshot shows the configuration you need to find and download places of worship in Cook County, Illinois, using the Overpass Turbo website.

If you’re looking to make a map of churches, mosques, synagogues and other places of worship, you’ll need data. The Yellow Pages won’t help because you can’t download that. And Google Maps doesn’t let you have a slice of their database, either. That’s where OpenStreetMap comes in. It’s a virtual planet that anyone can edit and anyone can have for free.

First we need to figure out what tag people use to identify these places. Sometimes on OSM there are multiple tags that identify the same kind of place. You should prefer the one that’s either more accurate (and mentioned as such in the wiki) or widespread.

The OSM tag info website says that editors have added over 1.2 million places of worship to the planet using “amenity=place_of_worship”.

Now that we know which tag to look for, we need an app that will help us get those places, but only within our desired boundary. Open up Overpass Turbo, which is a website that helps construct calls to the Overpass API, which is one way to find and download data from OSM.

In the default Overpass Turbo query, there’s probably a tag in brackets that says “[amenity=drinking_fountain]”. Change that to say “[amenity=place_of_worship]” (without the quotes). Now change the viewport of the map to show only the area in which you want Overpass Turbo to look for these places of worship. In the query this argument is listed as “({{bbox}})”.

The map has a search bar to find boundaries (cities, counties, principalities, neighborhoods, etc.) so type in “Cook County” and press Enter. The Cook County in Illinois, United States of America, will probably appear first. Select that one and the map will zoom to show the whole county in the viewport.

Now that we’ve set the tag to [amenity=place_of_worship] and moved the map to show Cook County we can click “Run”. In a few seconds you’ll see a circle over each place of worship.

It’s now simple to download: Click on the “Export” button and click “KML” to be able to load the data into Google Earth, “GeoJSON” to load it into a GIS app like QGIS, or “save GeoJSON to gist” to create an instant map within GitHub.

The best way to store directions on your smartphone is low tech

map of southern illinois as seen in the OsmAnd app

OsmAnd has great offline mapping features but it was tedious to ensure I had all of the maps at the desired zoom levels for the three-city bike ride in southern Illinois (pictured).

My friend is going to pick up a unique bicycle in Ohio and ride it back to Chicago. He designed a good route on Google Maps but now he needs to save it to his smartphone so he doesn’t have to constantly load directions and use data and waste battery life.

I gave him these instructions:

The best way to get a mobile view of the route is to use the Google Maps print feature and save it as a PDF. Then transfer that PDF to your phone through the Dropbox app. Then, in the Dropbox app, mark the PDF file as a favorite so that it’s stored offline, onto the phone.

There’s probably an app that can do what he wants, but I don’t know about it. There are hundreds of “maps” apps to sort through in each the App Store for iOS and the Play Store for Android.

In fact, I’ve downloaded OsmAnd, an offline maps app, for my Android tablet. I installed it and tried to learn how to use it in order to follow a downstate, intercity bike camping route. The app, though, required that you zoom in to each part of the map you wanted to store and then press “download”.

 

I spent 30 minutes downloading parts of the map, manually panning to the next section, before I decided to instead obtain one of the Illinois Department of Transportation’s regional bike maps and just draw it on there and write out a “cue sheet” (turn by turn directions).

Why the Slow Roll Chicago working group uses GitHub to collaborate

When the Slow Roll Chicago project in the transportation breakout group began in December at Hack Night, the emails started flying right away.

This was mainly because there was a lot to say at the start, as we needed to agree on the group’s mission and plan.

Problems using email started immediately, though. Not only were there many emails going back and forth among people listed on the TO and CC fields, there were people who weren’t able to take part in these discussions.

That happened because it was difficult to keep track of who had been added to the discussion and who hadn’t, especially when it came to integrating new members of the group.

I wanted to overcome these problems by using a proper collaboration tool.

Email wasn’t just limiting our discussion quality and member inclusion, it was also limiting file storage, file sharing, and file versioning (which file is the latest?). Email has tended to demand a lot of attention, and there’s a lot of wasted time typing responses. I wanted to use a tool that didn’t have such demands, and that helped organize responses into actionable requests and delegation.

Using email made it impossible to see what tasks people were working on, and the progress they were making at any given moment.

Finally, email tends to be private but our work needed to be public so that it could be independently verified but also replicated for use in other locales.

I believe that it’s easier to train people on how to use a new tool well than to retrain on how to use an existing tool – email – better.

GitHub has solved all of these problems for our group while also creating a secure and versioned programming code storage system for the final outcome: a website.

Hack Night being a tech-oriented meetup is a good reason to use and teach this modern tool widely used by people in technology industries. Many of our members are still learning it but they have support from people within our group and from others who attend Hack Night.

GitHub handles our discussions, task assignments, task progress, notes, and files. Here’s how:

When you want to discuss a new idea, like using dynamic images to show what a building could look like under certain conditions, you would make a new “issue”, titled, “Use dynamic images to show the user some building design possibilities”. Use rich text and images in the issue to describe and visualize the idea.

GitHub has granular notifications settings that alert project members to this new “issue” after which they can respond to your idea. After it’s decided that the issue should be resolved in a specific way, you can assign the issue a desired milestone (a future project version) and project members.

One milestone could be “Preview to the management team” which is a previously-discussed status that should happen in a couple weeks. A second milestone could be “Post-launch” – things to finish after launching the product – that’s defined offline.

Each milestone tracks the issues that you’ve associated with it so you can see progress. When the assigned members finish a task, they “resolve” the issue by closing it.

Need documentation? For many coding or GIS projects, a data dictionary may be necessary and GitHub provides each project repository with a wiki in which you would describe how the project is set up, and what certain fields or values mean.

Finally, GitHub can store files – any kind, and as many versions. If you need to update a CSV file of street addresses for the project, just make the edits in your preferred editor on the desktop and then “commit” your changes with a short description of what you changed. Sync this commit back to the repository so that all project members now have access to the file.

Use Turf to perform GIS functions in a web browser

Turf's merge function joins invisible buffers around each Divvy station into a single, super buffer.

Turf’s merge function joins invisible buffers around each Divvy station into a single, super buffer –all client-side, in your web browser.

I’m leading the development of a website for Slow Roll Chicago that shows the distribution of bike lane infrastructure in Chicago relative to key and specific demographics to demonstrate if the investment has been equitable.

We’re using GitHub to store code, publish meeting notes, and host discussions with the issues tracker. Communication is done almost entirely in GitHub issues. I chose GitHub over Slack and Google Groups because:

  1. All of our research and code should be public and open source so it’s clear how we made our assumptions and came to our conclusions (“show your work”).
  2. Using git, GitHub, and version control is a desirable skill and more people should learn it; this project will help people apply that skill.
  3. There are no emails involved. I deplore using email for group communication.*

The website focuses on using empirical research, maps, geographic analysis to tell the story of bike lane distribution and requires processing this data using GIS functions. Normally the data would be transformed in a desktop GIS software like QGIS and then converted to a format that can be used in Leaflet, an open source web mapping library.

Relying on desktop software, though, slows down development of new ways to slice and dice geographic data, which, in our map, includes bike lanes, wards, Census tracts, Divvy stations, and grocery stores (so far). One would have to generate a new dataset if our goals or needs changed .

I’ve built maps for images and the web that way enough in the past and I wanted to move away from that method for this project and we’re using Turf.js to replicate many GIS functions – but in the browser.

Yep, Turf makes it possible to merge, buffer, contain, calculate distance, transform, dissolve, and perform dozens of other functions all within the browser, “on the fly”, without any software.

After dilly-dallying in Turf for several weeks, our group started making progress this month. We have now pushed to our in-progress website a map with three features made possible by Turf:

  1. Buffer and dissolving buffers to show the Divvy station walk shed, the distance a reasonable person would walk from their home or office to check out a Divvy station. A buffer of 0.25 miles (two Chicago blocks) is created around each of the 300 Divvy stations, hidden from display, and then merged (dissolved in traditional GIS parlance) into a single buffer. The single buffer –called a “super buffer” in our source code – is used for another feature. Currently the projection is messed up and you see ellipsoid shapes instead of circles.
  2. Counting grocery stores in the Divvy station walk shed. We use the “feature collection” function to convert the super buffer into an object that the “within” function can use to compare to a GeoJSON object of grocery stores. This process is similar to the “select by location” function in GIS software. Right now this number is printed only to the console as we look for the best way to display stats like this to the user. A future version of the map could allow the user to change the 0.25 miles distance to an arbitrary distance they prefer.
  3. Find the nearest Divvy station from any place on the map. Using Turf’s “nearest” function and the Context Menu plugin for Leaflet, the user can right-click anywhere on the map and choose “Find nearby Divvy stations”. The “nearest” function compares the place where the user clicked against the GeoJSON object of Divvy stations to select the nearest one. The problem of locating 2+ nearby Divvy stations remains. The original issue asked to find the number of Divvy stations near the point; we’ll likely accomplish this by drawing an invisible, temporary buffer around the point and then using “within” to count the number of stations inside that buffer and then destroy the buffer.
Right-click the map and select "Find nearby Divvy stations" and Turf will locate the nearest Divvy station.

Right-click the map and select “Find nearby Divvy stations” and Turf will locate the nearest Divvy station.

* I send one email to new people who join us at Open Gov Hack Night on Tuesdays at the Mart to send them a link to our GitHub repository, and to invite them to a Dropbox folder to share large files for those who don’t learn to use git for file management.

© 2017 Steven Can Plan

Theme by Anders NorénUp ↑