Spatial stuff

How to display a Choropleth map in Jupyter Notebook

Here is the code: %matplotlib inline import geopandas as gpd import matplotlib as mpl # make rcParams available (optional) mpl.rcParams[‘figure.dpi’]= 144 # increase dpi (optional) world = gpd.read_file(gpd.datasets.get_path(“naturalearth_lowres”)) world = world[world.name != ‘Antarctica’] # remove Antarctica (optional) world[‘gdp_per_person’] = world.gdp_md_est / world.pop_est g = world.plot(column=’gdp_per_person’, cmap=’OrRd’, scheme=’quantiles’) g.set_facecolor(‘#A8C5DD’) # make the ocean blue (optional) Here […]

How to display a Choropleth map in Jupyter Notebook Read More »

Python script for geocoding a text file

Assume that you have a file with some locations as text with one location per line. For example, here are some school names in Copenhagen, Denmark, stored in schools.csv: Hyltebjerg Skole Heibergskolen Ellebjerg Skole Katrinedals Skole Peder Lykke Skolen Amager Fælled Skole Tingbjerg Heldagsskole Øster Farimagsgades Skole Sankt Annæ Gymnasiums Grundskole Lykkebo Skole Randersgades Skole

Python script for geocoding a text file Read More »

Downloading environment data for Denmark

This post is very Denmark-specific. I was annoyed that downloading environmental data from the ministry of the environment was so cumbersome. Long story made short, here are download URLs for environmental data: Dataset URL Kirkebyggelinjer KIRKEBYGGELINJER_SHAPE.zip Skovbyggelinjer SKOVBYGGELINJER_SHAPE.zip Åbeskyttelseslinjer AA_BES_LINJER_SHAPE.zip Søbeskyttelseslinjer SOE_BES_LINJER_SHAPE.zip EF Fuglebeskyttelsesområder EF_FUGLE_BES_OMR_SHAPE.zip EF Habitatområder EF_HABITAT_OMR_SHAPE.zip RAMSAR-områder RAMSAR_OMR_SHAPE.zip Naturvildtreservat NATUR_VILDT_RESERVAT_SHAPE.zip There are more.

Downloading environment data for Denmark Read More »

Having a look at Spacebase

Spacebase is a spatial datastore that began life as military-grade software, which at least sounds kind of cool. It’s an in-memory database, really, so switch off the cluster and the data is gone. Apparently the same thing was (unknown to the SpaceBase people?) invented in the 90’s by some americans also having the military as

Having a look at Spacebase Read More »