Category: Information

Automatically post your Flickr photos to your Mastodon account

One process I’ve relied on in the past to keep my Twitter postings fresh is automatically cross-posting photos that I upload to Flickr to Twitter. This is done through Zapier and inspired by this answer in their forums.

Zapier currently doesn’t have any Mastodon integrations, but it’s possible to use Mastodon’s API and Zapier’s webhook function to notice your newly-uploaded photos from Zapier’s Flickr integration and “toot” them to your Mastodon account.

Note: I originally set this up as an RSS feed to Mastodon Zap before realizing that Zapier already has a Flickr integration.

First, to prepare for creating a Zap later, you’ll need to create an app in your Mastodon server. You can create an app by going to edit your profile and then opening the “Development” tab.

Select the “New application” button, give it a name, change the privileges, and use “http://zapier.com” as the only Redirect URI. Then check the appropriate boxes so that only a single privilege is checked: “write:statuses”.

Give your application a name, enter https://zapier.com as the Redirect URI, and check only the box next to “write:statuses”.

Want to get more advanced? Read the Mastodon API docs.

Mastodon will create a token for you to insert at the end of this URL that Zapier needs: https://mastodon.social/api/v1/statuses?access_token=INSERT_YOUR_ACCESS_TOKEN

If your Mastodon account is on a different server, then replace “mastodon.social” with the domain name of the server where your Mastodon account is.

Secondly, go to your Zapier account and create a new Zap. Search for the trigger app “Flickr” and then connect Zapier to your Flickr account if not already connected. The trigger should be something like what you see in the screenshot below.

When you make a new zap, use these settings: “Connect this app…Flickr…with this one…Webhooks by Zapier”. Then, “When this happens…New Photo…then do this! POST”. Zapier will automatically give it a name that you can try later and then you can select the “Try it” button to get stated and customize.


You’ll need to customize the action that Zapier takes each time there’s a new photo. Until there’s an integration with Mastodon there’s a little complexity to defining the webhook action that Zapier will do.

The type of webhook you’ll create is a “POST” and you only need to add one field to the payload that’s sent from Zapier to your Mastodon: “status”. The value of “status” can be whatever combination of text and fields that Zapier pulls from your Flickr.

The minimum field to insert is the link to the Flickr photo page. Mastodon will need this to generate a rich media preview to add to the Toot (since it’s not possible to send image attachments).

You can start your Zap now! And follow me on Mastodon.

Want to use RSS instead?

Here are some loose instructions on how to set up the RSS feed that your Flickr account produces.

Insert your Flickr ID (not your username or email, find it here) into this URL which will be the RSS URL for Zapier to check:

https://www.flickr.com/services/feeds/photos_public.gne?id=INSERT_FLICKR_ID&lang=en-us&format=atom

I ran errands and measured the CO2 concentration everywhere I went

I am starting to take my Adanet CO2 concentration monitor everywhere because I want to see which stores, restaurants, and offices have “fresher” air. The other day on December 20, 2022, I visited a BMO Harris bank branch and a Target store, and I took note of the measurements in three locations within my apartment building.

My goal is to take two readings in each location and photograph the second reading. The photograph provides the proof of the reading in the location I specified as well as a timestamp and GPS that only I can see.

I also took an outdoor reading to establish what the ambient level was that day:
421 parts per million (ppm), which is exactly what the global ambient level is!

Keep in mind that a typical reading in my studio apartment is around 650 ppm.

An outdoor reading of 421 ppm, for reference.

BMO Harris bank branch – 115 S LaSalle St

This is a large bank branch with half a dozen teller stations and a significant business banking area. There were two tellers, a handful of other staff, and myself and another customer – the person density was very low.

Reading: 614 parts per million (ppm)

The CO2 reading was 614 ppm at a BMO Harris bank branch in downtown Chicago.

Target – 1 S State St

A busy department store is where I was most excited to take several readings. I took four readings, all on the second floor.

  1. Men’s clothing department, three minutes after entering the store: 646 ppm
  2. Another area in the men’s clothing department, three minutes later: 785 ppm
  3. A dressing room, six minutes after the previous reading: 913 ppm
  4. Automotive accessories aisle, 15 minutes after: 961 ppm

To give you another reference point, the readings have regularly exceeded 800 ppm – and have exceeded 1,000 ppm if I burn some food – when I’m cooking in my studio apartment. As I write this from there, the reading is 623 ppm.

I was pleased with these numbers at Target; I’m not an expert on assessing air quality but the Centers for Disease Control writes “that indoor CO2 concentrations no greater than 700 parts per million (ppm) above outdoor CO2 concentrations will satisfy a substantial majority (about 80%) of occupants” in office environments – or about 1,121 ppm.

My apartment building

I took three readings in my apartment building:

  1. One of the two bike rooms: 619 ppm
  2. An elevator (I had to visit a lot of floors to wait until I could get a second reading, which also meant the door opened a lot): 788 ppm
  3. Gym (which has two rooms, and I took the reading in the larger room that had fewer people at the time): 596 ppm

Say hello to Adanet, my new CO2 concentration monitor

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.

(Another reason to monitor CO2? Excessive CO2 can lead to a decline in cognitive ability and sleep quality.)


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.

The ambient global measurement of CO2 is 421 ppm, measured in May 2022.

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

How an 18-unit building on a Chicago boulevard disappeared and was re-zoned to allow 7 units

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 property’s PIN is 16-11-404-025-0000 (open its Address Snapshot on Chicago Cityscape).

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 of four zoning codes and how they regulate, or would have regulated, density and parking at the location in this blog post
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.

How I used ST_ClusterDBSCAN to locate clusters of multiple, similar parcels

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;

I would also recommend Dan Baston’s blog post from six years ago which has more commentary and explanation, and additional examples of how to use the function.