30DayMapChallenge

2023 Maps

I am doing the #30DayMapChallenge with work colleagues Geoffrey and Kerry. I will only be doing every third day.

A list of 30 maps to make for the 30DayMapChallenge

Day 1 - Points

Three maps showing blank ballot counts in Luxembourg. The latter two are normalized by population and then also area - the third map is invalid due to a calculation error

Updated map

There was an error in my earlier map (above).

The above map was made in QGIS while the one below was created in R. The problem with QGIS is that I didn’t track what calculations I did to create the values.

In R, the code is explicit and maintained, making a review or repair much easier. The lesson is, when possible, always do it in R if it’s anything other than pure cartography.

The map below shows that this is really not the best way to represent this type of data. See the Day 13 map for a better representation of similar data.

Three maps showing blank ballot counts in Luxembourg. The latter two are normalized by population and then also area. It's hard to see any clear communal difference

Day 4 - A bad map

A map of City of London showing the location of restaurants with 0-2 stars for hygiene rating

Day 7 - Navigation

Three maps that look like spaghetti but are actual bus tracks over time

Day 10 - North America

A map of the fire coverage of the Hossitl creek wildfire in northern canada. Map uses hexagons to show fire extent, because hexagons are the bestagons.

Day 13 - Choropleth

Blank and invalid ballots in Luxembourg’s October 2023 legislative election.

I wanted to do more with my Day 1 map… look at the statistics. I discovered an error in my methodology… need to fix Day 1 at some point.

Benefit of using R is reproducibility. Not exactly sure what I did wrong in Day 1 with QGIS.

Map of Luxembourg communes with colours representing values. A graph in the bottom right shows that a few communes may have unexpectedly high rates of blank or invalid ballots

Day 16 - Oceania

Learned how to use the R package rayshader. Big install but impressive. Need a higher quality DEM next time.

Rendering of Ululu - A 2km long rock rising up in the middle of flat lands

Day 19 - 5 minute map

Map of commute to school

Day 22 - North is not always up

Map showing migration of magnetic 'North' from Canada towards Russia

Day 25 - Antarctica

A monchrome (blue) map of the James Ross Island Group in Antarctica

Day 28 - Is this a chart or a map?

Methodology

Get a DEM/DSM for an area of interst.

In QGIS draw a line with rounded turns, such as through a valley. Use the Digitize with curve tool (Ctrl-Shift-G) for curves.

Surface elevation model of Luxembourg City with a line following the valley bottom

Import the scripts to the QGIS Processing Toolbox (PT) by clicking the Python icon in the PT and select “Add Script to Toolbox…”.

The use the script Perpendicular Line Creator (perpendicular_lines_creation.py) to generate a bunch of perpendicular lines at a specific interval (e.g. 10m) and length (e.g. 200.5m). The extra 0.5m is to prevent edge cases later.

Parallel lines to the earlier line

Now have the DEM/DSM be sampled along the perpendicular lines and create a tab separated file. The script output needs some work but functions fine - just needs a bit of cleaning the output. I’ll fix it when I have time.

Use the Raster Profile Extractor (RSE) script (extract_profiles.py) provided.

Take the data into R, clean it up, and plot it.

You can also use RSE on satellite or aerial photography to sample the colour at the sampled locations.

Here are the alternatives possible based on whether you use a DSM, DTM, or orthophoto.

Four graphs of elevation lines perpendicular to a path

You can also use a simpler path - but it’s not quite the same. Here’s a line, rather than a curve, coming up the Bock (a rock formation in Luxembourg city).

Parallel lines up Luxembourg City's Bock

Here’s my result,

A graph of sequential elevation profiles

And here along a DTM, without the buildings, trees, and other structures (except bridges!).

A graph of sequential elevation profiles

And here’s a hybrid between the two, showing the ‘ground’ (terrain) in white and highest surface (e.g., buildings, trees) in dark teal.

A graph of sequential elevation profiles