Separating Latitude and Longitude
A common issue you might encounter while creating data visualizations with Mapsdata is that your geocoding information may be in one column when you want it split in two. This happens most often with latitude and longitude but the issue, and its solution, are the same with other geocoding styles requiring two columns, like the British National Grid (BNG).
For example, here is a spreadsheet listing the districts of London (known as boroughs), their administrative headquarters and their coordinates, which we created based on data from Wikipedia.
The full coordinates for each location are found in column C.
In order to plot these on a map with Mapsdata, however, we need the coordinates in two different columns: one for latitude, and one for longitude. As spiting data like this is a common problem, Excel (and Open Office Calc, Apple’s Numbers and other spreadsheet applications) have built in solutions.
First find exactly what separates the two parts of the coordinates: here it’s a space. It could also be a dash, a comma or some other character.
Then select the column in question by clicking on the corresponding letter at its top, and in the menu go to Data -> Text to Columns. Select “delimited” width, and click next, then select the specific character which is separating the two parts of the coordinates (a space in our case). You will then see a preview of the restructured data. If it looks correct, click “Finish”.
Once this is done, your geocoding information should be separated into two columns. Remember to change the column titles accordingly, in this case with “latitude” and “longitude”.
If you’re ready to create your data visualization, click the button below.
If, like in our example, your coordinates use cardinal points like N, S, E and W, there is one other thing to do to structure your data for visualization. This is because we at Mapsdata use the – in our opinion better – standard of adding a minus to coordinates of points that are South of the equator or West of Greenwich.
If you’re still having problems creating your data visualization, please check our How to Use Mapsdata page.
If you can’t find the solution to your problem, do send us a line on firstname.lastname@example.org, we’re always happy to help.