I had to take a few weeks' break before this one made sense to me. It finally did though, and now when the gang and I look at our QSO map in Datasette, we can see which outing generated a QSO by clicking on the marker of the receiving ham radio station.
So, for example, if we're wondering when we finally made that recent QSO with Hawaii? Oh yeah, it was during the California QSO party!
We've still got some data entry to do—if I had more tactical time at the moment, I'd use the datasette-write package and a form to make the entries more quickly... Anywway—but eventually, we'll have a pretty slick map.
The technical details
As for the details of what finally got everything to work for me (on a Windows machine.) You'll need
and a metadata.json file. (This was the bit that just kind of hurt me deep down and slowed me up for a few weeks. Once I accepted that there was no way around, and then spent time decoupling what looked like weird notation—at the time—to me, from what the file was actually doing, everything got better fast.) If you click through to mine using the link above, the important thing to realize is that the QSL 'select' statement it specifies is simply used to return the path that's associated with the 'key' (value of uuid) in photo_paths.csv.
The SQL query that constructed the map above for us is:
select rm_rnb_history_pres.rx_lng as longitude , rm_rnb_history_pres.rx_lat as latitude, rm_rnb_history_pres.timestamp, rm_rnb_history_pres.dB, rm_rnb_history_pres.Spotter, rm_rnb_history_pres.QSL_link, photo_path.path, photo_path.uuid, json_object(
'image',
'/-/media/thumbnail/' || uuid,
'title', Spotter || ' de KD0FNR',
'description', 'rx_rst: ' || dB || ' timestamp: ' || rm_rnb_history_pres.timestamp
) as popup
from rm_rnb_history_pres LEFT JOIN photo_path ON rm_rnb_history_pres.QSL_link = photo_path.uuid where (db > 100 or db = 0)
The things to note here is that the call to json_object is explained in the cluster map plugin Readme file. Again, everything could have gone more quickly for me if I'd only read this file down to the section I just linked to. It's the reason for the popup column in the query above, and it just works. It's so nice once it does!
Comments
Post a Comment
Please leave your comments on this topic: