CategoryMaps

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.

What should this area in Chicago be called?

The area is generally bounded by Harrison Street or Congress Parkway, Dan Ryan Expressway or Desplaines Street, Roosevelt Road, and the Chicago River.

The area is generally bounded by Harrison Street or Congress Parkway, Dan Ryan Expressway or Desplaines Street, Roosevelt Road, and the Chicago River.

Currently it’s called the South Loop, which is a neighborhood name. It’s in the “Near West Side” community area. See how the City of Chicago mapped the “South Loop” in the past when it used to keep track of neighborhood boundaries.

I think it should have a new name. It should not be called the South Loop because the commonly identified center of the South Loop is probably somewhere between Roosevelt and Harrison, and Michigan Avenue and State Street, very far from this area. It just might be the Roosevelt CTA station, which has over 12,000 boardings a day.

Saying that you’re going to some business that’s west of the river and saying that the business is in the South Loop would confuse a lot of people as to what its nearby.

It’s more of an industrial and commercial area that gained a lot of new big box (faceless) retail in the 2000s, so very few people live there. There are several stores that exist that came decades before the big box outlets; for fabric, clothing, shoes, and suits. It’s probably these independent store owners that can point to an older neighborhood name as they were the center of consumer commerce in this area.

It’s easy to give it a new name. Most of the housing is north of Harrison Street. It’s difficult to figure out how many people live here because the block groups for this area include more than the area in question.

It’s easy to argue that because of the land uses, it really has no current identifiable “place” or pattern that attracts people. I’d like to know more about its history and, South Loop being a modern name, its previous names.

How to extract highways and subway lines from OpenStreetMap as a shapefile

It’s possible to use Overpass Turbo to extract any object from the OpenStreetMap “planet” and convert it from a GeoJSON or KML file to a shapefile for manipulation and analysis in GIS.

Say you want the subway lines for Mexico City, and you can’t find a GTFS file that you could convert to shapefile, and you can’t find the right files on Sistema de Transporte Colectivo’s website (I didn’t look for it).

Here’s how to extract the subway lines that are shown in OpenStreetMap and save them as a GIS shapefile.

This is my second tutorial to describe using Overpass Turbo. The first extracted places of worship in Cook County. I’ve also used Overpass Turbo to extract a map of campgrounds

Extract free and open source data from OpenStreetMap

  1. Open the Overpass Turbo website and, on the map, search for the city from which you want to extract data. (The Overpass query will be generated in such a way that it’ll only search for data in the current map view.)
  2. Click the “Wizard” button in the top toolbar. (Alternatively you can copy the code below and paste it into the text area on the website and click the “Run” button.)
  3. In the Wizard dialog box, type in “railway=subway” in order to find metro, subway, or rapid transit lines. (If you want to download interstate highways, or what they call motorways in the UK, use “highway=motorway“.) Then click the “build and run query” button.
  4. In a few seconds you’ll see lines and dots (representing the metro or subway stations) on the map, and a new query in the text area. Notice that the query has looked for three kinds of objects: node (points/stations), way (the subway tracks), relation (the subway routes).
  5. If you don’t want a particular kind of object, then delete its line from the query and click the “Run” button. (You probably don’t want relation if you’re just needing GIS data for mapping purposes, and because routes are not always well-defined by OpenStreetMap contributors.)
  6. Download the data by clicking the “Export” button. Choose from one of the first three options (GeoJSON, GPX, KML). If you’re going to use a desktop GIS software, or place this data in a web map (like Leaflet), then choose GeoJSON. Now, depending on what browser you’re using, a couple things could happen after you click on GeoJSON. If you’re using Chrome then clicking it will download a file. If you’re using Safari then clicking it will open a new tab and put the GeoJSON text in there. Copy and paste this text into TextEdit and save the file as “mexico_city_subway.geojson”.
Overpass Turbo screenshot 1 of 2

Screenshot 1: After searching for the city for which you want to extract data (Mexico City in this case), click the “Wizard” button and type “railway=subway” and click run.

Overpass Turbo screenshot 2

Screenshot 2: After building and running the query from the Wizard you’ll see subway lines and stations.

Overpass Turbo screenshot 3

Screenshot 3: Click the Export button and click GeoJSON. In Chrome, a file will download. In Safari, a new tab with the GeoJSON text will open (copy and paste this into TextEdit and save it as “mexico_city_subway.geojson”).

Convert the free and open source data into a shapefile

  1. After you’ve downloaded (via Chrome) or re-saved (Safari) a GeoJSON file of subway data from OpenStreetMap, open QGIS, the free and open source GIS desktop application for Linux, Windows, and Mac.
  2. In QGIS, add the GeoJSON file to the table of contents by either dragging the file in from the Finder (Mac) or Explorer (Windows), or by clicking File>Open and browsing and selecting the file.
  3. Convert it to GeoJSON by right-clicking on the layer in the table of contents and clicking “Save As…”
  4. In the “Save As…” dialog box choose “ESRI Shapefile” from the dropdown menu. Then click “Browse” to find a place to save this file, check “Add saved file to map”, and click the “OK” button.
  5. A new layer will appear in your table of contents. In the map this new layer will be layered directly above your GeoJSON data.
Overpass Turbo screenshot 4

Screenshot 4: The GeoJSON file exported from Overpass Turbo has now been loaded into the QGIS table of contents.

Overpass Turbo screenshot 5

Screenshot 5: In QGIS, right-click the layer, select “Save As…” and set the dialog box to have these settings before clicking OK.

Query for finding subways in your current Overpass Turbo map view

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“railway=subway”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “railway=subway”
node["railway"="subway"]({{bbox}});
way["railway"="subway"]({{bbox}});
relation["railway"="subway"]({{bbox}});
/*relation is for "routes", which are not always
well-defined, so I would ignore it*/
);
// print results
out body;
>;
out skel qt;

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).

Two things I don’t like about TIF expenditures in Chicago

Chicago Cityscape's TIF Projects map

I built a map of most Chicago TIF projects that you can filter on the fly. Type in any keyword, alderman’s name, or neighborhood and the map will re-center and zoom to the results.

1. Millions of dollars ($14.4 to be exact) has been or will be given to rich corporations, like Home Depot, to build massive stores with huge roofs and parking lots far away from where people live so everyone has to drive there. It’s highly unlikely they don’t mitigate stormwater runoff (except through temporary storage in a retention pond) or treat any of the water on site, contributing to local flooding and clogged pipes.

According to the project descriptions, property tax payers in these four TIF districts have partially subsidized the construction of over 1,903 car parking spaces and the associated ills of expansive asphalt areas and motorized traffic.

2. A massive subsidy was approved – $96 million – for McCaffery Interests’s Lakeside development on the former U.S. Steel South Works plant to build a mixed-use tower of 250 apartments in an area that has weak transit access and will take decades to fully fill out. We should instead be spending this kind of money building housing in already developed parts of the city (where there’s already amenities, or infrastructure for amenities – the Rezko land comes to mind).

What’s interesting about the Lakeside TIF project approval is that the containing TIF district, “Chicago Lakeside Development Phase 1”, has collected zero property tax revenue because there is no property in it!

Trolley on the future Lake Shore Drive

A tour bus drivers on the Lakeside development. Photo by Ann Fisher.

There are some projects I like, though. TIF has been used frequently to build affordable housing, housing for seniors, and housing for people who need assistance. 78 out of 380 projects mention the word “affordable”.

The City Hyde Park building, designed by Studio Gang Architects, will have 20% of its residential units designated as “affordable”, for families (of varying sizes) earning up to 60 percent of the area median income. The city standard is 10 percent but developers are also able to pay an “in lieu” fee so they don’t have to build the affordable units and instead can offer those units at market rates.

Other projects have a majority of affordable units.

Chicago’s TOD rule is the only reason multi-family is being built in neighborhoods

This is the ordinance that says residential developments have to provide 0.5 car parking spaces per home, and that the minimum home size can be smaller.

How many units? At least 1,500. Here’re the 19 buildings I know about that are being built within 600 and 1,200 feet* of a Chicago Transit Authority ‘L’ station – the only areas, essentially, where multi-family housing can be developed.

Why can’t dense housing be built elsewhere? Because the most desirable living areas in Chicago – along retail streets in Logan Square, North Center, Lincoln Park, Lakeview, and West Town – are zoned for single-family use. (And ad-hoc zoning districts taking the place of community land use planning.)

How do I know popular neighborhoods are zoned for single-family use? Because Daniel Hertz’s new Simplified Chicago Zoning Map makes it easy to see. Yep, even along those dense business districts and even outside the train stations.

Do the single-family home zones contain single-family homes now? Absolutely not! Much of the buildings in areas zoned for single-family homes have everything but! The particular view of the map that Hertz uses in his blog post shows that even adjacent to CTA stations, and within 1 block, there are only single-family zones (in red). There are many multi-family buildings in these red zones.

Red areas are zoned for single-family homes only.

Red areas are zoned for single-family homes only. View the map.

What ends up happening there? Teardowns. And the Lakeview Chamber of Commerce finds believes that non-matching zoning – it matches neither the existing uses nor the needs for the neighborhood – and teardowns are going to cut into consumer spending on its lively retail streets. Lakeview is seeing a population change to families which tend to have less disposable income.

More housing in a popular neighborhood means more shoppers, more property taxes, more “boots on the ground”, more “pedestrian congestion” in front of our local businesses.

Doesn’t the ordinance make station-adjacent parcels friendly to multi-family housing because of the TOD ordinance? Yes, and no. As Hertz points out, “virtually every sizable development involves a zoning variance or planned development process that goes beyond the zoning you’ll see on the map”.

The TOD ordinance is 19 months old and working exactly as intended, building more housing next to train stations, and giving more people the opportunity to have access to affordable transportation. So it needs an upgrade to be able to do more. Since, in Chicago, zoning is our land use plan, we need the best kind of zoning rules and this is one of the best.

Imagine what the TOD ordinance could do if it were expanded. Think, making the parking requirement relief and allowing different unit sizes by-right instead of going through an arduous and expensive zoning change process. Then, expanding the rule to include more than just 600 feet (which is less than a block) from a train station – people walk several blocks to get to CTA stations, and bike even more. And, beefing up the affordable housing requirements.

Let’s do this, Commissioner Andrew Mooney. Let’s do this, housing advocates. Let’s do this, transit advocates. I’m looking at you, Latin United Community Housing Association (LUCHA), Logan Square Neighborhood Association (LSNA), We Are/Somos Logan Square, Pilsen Alliance, Metropolitan Planning Council (MPC), Active Transportation Alliance, and the Center for Neighborhood Technology (CNT).

* The distance depends on existing Pedestrian Street zoning. If the property is on a designated Pedestrian Street then the station can be up to 1,200 for the ordinance to apply, double the normal 600 feet.

Not all demolition activity is alike on Chicago’s North and South Sides

According to building permit activity in the past 30 days there are more demolitions on the North Side than on the South Side, but most of those will have new buildings.

According to building permit activity in the past 30 days there are more demolitions on the North Side than on the South Side, but most of those will have new buildings. Map by Chicago Cityscapen using Mapbox satellite imagery.

I review the new permits each day on Chicago Cityscape, both in the list and map views, to get a sense of what’s being built around the city. This keeps me informed so I can tweet interesting permits, respond to people’s questions several times a week, and even help out on a Moxie tour of Motor Row and the Cermak Green Line station by mention new construction and renovation permits I’ve seen pop up nearby.

This week I was poking around the Demolitions Tracker and saw that, not unusually, there were a lot of houses being demolished on the South Side. So I checked out a 30-day view of demolitions in the full-screen map that shows the entire city.

While the North Side has more demolitions going on than the South Side, most of them are part of teardowns – the demolished buildings are getting replaced or allowing for expansion. Demolitions on the South Side are much less likely to have associated new construction projects than the North Side.

Tina Fassett Smith tweeted back:

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 ↑