CSV file errors

You can upload a CSV file to your Mapbox Account from the Mapbox Studio tilesets page, the Mapbox Studio dataset editor page, or by using the Mapbox Uploads API.

Tilesets vs. datasets

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.

File format

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.
  • If a row of data is invalid, that row will not be included in the resulting tileset.

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 containing latitude and longitude values:

  • Latitude:
    • latitude
    • lat
    • y
  • Longitude:
    • longitude
    • lon
    • long
    • lng
    • x

If your coordinates are GeoJSON or WKT encoded, you can name that field geojson or 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.

Example

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