Sometimes you get the locations of your data in postcodes and you need the latitude and longitude to depict the story in a map.
To show you how to convert postcodes to lat/long, I am going to use a spreadsheet on the number of takeaways in Birmingham.
The Food Standards Agency API facilitates the number of food establishments in XML format. Convert the file to a spreadsheet and filter for takeaways only.
You will get the locations with postcodes:
1. Paste the postcodes on Doogal
Useful website to geocode a large number of addresses, postcodes or ZIP codes. Copy the postcodes from your spreadsheet and paste them into the ‘addresses’ box on Doogal.
There are some options such as the country of the addresses or the format of the text.
2. Click on Geocode
The postcodes will be converted to lat/long and placed on a map:
3. Copy the long/lat
On the ‘Text’ mode are the latitude and longitude. Copy this information and go to the spreadsheet:
4. Paste the geolocations on the spreadsheet
Create two columns next to the PostCode column. Click on a cell next and paste the information:
5. Place your data in a map [optional]
With the number of takeaways and the geolocation you can now display the information on a map using CartoDB (like this example) or other interactive websites:
Do you have any other examples? Let me know in the comments