Skip to main content

Posts

Showing posts matching the search for datasette qso

Things I Learned: Time Stamps on QSO Maps using the Google Charts API, Datasette, and KML

 I'm still using that API that was deprecated. I know I should give it up, but it just keeps being useful. It's possibly the best Google product ever. (In that it just keeps on existing rather than falling into the deprecation void.) Specifically, I used the dynamic icon portion of the Google Charts API.  The Google Earth Pro animations of our QSO are missing something. (OK, maybe lots of things, but one thing I saw that I could add on this iteration.) They don't have a way to easily view the time of each QSO, or the progression of time during the POTA or SOTA session. Thanks to a suggestion  from a StackOverlow user , dynamic bubble icons have provided that! I've added icons that appear with each QSO on the map, displaying the callsign, received RST, and and time of the QSO, as well as a different set of time icons that simply update each minute of map time to display the UTC time as the map animates. Using the Google Dynamic Icon API The following address gives b...

Things I Learned: Serving Images in Datasette

 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 datasette datasette-cluster-map datasette-media datasette-json-html 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 ...

Things I Learned: I Wrote my First Datasette Plugin

 I needed to learn Jinja and/or brush up on my Django skills for work. I decided to go the Jinja route because that template engine is used in other tools at work, plus I could write a Datasette plugin while I learned my way around. It's always bugged me a bit that map_qsos.py programatically writes out the kml files that I use to display our ham radio outings on Google Earth. Print statements are the wrong tool for the job, which—at the end of the day—is to create the same kml lines and points substituting in different station names and locations in a loop. The process fairly screams template engine. Another issue is that even though the data is available in a database after its initial entry, with the previous usage model, I had to collect the versions of qso_update.csv I wanted to map and then combine their calls into a single file. This file was then operated on by map_qsos.py. The whole process was cumbersome, and did not lead to me wanting to explore maps of the log unless t...

Paradigm Shift: Seaparating Data from Views aka Elevation Profiles aren't Ham Radio QSO Database Material

 I've been slowly but surely working through this week's ham radio QSO elevation profile project. The way I want to use the tool (Datasette) doesn't feel like a good fit for the tool. That's made things more difficult. In short, here's what I hope to achieve: Plot a partial QSO path for each contact from the transmitting station (me), about 10 wavelenghts or so out towards the receiving station, so about 200 meters or so in this case. This path should be on the kml map of the QSO This is done. Place a png picture of the elevation profile into the Datasette row for that QSO. This is what this post was about. Add this picture to the kml map as well. So! I think I was wrong! The point of this whole operation was to have elevation profiles directly available in kml animated maps. I wanted them to be automatically included with each QSO, but my ownw specification was that they should be in the map. Not the database! Basically, there's data, the dates, times, callsign...

My First GitHub Pull Request; Datasette Windows and Spatialite

 I made my first ever pull request on GitHub this morning! The gang and I still mostly develop code on Windows boxes. It has more to do with the machines we have available to us on any given day than anything else. (The just-sit-down-and-type machine in our house is also for playing video games, so... Windows.) This has led to issues when using our Datasette enabled QSO logger and mapping applications .  Datasette on Windows has an issue with finding the SpatiaLite DLL file. The gang and I worked through the issues and documented our really clunky, blunt force, fix . The fix, however, amounted to changing the source code of Datasette itself on a per installation basis. That meant that if I moved to a new Windows machine I had to find the fix and re-implement it. Even worse, that meant that if I wanted to try something that worked only in a newer version of Datasette, I also had to reimplement the fix. That... Was a Lot. So, I was totally psyched when I got a little bit of ti...

Finalizing Thoughts on the Elevation API Datasette Enrichment for Ham Radio QSO Paths

 I've outlined the work on the ham radio QSO Google Maps Elevation API Datasette Enrichment  (try saying that 3 times fast) over the last several days.  What I haven't talked about much, but thought about pretty often is what the released elevation enrichment should do. Here goes. The Datasette enrichment will store the JSON data returned from the Elevation format in a database column named 'elevation'. Remember, the enrichment is taking two coordinate pairs that form a QSO like the brown line shown between Villa Nueva, NM and Idaho (KJ7DT's QTH). It then determines the endpoint of a line that only covers the first 200 meters of that path, shown as the blue line below: (Yes, 8 year-old Tawnse and I were sitting on the side of the 'cliff' on the other side of the Pecos River from the campground during that QSO. Yes, Tawnse does have a lower center of gravity than I do and led me up that path. Yes, I did have a heck of a time getting back down once I turned ...

Things I Learned: Querying QSOs in Datasette Using the Leaflet Freedraw Plugin

 Reading W6CSN's post on his recent POTA at Mt. Tamlpais got me thinking. How many QSOs had I made from the region, and had I sent out QSLs for all of them, and had I updated our log database to reflect those QSLs? We have a mapable QSO log, so clearly, I could just zoom in and out on the map, but I wanted to do something that felt fancier. I remembered a Simon Willison  blog  posts about Datasette mentioning there was a plugin that allowed querying of databases based on regions drawn on a map. That's the thing I wanted. Actually Doing the Thing So, I wanted to be able to display a map,  draw a region on the map, and then review the QSOs I'd made from that region. Armed with a map of QSOs, I also wanted to be able to click each QSO to see if I'd updated the QSL photo for the occasion in our QSO database.  After working though the issues I discuss below, I was delighted to be able to search for our QSOs from the Pantoll Campground Region like so: Now that we've s...

The Morning of Hitting the Zone with Datasette

I'm starting to be handy enough with Datasette that I can quickly get answers to my questions! This morning, the question is whether or not the Tuna Topper amplifier combined with the Rockmite is giving better propagation results than the we get with the Rockmite running alone. Since we have a database of all the QSOs and RBN spots of the Rockmite, this is exactly the kind of question Datasette can answer. Here are the commands to run datasette to get an sqlite database from the Rockmite's RBN and QSO data table . I'm listing the commands here because I've been to lazy to simply write a script, and thus far I haven't been able to get the whole assmeblelage to work on Windows, meaning I'm working on a github codespace. Codespaces are super-cool, but also—at least for me... so far—completely unable to keep command history around between launches python -m pip install csvs-to-sqlite python -m pip install pandas==1.5.0  csvs-to-sqlite -dt timestamp rm_rnb_history...

Ham Radio QSO Elevation Profiles Up and Running or ChatGPT to the Rescue

 The initial release of the ham radio QSO elevation profiles Datasette enrichment is up and running!  (In the next few days, I expect there to be several posts on this.) First, let's talk about the beauty of ChatGPT for personal coding challenges, my personal coding challenges. Over the course of the last week, I've tugged back and forth at the the problem of moving data from the Google Maps Elevation API into a png chart that I thought was going to be provided by the Google Chart API. All of this work taught me a lot, but did not produce useful results. Yesterday though, I had ChatGPT open seeing what sort of job it could do creating electronic circuit schematics (spoiler: the results aren't pragmatically useful yet, although, they are pretty.) Since I had the app open anyway, I popped over to my ongoing conversation with ChatGPT about my fictional friend Penelope. (You can see her prompt below.) Here's what I jotted down to see if Penelope could solve my charting issu...

Things I Learned: The Datasette Haversine Plugin and the SKCC QRP Award

 The gang—the 12, 11, and 8 year-old kids whose dad I am—and I attended Simon Willison's Datasette office hours on Friday to talk about our ham radio Datasette projects and to start a bit of debug on a Datasette geocoding  enrichment we're working on. During our meeting, Simon asked what the longest QSO we'd made with the radio was, and mentioned that the datasette-haversine  plugin can be used to calculate the distance between two locations on the Earth. Coincidentally, I'd already been looking into this in relation to the SKCC 1,000 Watts per Mile award. Consquently, I set out to apply the Haversine to our QSO logbook in Datasette to find the best set of QSOs to send in with our award application. KO6BTY and I did an initial glance on Friday after speaking with Simon. Here's the query we used: select rowid, id, tx_lng, tx_lat, rx_lng, rx_lat, haversine(tx_lat, tx_lng, rx_lat, rx_lng, 'mi') as haversine, floor((((haversine(tx_lat, tx_lng, rx_lat, rx_...

More Ham Radio Antenna Site Elevation Profiles and a Datasette Plugin

 As with most of my project, I'm probably having way too much fun with this elevation path thing! I got a new look at our usual Pantoll campground site this morning, and it's really, really cool!  First though, let me point you towards the code that enables my recent fascination with our the layout of the terrain at our POTA activations. I've worked the datasette plugin that returns the coordinate's of a portion of the path between two points code through it's first very simple test case. I do not know if it will install correctly in any installation of Datasette yet, but it install's in mine, and it plays well with the instance in the test case, so here's the repository . Note for new readers: Datasette is a Python tool from Simon Willison , described as: " Datasette is a tool for exploring and publishing data. It helps people take data of any shape, analyze and explore it, and publish it as an interactive website and accompanying API. " The gang ...

KML and Datasette: Automated Elevation Profiles

Automating yesterday's post . Here are the steps to add elevation profile paths to any QSO map: Duplicate the datasette-haversine-point-to-path repository, renaming it datasette-gis-partial-path This should expose a method for lat and a separate method for lng The inputs should be the beginning and end of the path and the number of meters the elevation path should extend The package will use haversine. It will also repackage a few of the earthmid methods Given the inputs, calculate the entire QSO path length using the haversine method. Then, divide the total distance by the input partial distance to get the number of 'partial' length segments exist in the the entire path. Call partial_path_lng and partial_path_lat to get the coordinates of the end of the first segment. Add a new linestring to the kml template. The segment starts at the transmitting station and ends at the coordinates returned in step 3 above. Label the new segment with the receive station's callsign an...