Skip to main content

2 posts tagged with "ai"

View All Tags

Estimating a City's Solar Potential

· 5 min read
map preview

I've been mulling over some disparate threads that have come together in a fun little experiment.

First, I have been searching for a project that uses satellite imagery.

Second, climate-tech is interesting to me. In the current AI zeitgeist, I don't hear much being done in the space. I'm sure there are some things going on, but it must be getting drowned out. In any case, I have my concerns about what AI means for our climate future (data centres, resource usage, etc.), and if I'm going to use it, I want to find ways that could be net-positive.

Finally, I've been thinking a lot about what can be collectively achieved in markets where people are traditionally isolated.

What came up for the last point was: residential solar panels.

Installing solar on your house

I've been through the process of getting solar panels on my house. It's generally the same as buying any large-ticket item:

  1. You solicit quotes from a number of vendors
  2. They present extremely similar products, at similar prices
  3. You pick one

To be fair, #2 comes with a bit more from higher-end vendors. They'll actually estimate your power generation by:

  1. Finding your house on Google Maps
  2. Overlaying models of their panels 'on' your roof. They try to maximize how many panels can fit, and take into account things like panel orientation, sun path, and tree cover.
Example rooftop with solar panel layout

My paint-version of a vendor-provided panel layout mockup for solar estimates

Financing

A quick word about actually paying for it.

At the time we were in the market, the government had an incentive program which included a 0% interest loan on residential energy upgrades.

We didn't find solar vendors to be particularly flexible with their prices, in part I think because they wanted to get the most from the incentive program.

That said, the program is a reimbursement, so we had to pay out of pocket throughout the install, and wait for the reimbursement well after the panels went on the roof.

Collective

Reflecting on the process, I began to wonder what it might look like if the whole neighbourhood went in on upgrades at the same time. Perhaps we could have negotiated better deals if the installers knew that they would have locked-in sales for many houses at once.

That thought quickly went to - what if we could negotiate at a municipal level? What would it even look like?

Time to fire up Claude Code.

The map!

(takes a while to load)

About the map

This embed was generated by a python script - here's the general pipeline description:

  1. Fetch boundary — Municipality polygon from OpenStreetMap via osmnx
  2. Load buildings — Microsoft Canadian Building Footprints, bbox pre-filtered then clipped to boundary
  3. Fetch irradiance — Monthly GHI/DNI/DHI, temperature, and wind speed from the NASA POWER climatology API (2001-2020 averages)
  4. Compute generation — For each building: project to UTM 18N for accurate m² area, determine usable roof area, transpose irradiance to plane-of-array via pvlib, apply temperature derating, calculate annual kWh
  5. Classify — High / Medium / Low based on generation and roof area thresholds
  6. Visualize — Folium map with color-coded markers, popups, layer toggles, legend, and a collapsible summary panel; console summary printed to stdout

It's not perfect, but wow! I wasn't expecting to get anywhere close to making something like this. If nothing else, it could inform some napkin math about the energy potential if solar gets widespread.

The Estimation

Energy Generation
Total 4149.4 GWh/yr

Plugging this into: https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator

CO2 equivalency infographic

Dreaming

Right now, solar installs are just around break-even, maybe a bit better, depending on your utility company, if you were part of the incentive program, if you upgraded other components, etc. etc. Hardware prices continue to go down; there's probably a floor on labour prices to install panels - but if that shifted even just a little more into the "obviously a good financial decision", maybe people could adopt en masse.

Part of that process starts with ballparking what that future could look like!

From here, some ideas start to form for me:

  • modeling what emissions impact battery install saturation looks like
  • modeling system/install financials could look like
  • starting conversations with politicians about a green future, and how we could incentivise adoption, or negotiate collectively

But that'll be for another time.

Clock Signatures

· One min read

Why does a clock tick and tock?

This was a phrase I read in a short story that stuck with me. I had an intuition for what it might be, but I wasn't sure.

The short answer is that it's sound from an escapement, with different sounds being produced on the swing and return.

This made me wonder about different ticking patterns. 60 divides cleanly by 2,3,4,5, and 6.

How weird would it be to have a clock that accented the tick every 3 beats? Or 5?

So I vibed up this part-clock / part-metronome. It's not particularly useful, but I did enjoy staring at the patterns getting in and out of sync when all clock signatures were enabled. Also, there is audio as well, if you care to leave the volume on.

Interactive demo (click to start audio):

click inside to start audio