| projection | OSGB. EPSG:27700
|
| tools | Python: matplotlib, stackstac, planetarycomputer, xarray, rioxarray & cartopy, h3pandas for the hexagonal grid, jenkspy for creating the natural breaks in river lengths and elevation standard deviations
|
| data | Coastline 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']}
|
| font | DejaVu Sans Mono
|
| comments | The 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
|
| date | 13/11/2023
|