Mapping Values on the Great Britain

Ran
Mar 13, 2022

A week ago, I took part in the data hackathon hosted in Cambridge by CDBB, and we make a presentation about transferring natural gas networks into hydrogen networks. Below is the short python script to help you map the values on the UK map.

  1. Download the shapefile of Great Britain from https://gadm.org/download_country.html

I store the level-2 files into my dataset2 folder.

2. Install the libraries by using the pip install command in the terminal, recommend using a virtual environment, to install the libraries: shapefile, matplotlib, seaborn, pandas, and geopandas.

3. Naming your variables and putting data here. In this case, I put random values and the variable’s name is ‘random_prediction’.

Reference for data visualization

[1] https://matplotlib.org/

[2]https://pandas.pydata.org/

[3]https://geopandas.org/en/stable/

--

--

Ran

AI Developer. Ph.D. Candidate in Electrical Engineering at Imperial College.