Datasets
You can use the Mapbox Studio dataset editor to import, create, and edit point, line, and polygon features and their properties. A collection of these features in Mapbox is called a dataset. Datasets can either be downloaded as GeoJSON or exported to tilesets for use in Mapbox styles (see the Guides for more information).
Mapbox Studio topics covered in this section:
Upload
Dataset
Tileset
Template style
Custom style
Add data to style
Style data
Publish
What is a dataset?
A dataset is an editable collection of GeoJSON features. Datasets are distinct from tilesets in that datasets can be edited on a feature-by-feature basis, but cannot be used directly in Mapbox Studio style.
Any dataset you create can be exported to a tileset, which can be then added as a layer in the Mapbox Studio style editor.
Downloading and exporting datasets
Once you've created a dataset, you can export it to a tileset for use in a Mapbox map (see Style editor for more information), download it as a GeoJSON FeatureCollection, or use it with the Datasets API. Datasets can also be edited after export. To learn how to download and export datasets, see below.
Dataset editor
In addition to managing datasets, Mapbox Studio provides an in-browser editor for creating and modifying dataset features.
Export to tileset
To add your data to a style in the Mapbox Studio style editor, you need to export your dataset to a tileset.
-
Save. After you have finished editing your dataset, click Save to review the changes you have made.
-
Export. Click Export to export your dataset to a vector tileset. A vector tileset is a collection of data broken up into a uniform grid of square tiles at up to 22 preset zoom levels. Your tilesets are stored on the Tilesets page in your Mapbox account, and tilesets created through dataset export have a reference back to the original dataset. See the Uploads section for more information on using tilesets.
If you need to make further changes to your data, you can change a dataset after you have exported to a tileset and re-export to have those changes reflected in the tileset. If you update a connected tileset, any styles that reference that tileset will also be updated automatically.
Manage features
Features are individual points, lines, or polygons in your dataset. In the dataset editor you can add, change, and delete features in your dataset.
Add new features: You can add new features to an existing dataset by either importing them from a data file or drawing them directly in the editor. Adding new features to a dataset does not overwrite existing features. If you import a data file that contains a feature that already exists in the dataset, this will duplicate the feature.
- GeoJSON or CSV file. If using a CSV, make sure that the data is already geocoded and represents point features. Import. You can import data into your dataset from a
- Draw tools. Use the draw tools to draw features directly on
the map. You can change the geometry, placement, and properties of existing features
with the dataset editor's draw tools:
- Draw a point
- Draw a line
- Draw a polygon
- Search places. You can search places in the toolbar. When you search for a country, region, postcode, place, locality, neighborhood, or address you will have the option to Save to dataset. This option is not available when searching POIs.
Edit feature properties: You can add, edit, and delete feature properties using tools in the panel on the left side of the dataset editor. You can also view feature properties in GeoJSON form by clicking the GeoJSON tab.
- Neither the Mapbox Studio dataset editor nor the Mapbox Datasets API supports the ability to replace all data in a dataset. To replace features in an existing dataset you can use either the Datasets API or the Mapbox Studio dataset editor to update individual features, or delete every feature individually and then insert new features.
Map canvas
You can interact directly with the features in your dataset on the map to draw, change or delete features.
- Geometry. Change the geometry by clicking on the feature, then clicking and dragging the points.
- Placement. Hover over the feature until you see , then click and drag to move the feature.
- Properties. To change the properties of a feature, click on the feature and edit properties in the panel on the left side of the editor.
You can delete a feature by selecting the feature and clicking
. You can select and delete multiple features at once using Shift + click + drag.Toolbar
The toolbar in the upper right will help you navigate the dataset editor.
Search places Search places search bar allows you to search for locations on the map. You can find this button on the top right. Type in what you're looking for and select the result and search will take you to the exact location. This search is powered by the
Search dataset
You can use
Search dataset to search your dataset by a property value. The search will return all features that contain that property value. Click on the thumbnail to jump to the feature on the map.Background style
Use the Mapbox Satellite, Mapbox Satellite Streets, and an empty canvas.
Background button to switch between background styles. These include the default dataset editor style,Reference tileset
In addition to the pre-loaded background layers, you can display a custom raster tilesets (such as your own custom satellite imagery, for example) between the basemap and your data as a reference for drawing new GeoJSON features. Click raster tileset uploaded to your account. You can remove the raster tileset by clicking Deselect or by clicking on the active tileset.
Reference tileset and select the tileset you would like to add. Note that this must be aHistory
View your history by clicking the
History button. The dataset keeps a history of all changes you made since the beginning of your current session. You can revert your changes in the current session, but your history will reset once you exit the dataset editor.Help
Mapbox Help and our contact page.
Help button includes the option to see a guided walkthrough of the dataset editor. As you scroll through this panel, you will see a list of keyboard shortcuts. At the top of the help panel, there are links toDataset information page
For each dataset, there is a dataset information page where you can review the tilesets that are connected to that dataset and do the same tasks that you can in the menu on the Datasets page.
Connected tilesets
The center of the dataset information page contains a list of all connected tilesets, which can be added to your styles as new custom layers.
Menu items
The same items that exist in the menu for each dataset on the Datasets page are listed on the right side of the dataset information page. See the menu options at the bottom of this page.
Dataset characteristics
In the lower right side of the dataset information page, there are several characteristics that are listed for each dataset.
- Size. Size of the dataset.
- Feature count. The number of features included in the dataset.
- Bounds. The coordinate bounds the dataset resides within, which are both listed and displayed on a satellite map.
Edit dataset
Click
Edit to open the dataset editor and make changes to the dataset.You can use the Mapbox Studio dataset editor to import, create, and edit point, line, and polygon features and their properties. A collection of these features in Mapbox is called a dataset. Datasets can either be downloaded as GeoJSON or exported to tilesets for use in Mapbox styles (see the Guides for more information).
Mapbox Studio topics covered in this section:
Upload
Dataset
Tileset
Template style
Custom style
Add data to style
Style data
Publish
Manage datasets
Your Datasets page in Mapbox Studio provides a list of your existing datasets as well as a link to create a new dataset.
Search datasets
Use the
Search bar to filter or reorder your list of datasets. You can search for datasets by name or dataset ID and sort by name or date modified.Create a dataset
To create a new dataset, click the New dataset button at the top of the page. You can either start with a blank dataset or upload data as a starting point for your dataset.
If you start with a blank dataset, see the manage features section of this guide to learn how to add, change, and delete features in your dataset.
If you upload data to create a new dataset, it must be in one of the accepted data formats. The dataset upload process in Studio assigns a new id
to each feature in your source data file. See the Datasets API documentation for more information on how the feature object is formatted. If your workflow relies on features in your dataset having specific IDs, we recommend that you add a new field to the feature's properties
object in your source file rather than setting it in the feature's id
field, since this field will be overwritten when your file is uploaded as a dataset in Studio.
Once your dataset is created, it opens in the dataset editor for editing.
- When you are uploading data to a dataset, that data must be in one of the accepted data formats.
- You can upload an unlimited number of files to any dataset in the Mapbox Studio dataset editor, but these files must be loaded 5 MB at a time.
- While datasets do not have a size limit, the Mapbox Studio dataset editor cannot display datasets larger than 20 MB. Datasets larger than 20 MB can still be downloaded from your Datasets page and accessed through the Mapbox Datasets API.
Menu options
Once a dataset is created, it will appear in the list on your Datasets page. There are several actions you can take with each dataset.
View details
Open the dataset information page for this data to see more details.
Export to tileset
Once exported, the tilesets can be added as a new custom layer to a Mapbox map in the Mapbox Studio style editor. You can also add a tileset directly to a web map by using Mapbox GL JS like in this example.
Download
Once created, you can download your data as a GeoJSON file to use with Mapbox GL JS or other web mapping applications.
Delete
Tileset deletion cannot be undone. Any tilesets that were derived from this dataset will stay intact, but you will no longer be able to update the data associated with those tilesets in the dataset editor.
Dataset ID
Each dataset has a unique ID. Use this ID when interacting with your dataset using the Mapbox Datasets API.