Estimating a City's Solar Potential
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:
- You solicit quotes from a number of vendors
- They present extremely similar products, at similar prices
- You pick one
To be fair, #2 comes with a bit more from higher-end vendors. They'll actually estimate your power generation by:
- Finding your house on Google Maps
- 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.
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:
- Fetch boundary — Municipality polygon from OpenStreetMap via
osmnx - Load buildings — Microsoft Canadian Building Footprints, bbox pre-filtered then clipped to boundary
- Fetch irradiance — Monthly GHI/DNI/DHI, temperature, and wind speed from the NASA POWER climatology API (2001-2020 averages)
- 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 - Classify — High / Medium / Low based on generation and roof area thresholds
- 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
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.