I acquired a homemade and open source Adanet carbon dioxide (CO2) monitor from a friend in Chicago and tested it on a short trip on the Brown Line ‘L’. The Adanet monitors the concentration of CO2 in the air, in parts per million, which is a proxy for how “fresh” the surrounding air is.
Monitoring CO2 concentration became a more common activity and point of discussion since the COVID-19 pandemic began. A key way to reduce risk of transmission is to have “fresher” air. I’ll establish that “fresher” air is replacing air that has people’s outgoing CO2 with air that has less CO2, namely outdoor air.
I conducted an unscientific test of the “freshness” of the air inside a single Brown Line car on my trip between the Western and Belmont stations. I took five readings, which was the most I could take given that the Adanet refreshes every three minutes.
Map showing gray markers indicating where readings were taken. The trip started at the Western Brown Line station and the last reading was taking just before the train pulled into the Belmont station.
On the transit trip, the lowest reading was 475 ppm, which was taken while the device was in my coat pocket before I boarded the train at the outdoor station.
The highest reading was 680 ppm, when the train car had the most people on it during my short trip.
I have been checking the Adanet since getting home two hours ago.
I left it in the hallway outside my apartment and a single reading was 556 ppm.
Inside my studio readings have been around 650±20 ppm.
The highest reading since I got home has been 830 ppm and this is because I partially burned a quesadilla, releasing additional carbon into the air (my standalone air filter also turned on automatically to deal with the reduction in air quality).
I opened the balcony door to let fresh air in and 15 minutes later the reading dropped to between 671 and 692 ppm (the more readings the better).
Several things happened in November that has inspired me to finally document the story about a building whose history I had previously researched but never shared. It’s the story of a rear-courtyard-style building two blocks from the Garfield Park Conservatory that had 18 dwelling units, was demolished in the 1990s due to unpaid water bills, and rezoned – along with many other buildings nearby and across the city – to allow the next owner to build only seven dwelling units.
Those three things, for the curious: A question was posed to the speaker at a recent real estate group luncheon about the prevalence of downzoning in Chicago and the impact that might have on limiting some redevelopment of vacant lots; the city’s launch of ChiBlockBuilder, a program that replaces and expands upon the former $1 Large Lots program; and a meetup I attended with other urban planners to discuss, among other topics, zoning, transit, and cannabis dispensaries.
I make a few contentions in this blog post about zoning in Chicago. Among them:
Downzoning is a municipal practice that reduces how densely a property can be developed; in this context, the number of dwelling units allowed.
The zoning text and maps have progressively downzoned the city between the first zoning code and today’s zoning code; this blog post reviews the zoning text changes using a case study of a single building.
The zoning text and map at the time allowed an 18-unit building to be built on a particular property in East Garfield Park but the current zoning text and map allows only a seven-unit building to be built.
Introducing the vacant lot at 3454 W Fulton Blvd
There is a vacant lot owned by the City of Chicago at the northeast corner of Fulton Boulevard and St. Louis Avenue in East Garfield Park, in view of the renowned Garfield Park Conservatory. The lot has an area of 7,500 square feet.
The group of six three-flats is at the northeast corner of Fulton & St. Louis, or at the top-left corner of the image. The image is a screenshot of a Sanborn map, volume 11, sheet 84, last revised in 1950. Access to the HIG – Fire Insurance Maps online database is via the Chicago Public Library (a library card is required).
For what it’s worth, the southeast corner lot had 15 units, the southwest corner lot had 18 units. Then there’s the northwest corner lot that had a rear-courtyard-style building with interior corridors with 45 units (that’s 250 percent more units on a lot that’s 150 percent larger). (See Sanborn map volume 11, sheet 83, to visualize the corners on the west side of St. Louis Ave.)
The timeline of construction to demolition to city ownership to resale
The flats were built between 1922 and 1949, according to Sanborn maps (link to 1922 map, volume 11, sheet 83, hosted by the Library of Congress, which shows a vacant lot, while the 1949 version above shows the building).
In February 1992, the City of Chicago’s water department filed a statutory lien on the property to claim and to notify the owner that there was unpaid water service balance of $2,593.89.
If the building was dilapidated and had been cited, I did not find evidence in the documents available at online Cook County and City of Chicago sources. There is evidence, however, that the property was sold in 1988 a five-year delinquent tax sale.
The lot had six adjoining three-flats for a total of 18 units until its demolition, by the City of Chicago, on February 12, 1992 (read the lien the city filed against Exchange National Bank, in the amount of $14,754, to cover the cost of demolition).
Seven years later, on March 1999, the City of Chicago acquired the lot after succeeding in its lawsuit against Exchange National Bank in the Cook County Circuit Court’s Chancery Division (case number 95 CH 3958).
I’m going to repeat this part: Available evidence shows that the City of Chicago demolished the building due to unpaid water bills. I believe that political and planning circumstances – and policies – have changed such that if the situation were repeated in 2022 the building would not be demolished. For example, there is a coalition program called the Troubled Buildings Initiative that the city helped found in the mid-2000s to place buildings in this and similar situations into “receivership”, to ensure that the building does not get demolished and can actually be stabilized and improved (renovated). This is a better way of handling the problem!
Fast forward twenty-three years from the acquisition in 1999 to now. The lot is for sale to eligible neighbors – for the second time this decade – for use as a landscaped space (side yard, garden, plaza) or redeveloped (anything allowed by zoning, but you may need assistance learning to decode the zoning code).
The lot was first for sale in the Large Lots program during one or more of the tranches promoted between 2015 and 2018. The lot is now for sale since the ChiBlockBuilder program launched on November 17, 2022.
The property shown on the ChiBlockBuilder website. The property is highlighted in green on the map.
The rules are different between the former Large Lots program and ChiBlockBuilder. In the past, anyone who owned property on the same block or across the alley could apply to acquire the lot. All lots were sold for $1.
Now, through ChiBlockBuilder, interested buyers who want a low-cost acquisition must own and live in a property adjacent to the lot. This lot has only one eligible neighbor; I don’t know if the owner lives there. If they do, they can acquire the property for 10 percent of its market value.
That’s another difference between Large Lots and ChiBlockBuilder: All properties for sale (which is a subset of all properties that will eventually be for sale) have already had their market value appraised.
The market value for 3454 W Fulton Blvd is $29,953 or $2,995 for eligible applicants. There’s one other group of potential buyers that can obtain lots for 10 percent of market value and that’s non-profit organizations who have a proposal for a landscaped-based project.
The other day the City of Chicago added a wood fence around part of the vacant lot. The RV is parked on another city-owned lot, and the semi-trailer belongs to the water department because of underground work being conducted in the neighborhood.
What does zoning allow?
Successful neighboring owner-occupant buyers are able to do anything with the vacant lot that zoning allows. Although, without an expertise in reading the Chicago zoning code or a tool like Chicago Cityscape, it will be hard to know what that is.
A screenshot of ChiBlockBuilder showing the FAQs that provide links to identify a property’s zoning district and to the Chicago zoning code documentation.
My real estate information company, Chicago Cityscape, automatically generates a “Zoning Assessment” for every parcel in Chicago.
At 3454 W Fulton Blvd, the Zoning Assessment estimates that, currently, seven dwelling units are permissible, 11 fewer than what were extant there back in 1992.
Downzoning takes effect: Zoning codes of 1923, 1944, 1957, and 2004
Downzoning is a process – through either a change in the map (the zoning district assigned to a property) or a change in the text – that reduces the number of dwelling units permissible on a given lot.
1923
In the 1923 zoning code, Chicago’s first, the allowable density of building on this lot was controlled by the “2nd Volume District” which established very simple rules: a ground coverage limit of 75 percent, and a height limit of 66 feet. The building height could be higher with an upper floor setback.
A graphic from the 1923 zoning code shows how height limits varied based on upper floor setbacks and distance from the street.
Multiplying the lot size of 7,500 s.f. by 0.75 equals a maximum building footprint of 5,625 s.f. Multiply that by six floors and there’s a maximum floor area of approximately 33,750 s.f. This created an FAR of 4.5.
1944
In the 1944 zoning code, the allowable density of building on this lot was still controlled by the “2nd Volume District” but the maximum density had been reduced: a ground coverage limit of 45 percent, and a height limit of 45 feet (the current zoning code applies a height limit of 38 feet on the lot in question, while ground coverage is dictated by FAR and setbacks standards that the 1944 zoning code didn’t have).
Multiplying the lot size of 7,500 s.f. by 0.45 equals a maximum building footprint of 3,375 s.f. Multiply that by four floors and there’s a maximum floor area of approximately 13,500 s.f. This created an FAR of 1.8.
Yet neither the 1923 nor the 1944 zoning codes had a limit on the number of dwelling units. The number of dwelling units was thus limited by whatever building code standards there were and the unit sizes the builder wanted to market.
1957
The 1957 zoning code introduced a more stratified Use + Density schedule of districts more similar to the current zoning code than the two prior codes. The map was drawn to place 3454 W Fulton Blvd into an “R4” district.
1957 zoning code map sheet 1-J (which is the same grid index/sheet number as the current zoning code’s map). Image from the HathiTrust database, page number 171 of 348 (page 91 of the zoning code, though). 3454 W Fulton Blvd is outlined in a pink-colored box near the center of the image.
In 1957, the R4 zoning district applied a new density rule that there can only be one dwelling unit per 900 s.f. of lot area. This differs from the prior two codes which did not have a standard establishing a maximum number of units.
Since the lot has an area of 7,500 s.f., that equals eight dwelling units allowed.
The 1957 zoning code introduced the minimum lot area per unit standard. The standard in R4 zoning districts was that there had to be 900 s.f. of lot area per unit the owner desired to build. That number increased to 1,000 s.f. in the 2004 (current) zoning code, reducing the number of units allowed to be built on this vacant lot. Scan is from the HathiTrust (scanned page 24).
The 1957 zoning code also introduced a floor area ratio (FAR) of 1.2 to control building size, and front, side, and rear yard setbacks that controlled lot coverage. Remember that this lot had an effective allowable FAR of 4.5 in 1923 and 1.8 in 1944.
I think it needs to be pointed out that the most dense residential-only zoning district in the 1957 zoning code – R8 – allowed more than twice the number of units on a given lot than the most dense residential-only zoning district in the current zoning code – RM-6.5. It was a matter of requiring 135 s.f. of lot area per dwelling unit prior to 2004 and 300 s.f. of lot area per dwelling unit since 2004, respectively.
In practical terms, if the lot was zoned R8 in 1957-2003 then 55 units would be allowed; if it was zoned RM-6.5 in 2004-2022 then 25 units would be allowed.
2004
In the current zoning code, adopted in 2004, the lot’s “R4” zoning district designation was converted to “RT-4”. The code was updated to reduce the density rule from requiring 900 s.f. of lot area per dwelling unit to requiring 1,000 s.f. of lot area per dwelling unit. Since the lot has an area of 7,500 s.f., that means seven dwelling units are allowed here (also, the zoning code says the number must be rounded down in instances where there is a maximum standard). That’s a difference of one unit, so hardly an indictment of the downzoning of this lot that occurred between 1957 and 2004.
The current zoning code has a table in 17-1-1406-A that instructs readers how to convert from the 1957 zoning code districts to the current zoning code’s districts.
The FAR stayed the same between the 1957 and 2004 zoning codes, at 1.2 (far below 4.5 in 1923 and less than 1.8 in 1944).
Allowed zoning summary
I contend that there was a severe decline in the number of dwelling units allowed between Chicago’s first and fourth (current) zoning codes, manifested through a reduction in reduced height limits and lot coverage between 1923 and 1944 and the introduction of the maximum number of units standard (called “minimum lot area per unit”) in 1957. The zoning code in 2004, as it pertains to this lot, looks very much like the zoning code in 1957.
Chart that compares the zoning standards of height, lot coverage or FAR, and units allowed, amongst the four iterations of Chicago’s zoning code.Thank you to Daniel for compiling the different zoning codes’ standards.
Miscellanea
Another big change between the 1957 and 2004 zoning codes was the amount of parking required: in the equivalent zoning districts, the 1957 zoning code required 0.75 spaces per dwelling unit while the 2004 zoning code requires 1 space per dwelling unit, which is still the case as proximity to transit has no bearing on RT-4 zoning districts.
The 1923 had a cap on the number of garage parking spaces of one space per dwelling unit. This cap went away at some point, and has been reinstated in a limited basis in the “Connected Communities” ordinance adopted in 2022.
The 1923 zoning code allows more “auxiliary” uses in “apartment districts”, such as the one governing the vacant lot in question, compared to the current RT-4 zoning district, including: a boarding or lodging house, and an apartment hotel with a restaurant or dining room that is entered from within the lobby. (I don’t think apartment hotels exist anymore in Chicago.)
In 2022, the Chicago City Council adopted a zoning code amendment called “Connected Communities” which would allow the next owner of this vacant lot to build housing without any car parking – like it was in the 1920s – if they were to also obtain an upzone (that is, a zoning map amendment to a higher-density zoning district) to RM-5 or higher. This is because the lot is near enough to an eligible transit service.
P.S. The other type of downzoning (or upzoning) is to change the map. This means to reassign certain parcels to a different zoning district. Chicago city council members do this constantly, often for unknown or unexplained reasons. When it is explained, it’s often to ensure that a property owner must proposed a project to the alderperson and then obtain their permission to (usually) upzone.
When the zoning is changed one parcel at a time, or several parcels for a single property owner, this process of downzoning – or upzoning – gets an additional name: spot zoning. This is generally bad urban planning and development policy and has been part of political corruption. Chicago used to have a department policy that rezonings (changes to the zoning map) had to cover at least 10,000 s.f. of contiguous parcel area at a time (just a little bit larger than three standard size lots).
Several examples of alderperson-initiated downzoning in the 2010s include (from memory):
Former alderperson, and chairperson of the City Council’s zoning committee, Danny Solis, downzoned a large residential property in Pilsen to “M” (industrial); the property owner, PMG, sued Solis and the City of Chicago. The settlement was that the city would buy the land from PMG at market rate. This is now the 18th & Peoria development site, and the city is conducting public meetings to determine how to develop it.
Alderperson Roberto Maldonado submitted dozens of downzoning ordinances to City Council in ~2020, to change vacant lots in Humboldt Park and Logan Square from RT-4 (which would allow a three-flat) to RS-3 (which would allow a single-detached house, and in rare locations, a two-flat). The planning department staff had to limit his submissions to a few per month because they could not handle all of his ordinances amongst their other work processing real zoning change applications.
Alderperson Carlos Ramirez-Rosa downzoned a commercial district along Milwaukee Avenue north of Diversey Avenue to allow a lower density and lower height. Any developer that proposed more than allowed has to go through the 35th Ward Community Zoning Process (I have not personally experienced this process but I appreciate that it’s well-documented and seems to be applied consistently). The scope of the downzoning was reduced after some pushback.
Alternative headline: A practical example of how to use ST_ClusterDBSCAN to find similar real estate properties.
Oftentimes a developer wants to acquire several adjacent lots for a single redevelopment. Each standard sized lot in Chicago is about 3,125 square feet (25 feet wide and 125 feet deep). Because of downzoning in 2004, and since, the zoning rules for many lots allow only about 3-4 dwelling units each. Multiple lots are required to develop buildings with 6-9 dwelling units, which is a sweet spot in Chicago for design and avoiding having to get an upzone.
Chicago Cityscape has long had Property Finder, a tool to locate parcels that meet exacting specifications given existing lot size, current zoning district, distance to transit, and other criteria.
Now, Chicago Cityscape can locate parcels that are adjacent or near each other that all meet the user’s specified criteria (what the website calls “filters”). This is possible because of the PostGIS function ST_ClusterDBSCAN.
ST_ClusterDBSCAN considers all geospatial features in your result set (whatever matches the WHERE clause) and assigns them to a cluster ID according to two inputs: minimum cluster size, and maximum distance each feature can be from any other feature in order to be considered in the same cluster as that other feature.
The function can also assign a feature with a cluster ID of NULL, indicating that the feature did not meet the clustering criteria and is alone.
Show me what that looks like
Chicago Cityscape gives the user three options to cluster: Small, compact clusters with at least 3 properties each; small, compact clusters with at least 5 properties each; large, loose clusters with at least 10 properties each.
Additionally, Chicago Cityscape lets the user choose between showing parcels that weren’t found in a cluster, or hiding parcels that weren’t found in a cluster. The reason to show parcels that weren’t found in a cluster is to visualize where there are and aren’t clusters of parcels in the same map.
A map of Chicago’s Near West Side community area is shown with clusters of vacant lots. The “show all properties” mode is used, which shows clusters with a thick, black outline. Properties that were not in a cluster are still shown but without the thick black outline (enlarge the photo to see the difference).
Sample query
This query looks at all of the vacant lots within 1 mile of the intersection of Washington Boulevard and Karlov Avenue in the West Garfield Park community area of Chicago. The query looks for clusters of at least 3 features (“minpoints”) that are no more than 25 feet apart (“eps”). (The data are projected in Illinois StatePlane East Feet, rather than a projection that’s in meters because it’s easier for me to work with feet.)
I posted another sample query below that’s used to exclude all of the features that were not assigned to a cluster.
SELECT pin14, ST_ClusterDBSCAN(geom, eps := 25, minpoints := 3) over () AS cid, geom
FROM parcels
WHERE property_class = '1-00'
AND ST_DWithin(geom,
ST_Transform(
ST_GeomFromText('POINT(-87.7278 41.8819)', 4326), 3435),
5280)
The screenshot below shows clusters of vacant lots that resulted from the query above. The parcels symbolized in a gray gradient were not assigned to a cluster. Notice how clusters will form across the alleys but not across streets; this is because the streets are wider than 25 feet but most alleys are only 16 feet wide.
The map shows various groups (clusters) of vacant properties in West Garfield Park. Each cluster is symbolized in QGIS using a different color. Properties that are not in a cluster are symbolized by a gray gradient.
Exclusion sample query
This query is the same as above except that a Common Table Expression (CTE) is used (CTEs have the “WITH” keyword at the beginning) to create a subquery. The “WITH” subquery is the one that clusters the parcels and the following query (“SELECT *”) throws out any features returned by the subquery that don’t have a cluster ID (the “cid” field).
with parcels as (
SELECT pin14, ST_ClusterDBSCAN(geom, eps := 25, minpoints := 3) over () AS cid, geom
FROM parcels
WHERE property_class = '1-00'
AND ST_DWithin(geom,
ST_Transform(
ST_GeomFromText('POINT(-87.7278 41.8819)', 4326), 3435),
5280)
) select *
from parcels where cid is not null;
Today I’m adding a bunch of new features to the Chicago Crash Browser, which lives on Chicago Cityscape.
But first…special access is no longer required. Anyone can create a free Cityscape account and access the map. However, only those with special access or a Cityscape Real Estate Pro account will be able to download the data.
Five new features include:
Statistics that update weekly to summarize what happened in the past week: the number of crashes, the number of people killed in crashes, and the number of people with the two worst tiers of injuries. The statistics are viewable to everyone, including those without access to the crash browser.
The statistics will update every Sunday. The numbers may change throughout the week as Chicago police officers upload crash reports.
For data users, the crash record ID is viewable. The crash record ID links details about the same crash across the Chicago data portal’s three tables: Crashes, Vehicles, and People. My Chicago Crash Browser is currently only using the Crashes table. Click on the “More details” arrow in the first table column.
The crash record ID is hidden by default but can be exposed. Use this ID to locate details in the data portal’s Vehicles and People tables.
Filter crashes by location. There are currently two location filters: (1) on a “Pedestrian Street” (a zoning designation to, over time, reduce the prevalence of car-oriented land uses and improve building design to make them more appealing to walk next to); (2) within one block of a CTA or Metra station, important places where people commonly walk to. Select a filter’s radio button and then click “Apply filters”.
Filter crashes by availability of a news article or a note. I intend to attach news articles to every crash where a pedestrian or bicyclist was killed (the majority of these will be to Streetsblog Chicago articles, where I am still “editor at large”. Notes will include explanations about data changes [1] (the “map editor” mentioned in some of the notes is me) and victims’ names.
After choosing a filter’s radio button click “Apply filters” and the map and data table will update.
Filter by hit and run status. If the officer filling out the crash report marked it as a hit and run crash, you can filter by choosing “Yes” in the options list. “No” is another option, as is “not recorded”, which means the officer didn’t select yes or no.
Search by address. Use the search bar inside the map view to center the map and show crashes that occurred within one block (660 feet) of that point. The default is one block and users can increase that amount using the dropdown menu in the filter.
Use the search bar within the map view to show crashes near a specific address in Chicago.
Footnotes
[1] The most common data change as of this writing is when a crash’s “most severe injury” is upgraded from non-fatal to fatal, but the crash report in the city’s data portal does not receive that update. This data pipeline/publishing issue is described in the browser’s “Crash data notes” section.
The “map editor” (me) will change a crash’s “most severe injury” to fatal to ensure it appears when someone filters for fatal crashes. This change to the data will be noted.
A common way to show the distribution of places (like grocery stores) is to use a heat map. The map will appear “hotter” where there are many grocery stores and “colder” where there are few grocery stores. This kind of map can be useful to show gaps in distribution or a neighborhood that has a lot of grocery stores.
One issue with that kind of heat map is that the coverage areas change their shape and color if you zoom in, since the algorithm that clusters or determines what’s “nearby” or dense has fewer locations to analyze.
I prefer to use grids in the shape of square tiles, since Chicago is grid-oriented city and the vast majority of our streets and our routes move along east-west and north-south lines. The map above shows the location of subjects and topics of news articles in the Chicago Cityscape database.
I use PostGIS to set up most of my spatial data before visualizing it in QGIS.
This tutorial shows the two steps to using PostGIS to (1) create a grid based on an existing area (polygon), (2) assigning each point location to a tile in that grid and counting the number of locations in that tile.
If you don’t have PostGIS installed, you should install it if you work with spatial data a lot. It is much, much faster at performing most of the tasks you use QGIS or ArcGIS to perform. Both QGIS and ArcGIS can read and edit data stored in PostGIS.
Additionally, there is a function within QGIS that can create grids, and another function that can do comparisons by location and count/summarize, so all of this can be done without PostGIS.
For this tutorial, you will need a single polygon with which to create the grid. I used the boundary of the City of Chicago limits.
Create a grid based on an existing area
1.a. Add a new function to PostGIS
To create a grid, you need a function that draws the tiles based on the polygon. I got this from The Spatial Database Advisor.
-- Create required type
DROP TYPE IF EXISTS T_Grid CASCADE;
CREATE TYPE T_Grid AS (
gcol int4,
grow int4,
geom geometry
);
-- Drop function is exists
DROP FUNCTION IF EXISTS ST_RegularGrid(geometry, NUMERIC, NUMERIC, BOOLEAN);
-- Now create the function
CREATE OR REPLACE FUNCTION ST_RegularGrid(p_geometry geometry,
p_TileSizeX NUMERIC,
p_TileSizeY NUMERIC,
p_point BOOLEAN DEFAULT TRUE)
RETURNS SETOF T_Grid AS
$BODY$
DECLARE
v_mbr geometry;
v_srid int4;
v_halfX NUMERIC := p_TileSizeX / 2.0;
v_halfY NUMERIC := p_TileSizeY / 2.0;
v_loCol int4;
v_hiCol int4;
v_loRow int4;
v_hiRow int4;
v_grid T_Grid;
BEGIN
IF ( p_geometry IS NULL ) THEN
RETURN;
END IF;
v_srid := ST_SRID(p_geometry);
v_mbr := ST_Envelope(p_geometry);
v_loCol := trunc((ST_XMIN(v_mbr) / p_TileSizeX)::NUMERIC );
v_hiCol := CEIL( (ST_XMAX(v_mbr) / p_TileSizeX)::NUMERIC ) - 1;
v_loRow := trunc((ST_YMIN(v_mbr) / p_TileSizeY)::NUMERIC );
v_hiRow := CEIL( (ST_YMAX(v_mbr) / p_TileSizeY)::NUMERIC ) - 1;
FOR v_col IN v_loCol..v_hiCol Loop
FOR v_row IN v_loRow..v_hiRow Loop
v_grid.gcol := v_col;
v_grid.grow := v_row;
IF ( p_point ) THEN
v_grid.geom := ST_SetSRID(
ST_MakePoint((v_col * p_TileSizeX) + v_halfX,
(v_row * p_TileSizeY) + V_HalfY),
v_srid);
ELSE
v_grid.geom := ST_SetSRID(
ST_MakeEnvelope((v_col * p_TileSizeX),
(v_row * p_TileSizeY),
(v_col * p_TileSizeX) + p_TileSizeX,
(v_row * p_TileSizeY) + p_TileSizeY),
v_srid);
END IF;
RETURN NEXT v_grid;
END Loop;
END Loop;
END;
$BODY$
LANGUAGE plpgsql IMMUTABLE
COST 100
ROWS 1000;
The ST_RegularGrid function works in the same projection as your source data.
1.b. Create a layer that has all of the tiles for just the Chicago boundary
--This creates grids of 1,320 feet square (a 2x2 block size in Chicago)
SELECT gcol, grow, geom
into b_chicagoboundary_grid_1320squared
FROM ST_RegularGrid((select geom from chicagoboundary where gid = 1), 1320, 1320,FALSE);
In that query, “1320” is a distance in feet for both the X and Y planes, as the “chicagoboundary” geometry is projected in Illinois StatePlane FIPS East (Feet) (EPSG/SRID 3435).
2. Assign each point location to a tile in that grid and count the number of locations in each tile
Now you’ll need a table that has POINT-type geometries in it. For the map in this tutorial, I used a layer of location-based news articles that are used in Chicago Cityscape to highlight local developments.
SELECT grid.id, count(*) as count, grid.geom
INTO news_grid
FROM news_articles, b_chicagoboundary_grid_1320squared AS grid
WHERE st_intersects(news_articles.geom, grid.geom)
GROUP by grid.id;
This query will result in a table with three columns:
The ID of the tile, which is a primary key field.
The number of news articles in that tile.
The POLYGON geometry of that tile.
Look at these two maps (the one above, and the one below). The first map shows the whole city. The tiles are colored according to the number of news articles within the area of each tile. The darker the blue, the more news articles within that tile. This map is zoomed in to the Woodlawn area. As you change scale (zoom in or zoom out), the size of the “heat” area (the size of each tile) doesn’t change – they are still 1,320 feet by 1,320 feet. The color doesn’t change either. The typical heat map doesn’t have these advantages.