Spreadsheets and tabular data containing geographic coordinates can be uploaded to Mango in Comma Separated Value (CSV) format.
CSV are one of the most common spatial formats uploaded to Mango, but as they are essentially just a spreadsheet, it's easy to get things wrong.
Here's the low down on essential formatting and content that CSV must contain in order to be processed successfully.
Latitude and longitude columns
CSV uploads must contain geographic coordinates in decimal degrees format in two columns: one for latitude and one for longitude. Without lat/lon coordinates, Mango cannot map the data.
We recommend the first two columns of the table are used for coordinates.
Valid coordinate column names
Latitude indicates position on the vertical, or y plane ↕
Longitude indicates position on the horizontal, or x plane ↔
Coordinates must be in Decimal degrees (DD) format
Supported decimal degrees coordinates:
N 12.35216, E 13.252125
12°15'24.6276", 13° 11'42.5940"
Preparing Your CSV for import
To convert a spreadsheet into a CSV simply choose “Save As” in your spreadsheet program and choose CSV from the available file types.
CSVs cannot contain styling or multiple sheets, so any styling or additional sheets contained in your spreadsheet will be lost when saving.
Create a backup of your original spreadsheet prior to exporting to CSV to ensure your data is safe.
Save As .csv from your spreadsheet application
CSV Upload Errors
There are many different programs that can generate CSV’s and as there is no official file standard for CSV, some programs will format them in different ways to others.
If your CSV is formatted as per the instructions above please check the following using a spreadsheet program, such as MS Excel.
- CSV’s containing coordinates in any format other than decimal degrees, or using any characters in the coordinates other than numbers and “.” will result in upload errors.
- Double check that your data contains Lat Long coordinates, and that the column names containing the coordinates are name correctly.
- Open the .csv file in a text editor (not spreadsheet program) and check for trailing commas.
- Each column in the CSV must have a name. The example below is missing column names. Either delete the column or add a name.
- There should be no text or spaces before or after the actual data. In the example below, the rows highlighted in red need to be deleted.
- There should be no carriage returns in your column names. This is indicated by names that break over two lines as shown below. Remove any carriage returns in your column names.
- Ensure there are no blank columns in the CSV
- Ensure there are only numbers and no letters in Lat/Lon columns
- Ensure your columns are separated by commas or semicolons (This will not be apparent in your spreadsheet application, but will be visible by opening your CSV in a text editor).
- Individual fields cannot contain a comma. If you see a column name with two names and a comma, as per the example below, you will need to edit the fields to separate them into multiple columns.
Simply opening the CSV in MS Excel and saving it will address some problems, such as blank rows or columns.
“My spreadsheet doesn’t contain coordinates. What should I do?”
If your CSV only contains street addresses, you must geocode the addresses into coordinates before uploading to Mango. Please read this tutorial for instructions
If your CSV does not contain coordinates but has other information such as administrative boundaries, fips codes, zip codes, county or state names, then please read this tutorial for instructions