CSV file errors
If you upload your CSV via the Mapbox Studio tilesets page or via the Uploads API, the geometries and data attributes of the resulting features will not be editable. Use the Mapbox Studio dataset editor if you'd like to edit your data before you add it to your map. For more information on the difference between datasets and tilesets, see the Mapbox Studio Manual.
When uploading CSV files, keep the following in mind:
- CSV files can be no larger than 5 MB for datasets, and 1 GB for tilesets.
- CSV files must be in UTF-8 encoding.
- CSV files must contain coordinates (latitude and longitude) and can only represent point features, not lines or polygons.
- CSV files must be comma (
- Data imported via CSV will be encoded as a string type in the Mapbox Studio dataset editor. If you want to code any of your imported data as numbers, you can edit the fields individually in the dataset editor or upload your data in GeoJSON format.
- If a row of data is invalid, that row will not be included in the resulting tileset.
- The order of the columns that contain latitude and longitude values does not matter, as long as the values contained in the columns are correctly formatted coordinates and have valid column headers.
The first line of your CSV file must contain column headers, and column headers must include latitude and longitude fields at a minimum. The following are acceptable column headers for columns that contain latitude and longitude values. Note that
y are valid column headers when you are uploading data as a tileset, but they are not valid column headers when you are uploading data as a dataset.
y(only valid for tilesets)
x(only valid for tilesets)
If your coordinates are GeoJSON or WKT encoded, you can name that field
wkt respectively. See the Mapnik documentation on CSVs for more information.
If a column has an empty header, a column label will be generated automatically.
Here's an example of how to format a CSV file to upload in Mapbox Studio:
title,latitude,longitude University at Albany,42.686744,-73.822852 Siena College,42.718588,-73.755328 Union College,42.814403,-73.930967 The College of St. Rose,42.664351,-73.786562