Colchester Public Toilets

By | May 6, 2016

Use this interactive map to find Colchester public toilets. There are some as far afield as Dedham and Mersea!

Colchester Public Toilets: Python Code

Data on the locations of the public toilets in Colchester from Colchester Borough Council.

This map was produced using the Folium python package. The code is available below, or you can download it here.

import os
import folium
import pandas as pd
from bng_to_latlon import OSGB36toWGS84

# Load map centred on Colchester
uk = folium.Map(location=[51.5069439,-0.1510636], zoom_start=10)

# Load locally stored colchester public toilets data
toilets = pd.read_csv("public-toilets.csv")

#add a marker for each toilet
for each in toilets.iterrows():  
    print(list([each[1].GeoY,each[1].GeoX]))
    print(list(OSGB36toWGS84(each[1]['GeoX'],each[1]['GeoY'])))
    folium.Marker(list(OSGB36toWGS84(each[1]['GeoX'],each[1]['GeoY'])), popup=each[1]['StreetAddress']).add_to(uk)
    
# Save map
uk.save("./colch_toilets.html")