Cartography · Studio

Rocks & Water

A map showing the UK and Ireland on a white background, the land is covered in a hexagonal grid, with each cell coloured using a the bivariate color scheme. Cells that have: neither hills nor water are in pale grey; lots of hills and no water in orange; lots of water an no hills in blue; and both hills and water in a orange-blue brown mix
Rocks & Water: A bivariate choropleth map showing how hilly and river-y a region is. Hilly-ness is based on the standard deviation of elevation; rivery-ness is derived from teh total length of streams and rivers. And yes, these metrics are correlated (r=0.56). Made for day 13 of the 2023 #30DayMapChallenge - Choropleth.

projectionOSGB. EPSG:27700
toolsPython: matplotlib, stackstac, planetarycomputer, xarray, rioxarray & cartopy, h3pandas for the hexagonal grid, jenkspy for creating the natural breaks in river lengths and elevation standard deviations
dataCoastline from Natural Earth; elevation data from Copernicus Global Digial Elevation Model (ESA 2021) and accessed via Planetary Computer; rivers and streams from OpenStreetMap using osmnx with tags={'waterway':['river','stream']}
fontDejaVu Sans Mono
commentsThe grid is wonky. And that's annoying. But a function of the different projection that h3 uses for its hexgrid (i think). To get the hexagons to clip nicely to the coastline, i first buffered the coastline by 50 km. I didn't normalize river lengths by hexagon area...but maybe i should to account for the fact that i have clipped the heaxagons around the coastline. Elevation stats (min, max, mean, std, var) were computed for each hexagon using dask and rio.xarray to directly query the COGs. This involves masking the COG to each hexagon, and in some cases retrieving multiple hexagons for each DEM, unravelling then stacking the values then computing the statistics. This was greatly aided by dask.array and rio.open_rasterio(parse_coordinates=False), done with the help of this rioxarray question on github, and this post on stack exchange. To construct the bivariate color scheme i followed this code : which was extremely helpful
date13/11/2023