AI that codes

I had been playing around with using Google’s Gemino 2.5 Pro LLM to make Python scripts for working with GPS files: for instance, adding data on the speed I was traveling at every point along recorded tracks.

The process is a bit awkward. The LLM doesn’t know exactly what system you are implementing the code in, which can lead to a lot of back and forth when commands and the code content aren’t completely right.

The other day, however, I noticed the ‘Build’ tab on the left side menu of Google’s AI Studio web interface. It provides a pretty amazing way to make an app from nothing, without writing any code. As a basic starting point, I asked for an app that can go through a GPX file with hundreds of hikes or bike rides, pull out the titles of all the tracks, and list them along with the dates they were recorded. This could all be done with command-line tools or self-written Python, but it was pretty amazing to watch for a couple of minutes while the LLM coded up a complete web app which produced the output that I wanted.

Much of this has been in service of a longstanding goal of adding new kinds of detail to my hike and biking maps, such as slowing the slope or speed at each point using different colours. I stepped up my experiment and asked directly for a web app that would ingest a large GPX and output a map colour coded by speed.

Here are the results for my Dutch bike rides:

And the mechanical Bike Share Toronto bikes:

I would prefer something that looks more like the output from QGIS, but it’s pretty amazing that it’s possible. It also had a remarkable amount of difficulty with the seemingly simple task of adding a button to zoom the extent of the map to show all the tracks, without too much blank space outside.

Perhaps the most surprising part was when at one point I submitted a prompt that the map interface was jittery and awkward. Without any further instructions it made a bunch of automatic code tweaks and suddenly the map worked much better.

It is really far, far from perfect or reliable. It is still very much in the dog-playing-a-violin stage, where it is impressive that it can be done at all, even if not skillfully.

Linking routes in western Toronto

Yesterday’s route in green

After work yesterday, I took advantage of the Bloor bike lanes prior to their removal and connected some disconnected tracks in the west of the city. I rode all the way to where the bike lanes end at Kipling, then took Dundas West northeast to where it splits: with St. Clair Avenue north of the rail lines and Dundas south. I took St. Clair to Prospect Cemetery, and then the familiar route north up the cemetery and then east along the York Beltline and Kay Gardiner Beltline trails.

Bad weather projected for Thursday has the Neon Ride delayed until Friday, and I am also talking with friends about a daylong ride north up the Humber ravine to the arboretum.

Pandemic walks extentification project

My pandemic walks project has involved a lot of densification: trying to exhaustively make use of all possible routes within a geographic area, acting as a kind of human radioactive tracer running through the city’s circulatory system.

This has been interesting and has led to some nice still and animated art.

At the same time, the whole project was motivated in part by the desire to avoid visiting and re-visiting the same areas during the pandemic. That, combined with pleasant spring weather, has me thinking about reorienting from densification toward extentification, both undertaking new rides to expand the total area explored and working to add days with over 100 km of riding.

I made some maps to get a sense of how long it would take to get beyond the explored region. I added lines to show the distances to places on the outermost edges of the explored area and, in parentheses, added the Google Maps bicycle travel times there from Brentwood Towers:

(Sorry the travel times are glitched in the final map; I wanted to make all the lines the same colour and accidentally overwrote the manual Google Maps travel times labels.)

These maps show only analog / mechanical / acoustic bicycle trips, including my year on Bike Share Toronto, my Dutch bike, and the loaner I used while it was being serviced.

I need to go a long way in most directions to get beyond the network: 10–15 km in most directions. The most direct route to new kilometres is northeast, through the Bridle Path and into the areas east of the northwestern branches of the Don.

The 10,000 milli-amp-hour portable phone battery which I bought for the 2015 CUPE 3902 TA strike at U of T had started bulging, so I replaced it. I should be set for day-long extentification weekend excursions now.

P.S. I figured out how to do this in a more automated way using QGIS. First, here is the area of all the rides converted into convex hulls:

And here is a set of automatically-generated spokes radiating in all directions from the centre point of all my rides (which is predictably enough right between home and work):

The only buggy element is how it projects spokes out into the lake. Nonetheless, this provides a useful visual guide to how far I need to go to get beyond my total area explored so far by bike.