Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

30 day map challenge post #84

Merged
merged 31 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9519183
Map challenge Initial commit
Sahil590 Dec 4, 2024
954a84c
restructure
Sahil590 Dec 4, 2024
1128987
suggested changes
Sahil590 Dec 5, 2024
389c5e4
QGIS and other bits
Sahil590 Dec 5, 2024
413bbc9
formatting
Sahil590 Dec 5, 2024
e1ac518
formatting
Sahil590 Dec 5, 2024
929e490
suggested changes
Sahil590 Dec 6, 2024
847d11b
improving the points description
Sahil590 Dec 6, 2024
f13fc6a
adding lines description
Sahil590 Dec 6, 2024
1742ab8
Dan's suggested changes
Sahil590 Dec 6, 2024
1a7d6cf
adding some closing thoughts
Sahil590 Dec 6, 2024
365fc2e
adding relevant tags
Sahil590 Dec 6, 2024
290875d
Diego's changes
Sahil590 Dec 6, 2024
ccda5ee
Formatting changes
Sahil590 Dec 6, 2024
79bc8af
spelling changes
Sahil590 Dec 6, 2024
3f5b4f7
some restructuring
Sahil590 Dec 6, 2024
e4e111b
spelling and link fixes
Sahil590 Dec 6, 2024
29f77f7
saranjeet suggested changes
Sahil590 Dec 9, 2024
078e269
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 9, 2024
c778126
adding words to ignore during spell check
Sahil590 Dec 9, 2024
c45a0b1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 9, 2024
938df3e
adding more words to ignore
Sahil590 Dec 9, 2024
0080c09
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 9, 2024
971151f
change csv to upper case
Sahil590 Dec 9, 2024
6e2343d
Update docs/posts/20241216_30day_map_challenge.md
Sahil590 Dec 10, 2024
ce5b63b
Update docs/posts/20241216_30day_map_challenge.md
Sahil590 Dec 10, 2024
cf8e6f4
Update docs/posts/20241216_30day_map_challenge.md
Sahil590 Dec 10, 2024
950fef2
Update docs/posts/20241216_30day_map_challenge.md
Sahil590 Dec 10, 2024
50b123a
Update docs/posts/20241216_30day_map_challenge.md
Sahil590 Dec 10, 2024
c68c477
Dan suggested changes
Sahil590 Dec 10, 2024
a843935
spelling change
Sahil590 Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Allard
Alonso
AlphaFold
Andrie
ArcGIS
Arianna
Backtesting
Bhogal
Expand All @@ -21,6 +22,7 @@ CSVY
CUDA
Carpentries
Cheuk
Choropleth
Christidi
Ciula
Clockify
Expand All @@ -37,6 +39,7 @@ DASK
DEMs
Dasgupta
DataFrames
DayMapChallenge
Dependabot
Dev
Dobson
Expand All @@ -54,12 +57,14 @@ Frick
Fundinger
Fürlich
GANs
GIS
GPUs
GUIs
Gabasova
Gao
GeNN
Gemma
GeoJSON
Gi
GitHub
GraphQL
Expand All @@ -77,6 +82,7 @@ Horsfall
Ilektra
Intersectional
JOSS
JSON
JTBD
Jupyter
Kaur
Expand All @@ -90,6 +96,7 @@ MLOps
MacBook
Mahmoud
Manani
Mapbox
Matejuk
Mathjax
Mirai
Expand All @@ -107,10 +114,12 @@ PRs
PV
PYENV
Pandoc
Plotly
Py
PyCSVY
PyData
PyMC
QGIS
Quazi
RDF
README
Expand Down Expand Up @@ -149,6 +158,7 @@ TBC
TUI
Tierney
TinyMarsh
Tjukanov
ToDo
Typst
UCL
Expand Down Expand Up @@ -185,6 +195,7 @@ ccache
cdf
cdot
cff
choropleth
citable
coprocessors
counterparty
Expand All @@ -200,6 +211,7 @@ dataframes
datasets
de
dev
django
downloader
e.g.
eScience
Expand All @@ -213,6 +225,7 @@ formatters
frac
frictionless
funder
geospatial
github
hackathon
humaniverse
Expand All @@ -229,6 +242,7 @@ linters
ln
lockdown
macOS
mapmaking
math
mdx
minimalistic
Expand All @@ -237,10 +251,12 @@ modularity
nd
np
numpy
ons
parameterisation
pdfs
performant
plantuml
plotly
polars
pre
preprocessing
Expand All @@ -267,6 +283,7 @@ timesheet
timezones
titlecase
tsmbland
uk
uname
unconference
usr
Expand Down
85 changes: 85 additions & 0 deletions docs/posts/20241216_30day_map_challenge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
date: 2024-12-16
authors:
- Sahil590
categories:
- Technology
tags:
- 30DayMapChallenge
- Technology
- Python
- Mapping
---


# **The 30-Day Map Challenge**

![Map challenge overview](images/30day_map_challenge/30dmc_2024.png)

Every year, cartography enthusiasts, geographers, data visualisers, and mapmakers from around the world come together to participate in the [30-Day Map Challenge](https://30daymapchallenge.com/). Organised by Topi Tjukanov, this event celebrates the art and science of mapmaking. Whether you’re an experienced Geographical Information Systems(GIS) professional or just starting out, this challenge invites you to create and share a map daily, guided by a unique daily theme.

The 30-Day Map Challenge is an inclusive and open-ended initiative that fosters creativity and experimentation in mapmaking. Each day in November presents a different theme, ranging from “Points” and “Lines” to “Fantasy” and “Historical.” Participants are encouraged to interpret these prompts flexibly, utilising any data, tools, or artistic styles that resonate with them.
<!-- more -->

Participation is voluntary, and there’s no competition involved. Instead, this challenge is a celebration of cartographic creativity. Participants often share their creations on social media platforms using the hashtag #30DayMapChallenge, creating a vibrant global gallery of diverse and imaginative maps.

This was my first year participating in the 30-day map challenge. I was inspired to take on the challenge being part of a recent project the RSE team worked on. We created an interactive map that displayed location data gathered from mobile devices to display trends over a map of England. The app used Django, which limited my options for mapping abilities. Since I wanted to directly query the Django database, I chose the library [django-plotly-dash](https://github.com/GibbsConsulting/django-plotly-dash).

What I loved most about this challenge was how approachable it felt. Whether I was using familiar tools like Plotly or stepping out of my comfort zone with QGIS, every map I created taught me something new about geospatial visualisation. It was incredible to see how simple datasets could tell compelling stories when mapped out thoughtfully.

I created the first 3 maps below using [Plotly](https://plotly.com/examples/), a free and open-source browser-based graphing library that can be used in Dash applications. I was already very familiar with this tool, as I have used it in many projects to portray data in maps, charts, and much more. Eventually, I decided to make a Dash app which is a Python framework that allows developers to build interactive web apps, especially with analytical interfaces like dashboards, allowing users to interactively explore the data. Usually, users are able to hover over regions to see detailed information about, say, a car's or a van's availability in each area.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

If you want to see more of my maps or try recreating them yourself, you can check out my [GitHub repository](https://github.com/Sahil590/30daymapchallenge).
In this post, I’ll focus on the four maps that I created during this challenge:

## Maps

### 1. Choropleth
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

![Classic choropleth map. Use colour to show data variation across regions. This simple but effective technique is a staple for showing thematic differences. 🎨. Number of vehicles accessible across the UK](images/30day_map_challenge/Choropleth.png)

This map type got me started on my journey, so it’s only fitting that this is the first map to showcase. For this challenge, I explored some information about vehicle access per household gathered through the 2021 UK census. I thought it would be a nice visualisation to see where the most concentrated population of vehicles would be across the UK.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

The app processes vehicle data by reading it from a CSV file, aggregating it by local authority, and merging it with geographical data from a GeoJSON file containing county boundaries. To ensure comprehensive coverage, regions without specific data are included by assigning them a default observation value. The resulting dataset is used to generate a choropleth map using the `px.choropleth_map` object, which maps aggregated observations to geographical regions with colour gradients.

As shown in Figure 2, there are many white spaces on the map. This is primarily due to gaps in the data. One challenge I encountered was finding suitable data to display on this map. Ultimately, I used Census 2021 estimates, which classify households in England and Wales based on car or van availability. The data was sourced from [ons.gov.uk](https://www.ons.gov.uk/datasets/RM008/editions/2021/versions/3).
The code that produced this map can be found [here](https://github.com/Sahil590/30daymapchallenge/blob/main/Chropleth.py)

### 2. Points

![Day 1 Start the challenge with points. Show individual locations - anything from cities to trees or more abstract concepts. Simple, but a key part of the challenge. 📍 Nature reserves across the UK](images/30day_map_challenge/Points_map.png){:style="display:block;margin:auto;width:50%" }

As mentioned in the caption, this was a simple but effective map that primarily focuses on points, where each point represents a local nature reserve across the UK. The data were sourced from [data.gov](https://www.data.gov.uk/dataset/acdf4a9e-a115-41fb-bbe9-603c819aa7f7/local-nature-reserves-england).

This app reads location data from a CSV file, which contains the latitude, longitude, and names of the reserves. The `go.Scattermapbox` graph object plots these points on a Mapbox map with green markers. The map is centred based on the average latitude and longitude of all points, providing an optimal initial view of the reserves' distribution. The code that produced this map can be found [here](https://github.com/Sahil590/30daymapchallenge/blob/main/Points_Day1.py).

### 3. Lines

![Day 2 A map with focus on lines. Roads, rivers, routes, or borders — this day was all about mapping connections and divisions. Another traditional way to keep things moving. 📏. Undersea internet cables ](images/30day_map_challenge/Lines.png)

The Internet is a global network of interconnected cables that span continents, connecting people and devices worldwide. I wanted to visualise this network on a map.

To create this map, I used a GeoJSON file - a geospatial data interchange format based on JavaScript Object Notation (JSON). These files contain data that helps plot lines, points, and polygons on maps. In this case, I used it to plot lines but will also use it to plot polygons later. This was made with the same tools mentioned in the points map. This was a simple map to produce as it only needed a single file to be plotted. It’s a very simple but effective way of portraying this type of data.

The data displayed on the map was sourced from the [ArcGIS hub](https://hub.arcgis.com/maps/c12642b516bc4ee5bc9e89870ab14089/about).
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved
The code that produced this map can be found [here](https://github.com/Sahil590/30daymapchallenge/blob/main/Lines_Day2.py)

### 4. New tool: QGIS
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

![Day 13 Use a tool you’ve never tried before. The challenge has always been about trying new things. Use a tool, software, or drawing technique you’ve never worked with before. 🧪🔧 QGIS ](images/30day_map_challenge/Qgis.png)

This day revolved around trying out a new tool - something entirely unfamiliar to me. For this challenge, I decided to use [QGIS](https://qgis.org/), a free and open-source software specifically designed for geospatial data creation, editing, analysis, visualisation, and publication.
QGIS is incredibly powerful. It can handle various tasks, from thematic maps to geospatial analysis and interactive visualisations. Despite its capabilities, I had never used it before. So, I saw this as an ideal opportunity to learn something new and challenge myself.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved
QGIS is a low-code solution to creating maps, but it does have the capability to use Python that allows you to automate tasks, manipulate map layers and elements, and create complex spatial analysis workflows. I decided to go for the no-code solution since it was my first time using QGIS.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

For my initial map, I opted for simplicity and focused on visualising the East African Region. I found a detailed dataset from [Natural Earth Hub](https://www.naturalearthdata.com/) that was recommended in my tutorial for QGIS. Once I found the data I needed, setting up the map became the next challenge. Since I had no prior experience, it took some time to get up to speed and produce a map that I was satisfied with, as shown in Figure 5.

When creating this map, I discovered that it was much easier to create a highly detailed and visually appealing map compared to the Python tools that I am familiar with.
My initial impression of QGIS was that it was a tool with immense potential, but it also felt overwhelming due to the sheer number of options available. The interface was cluttered with menus, toolbars, and panels, but once I began exploring, everything became intuitive.
If you would like to edit the map, I have included the file in the repository that can be opened in QGIS. It is [here](https://github.com/Sahil590/30daymapchallenge/blob/main/30daychallenge.qgz). All you need is to [download](https://qgis.org/download/) QGIS and open the file. It should render and be able to be edited on your own device. It supports Linux, Windows, and macOS.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved

## Closing thoughts

Taking part in the 30-Day Map Challenge this year has been an eye-opening experience for me. Each theme pushed me to think outside the box and experiment with new tools and techniques. It was a chance to combine creativity with data, and I learned so much along the way.

Some of the aspects of the challenge were more frustrating than challenging. It is how open-ended the instructions are. There is not a lot specified, such as what data is to be used. I found myself spending most of the time finding data to display on my map rather than actually creating the map.
Sahil590 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/posts/images/30day_map_challenge/Lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/posts/images/30day_map_challenge/Qgis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading