top of page

QGIS: Part 2!

  • Writer: Jonathan
    Jonathan
  • Jan 17, 2020
  • 3 min read

If you enjoyed my first post, I have a few more examples and explanations here for you. Once I finished my "copy" of the inspirational Reddit post, I decided to venture out on my own and do some experimentations. Below are some examples of that with a few key details on how I accomplished them still using the first article as the basis.


Individual Runs


The first post shows a year at a glance, giving you one frame per run. This is nice, but I don't always want to wait until the end of the year to summarize what I've been running. It would be nice to post a summary of a single run played out in a nice animation.


This below video shows just that - each frame is 5 seconds (5 data points) instead of 1 activity. I accomplished this by modifying my original script to give the "points_no" int. This int indicates the overall point number in the CSV file, making it possible to show a certain amount at once. My watch is set to record one data point per second, so this actually works out pretty nicely.

This decreases the amount of total frames created, but keeps the highlighting circle looking normal. If I increased this value to 10, the circle would start to look more like an oval. Each data point has it's own circle around it, and if you show all of them at once, it will cover the actual data points that you want to see, so you need to keep it relatively low.


As you can see, the run is displayed in 5 second frames which gives it a very smooth animation. Overall I am very happy with the way this one turned out after a particularly long run and is particularly fun to see the path of the Golf Course.


To achieve this in QGIS, I used the "Points_No" data field instead of the "Activity" data field for the time frame, disabled showing the time on the map as it was no longer accurate, and modified the HL layer to show just a stroke. I then made the data point for the HL layer transparent so it would just display a ring around my primary layer. I also had to change the Time Frame Size to 5 seconds to show 5 data points at once.


Week Summary


Along the same lines as the individual summary, a weekly summary would have the same animation but cover multiple runs. To differentiate between runs, I wanted to make them different colors so it was easier to see. I used the same script and the same methods to accomplish this.



I particularly enjoy this animation as it uses the Dark Matter map which is much more pleasing to the eye and it colors each run a different shade of the rainbow. I chose these colors as they stood out when layered on top of each other and are easy to see against the black background.


To achieve this in QGIS I ditched the "Heatmap" option in the layer symbology and switched to "Gradiant" coloring. I was then able to set up different colors based on a value in my .csv file. As you can see pictured, I used the "activity" field as my indicator for color, and assigned a different color to each run number. When animated, each run is highlighted in the chosen color.


Make sure you disable the linking of the layer numbers and choose the total number of runs you are displaying near the bottom of the screen. If you do not disable this checkbox, the values will not stay as you input them, and the program will take over for you which can be frustrating. Also, make sure to disable the stroke/outline type for the datapoint or else all of your data points will look very similar.


Multi-Year


Following the gradient color scheme talked about above, I decided to do the same across the 3 years I had data for (2017-2019). I chose the "Points_No" data field again to be the time feature in Time Manager, had a highlight layer as I did in my first post, and chose to display each year as a different color.



This render took 5+ hours to complete, it looks decent but I wouldn't say it's my favorite. For some reason the date stops showing about halfway through. It shows each year as a different color, but because we chose to color the years in different colors, we were unable to use the heatmap option. This leaves the map looking fairly flat compared to the others.


Hopefully you find this inspiring and make your own maps with your data. Please feel free to link any you are particularly proud of below.


Thanks for reading!

 
 
 

Comments


bottom of page