-1

I have a dataframe with a (UK) postcode column, and a count column, e.g.

postcode  count
SW1W0NY   10
PO167GZ   22
GU167HF   15
L18JQ     38

I wish to create a heatmap of this data using folium, where the counts are aggregated as per larger (e.g. county-level) geographic polygons.

There are several online resources which map postcodes to lat/long, but is there any python library or resource which maps postcodes to larger UK geographic regions (e.g. county level)?

iacob
  • 20,084
  • 6
  • 92
  • 119
  • 1
    There is [`geopandas`](https://geopandas.readthedocs.io/en/latest/gallery/create_geopandas_from_pandas.html). I'm not sure if there are UK county maps, though – Alex Apr 11 '20 at 11:28

1 Answers1

0

The Office of National Statistics has such mapping files:

Note that the mappings and codes are version/year specific, and may not be cross-compatible.

iacob
  • 20,084
  • 6
  • 92
  • 119