Spreadsheets and tabular data containing geographic coordinates can be uploaded to Mango in Comma Separated Value (CSV) format.
Available on all plans
CSV are one of the most common file formats uploaded to Mango, but as they are essentially just a text file without a well adhered to standard, it's quite common to have a CSV that isn't supported by Mango.
Here's the low down on essential formatting, and content, that a CSV must contain in order to be processed successfully.
- Required geometry columns
- Valid coordinate column names
- “My spreadsheet doesn’t contain coordinates. What should I do?”
- Supported coordinate format
- Preparing Your CSV for import
- Common causes of CSV upload errors
Required columns: latitude and longitude
CSV uploads must contain geographic coordinates in decimal degrees format in two columns: one for latitude and one for longitude. Without coordinates, Mango cannot map the data.
We recommend that the first two columns of the table are used for coordinates.
Valid coordinate column names
There should be no spaces before or after the name.
lat ,long, 🚫
lat, long, 🚫
Latitude indicates position on the vertical, or y plane ↕
Longitude indicates position on the horizontal, or x plane ↔
The coordinate pairs
latitude,longitudeare reserved for coordinates. To avoid importing issues, use only one instance of these pairs in your header row. For example, if you have coordinates in columns
latitude,longitude, do not use use
lat,longfor any other column names.
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"
street a, street b
“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:
How to Map Spreadsheet Addresses for Powerful Insights
Areas and boundaries
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:
Create a Map from a Spreadsheet Containing Zip Codes, Counties or States
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 text editor such as Sublime Text or Notepad++.
- Ensure coordinates are decimal degrees format, using only characters
01234567890 - ..
- Double check that your data contains Lat Long coordinates, and that the column names containing the coordinates are name correctly as per the above valid column names.
- Ensure there are no trailing commas at the end of the file. This will be read as records without geometry and may cause a processing error.
- Ensure there are no trailing commas at the end of each line. This indicates a new column. Given that all columns require a column name, this will cause a failure.
- Ensure each column that contains records must have a name in Row 1. The example below is missing column names as indicated in orange. Either delete the column, or add a name.
- Ensure there is no text or blank rows before the column names, or after the actual data. In the example below, the rows highlighted in red need to be deleted.
- Ensure there are 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 your columns are separated by commas, not semicolons. This will not be apparent in your spreadsheet application, but will be visible by opening your CSV in a text editor.
- Individual column names 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.