A Map of almost all Educational Schools, Colleges, and Universities in the UK. The map clusters Schools that are in close proximity, relative to the map zoom level.
generateMap.py outputs a .html file with a map of Schools, Colleges, and Universities in the UK. Here is an example image of the outputted html file content:
This is one of the files from a larger project I made. The project involved scraping School, College, and University information from the interwebs (Names, addresses, URLs, etc..), and storing them in an SQL database. This resulted in a table with over 40,000 records.
The scraped data wasn't perfect so I had to clean it up by trimming trailing whitespaces, removing unknown characters, validating data, etc..
The next step involved making calls to various Geo-location APIs to retrieve longitude and latitude values from partial address queries.
Finally, I loop through the database and plot the longitude and latitude coordinates onto a map of the UK, and output the map to a .html file
You will need to change the MySQL credentials (lines 45-49). You will also need to change the table name in the SQL query (line 63). For the script to work, your MySQL table will need to have the following columns:
- school (the name of the School/college/university)
- addr1 (first line of the address)
- addr2 (second line of the address)
- town
- county
- postcode (aka Zip code)
- country
- id (unique row id)