Datasets

Behind the scenes, the CARTO geospatial database is built on the PostgreSQL platform and supports advanced PostGIS capabilities. When you import data with the CARTO Editor, you are connecting a dataset to a standard database.

Connect Dataset

You can import data from a local file (or public URL), connect to an external dataset, or create an empty dataset.

Click Your datasets from the dashboard drop-down menu

The page refreshes displaying a list of your datasets.

Click NEW DATASET

The Connect dataset options appear.

Tip: For details about the Let CARTO automatically guess data types and content on imports behavior, see Import Guessing for details.

Click the type of dataset you want to connect to

Tip: Use the arrow buttons to scroll for more options.

The following connect dataset options are available.

Connect Dataset

Description

Data file

Drag and drop a file directly onto the Connect dataset dialog to add it, or click BROWSE to select a local file to upload. You can also enter and submit a public URL to upload data from.

Connect a dataset by syncing to an external Google Drive. For details, see Syncing Datasets.

Note: The external data sources that appear are managed by CARTO (see step 5 of this procedure).

- First, you must enable the Google Drive Connect to external data sources option, available from your account options

- Once you allow access to your account, you can connect to your Google Drive through the connect dataset options

Dropbox

Connect to a dataset by syncing to a external Dropbox. For details, see Syncing Datasets. Some file formats are not supported with Dropbox. Select Dropbox to view which file formats are available (CSV, XLS).

Note: The external data sources that appear are managed by CARTO (see step 5 of this procedure).

- First, you must enable the Dropbox Connect to external data sources option, available from your account options

- Once you allow access to your account, you can connect to your Dropbox through the connect dataset options

Box

Connect a dataset by syncing to an external box files. Select Box to view which file formats are available (CSV, XLS). You can access your Box account, upload secure files and content, and sync your datasets.

Note: The external data sources that appear are managed by CARTO (see step 5 of this procedure).

- First, you must enable the Box Connect to external data sources option, available from your account options

- Once you allow access to your account, you can connect to your Box account through the connect dataset options

Tip: There is known issue when requesting parallel Box imports; the first import may fail and the second succeeds. This is due to the access and request tokens from the Box connector. CARTO is aware of this and is working to improve this behavior. For best practices, import one Box file at a time to avoid errors.

Additionally, it may take some time for your new Box files to appear in the CARTO import list, due to Box Search API latency issues.

After your external connectors are enabled and connected, the connect dataset options allow you to import external data and activates the CONNECT DATASET button.

Click CONNECT DATASET

Tip: There is a shortcut to set the dataset privacy option. By default, your dataset is private.

Click the icon to toggle between public and private, before connecting your dataset

Your data (or external dataset) is imported and uploaded to your datasets dashboard. If your import fails, see Import Errors for a list of known errors and solutions.

Create an Empty Dataset

Optionally, you can add data manually or programmatically, with the Connect Dataset option.

Click Your datasets from the dashboard drop-down menu

The page refreshes displaying a list of your datasets.

Click NEW DATASET

The Connect dataset options appear.

Click Create empty dataset

A blank dataset containing the default CARTO columns and indexes are created and formatted.

Add rows and columns to your dataset with the CARTO sidebar options, or by using the context menu items

For example, the following options display how to add a row

Additionally, you can add point, line, and polygon coordinates to your dataset with the Add Feature option, available from the MAP VIEW of the CARTO sidebar. For details, see Add Feature.

Locating Geospatial and Mappable Data

Ideally, you will upload your own location-based data to CARTO and create maps. If you do not have any data, or if you need help locating geospatial and mappable data (beyond our public Data Library options), CARTO recommends the following external resources. If you an Enterprise user, you can also use our Data Observatory catalog.

Syncing Datasets

Depending on your account type, you can sync datasets by connecting to an external Google Drive or Dropbox. You can even connect and sync data with a public URL. This high-level overview describes the workflow for syncing datasets. Additionally, when connecting to a dataset from the CARTO data library, these sync options also appear.

Tip: For details about connecting to external data sources, see the Connect Dataset procedure. For details about connecting to a public dataset, see Data Library.

Create a new dataset and select Google Drive or Dropbox as the external service

After your external connectors are enabled and connected, the connect dataset options display a list of your Google Drive, Dropbox or Box files

Choose which external files you want to import and select the Sync my data options

Tip: For details about the Let CARTO automatically guess data types and content on imports behavior, see Import Guessing for details.

Click CONNECT DATASET

Tip: There is a shortcut to set the dataset privacy option. By default, your dataset is private. Click the icon to toggle between public and private before, connecting your dataset.

Note: Contact Sales if you need help enabling this feature for your account.

Sync Dataset Options

If you have applied sync settings for your dataset, the shortest automatic syncing interval is every one hour. Optionally, you can force a manual synchronization up to every 15 minutes. The example image below shows the Sync settings option, located from the Edit menu of your datasets dashboard. Once a dataset is synced, the sync status appears above your table in the Data View.

Click Sync now to sync your data in real time

Alternatively, click view options to open the Sync Table options and select the sync settings

Data Library

The CARTO Data Library, available from your datasets dashboard, provides a list of public data libraries. You can connect to these public datasets and create a map. Examples of data in the Data Library include World Borders, European Countries, Urban Areas, and Populated Places.

From your datasets dashboard, click Data library to view a list of all the available datasets. Scroll to the bottom of the data library to navigate to other pages

From a selected public dataset, click Connect dataset or create map to add it to your dashboard.

If a dataset is colored red, this indicates that you cannot connect to the dataset since you do not have enough allocated quota to store the data.

Tip: When connecting to a dataset from the data library, you can select sync options for the data.

Edit the Dataset Privacy Settings when Connecting a Dataset

There is a shortcut to set the dataset privacy while connecting a new dataset. See the Connect Dataset procedure for complete details about how to connect a dataset.

From the connect dataset options, click the privacy icon to toggle between the public and private option

Note Datasets are private by default.

Click the privacy icon to change the dataset to public

Once you connect a dataset, you can change the privacy at any time by using the dashboard or dataset options, as described in the this section.

Edit the Dataset Privacy Settings from your Dashboard

The following procedure describes how to edit the dataset privacy settings from your datasets dashboard.

Click Your datasets from your dashboard drop-down menu

The datasets view appears, displaying all your datasets.

Select the privacy setting for a dataset

You can click Change privacy from the shortcut options that appear when a dataset is selected, or click the privacy setting directly from a named dataset.

The privacy options appear, from which you can change and save your settings.

Edit the Dataset Privacy Settings from a Selected Dataset

There are several ways to edit the privacy settings within the Data View or Map view for a selected dataset.

Click Your datasets from your dashboard drop-down menu

The datasets view appears, displaying all your datasets.

Click the name of a dataset

The selected dataset opens in the Data View. You can open the privacy options from the Edit menu and from the lock icon. Additionally, you can access the privacy options from within the Edit metadata options.

2a. Click Change privacy from the Edit menu.

The privacy options appear, from which you can change and save the privacy setting.

2b. Click the lock icon, next to the name of the dataset.

The privacy options appear, from which you can change and save the privacy setting.

2c. Click Edit metadata

The Dataset metadata options appear, from which you can click the privacy setting to open the privacy options to change and save your settings.

Dataset Metadata

You can edit the attributes for each dataset and add metadata for your data. This is useful for keeping your datasets organized and discoverable in a search, as your repository of datasets increases. You can edit dataset metadata from your datasets dashboard.

Datasets can be Private, Public or Links. Click the current status to change the privacy settings for the selected map

Click SAVE to close and save the dataset metadata attributes

Tip: You can add a description, add tags, or edit the dataset privacy setting directly from the your Datasets dashboard. Once an initial dataset description and tag is entered using this shortcut, you must click Edit metadata from the selected dataset if you need to update these attributes again.

Delete Dataset

There are multiple ways to delete a dataset with the CARTO Editor. You can delete a dataset from your (dashboard) or directly from your (Data View).

To Delete a Dataset from your Dashboard

Click Your datasets from the dashboard drop-down menu

The page refreshes, displaying a list of your datasets.

Select a dataset so that is it highlighted.

Tip: You can select multiple datasets to be deleted.

The dataset options appear at the top of the list.

Click Delete dataset from the datasets options

A confirmation dialog appears, indicating the number and/or name of the dataset(s) that you are deleting.

Click OK,DELETE

The dataset(s) is deleted and removed from your dashboard.

Note: Deleted datasets cannot be recovered and are permanently removed. It is recommended to export your dataset before deleting it if is important to you.

To Delete a Dataset from your Data View

Click Your datasets from the dashboard drop-down menu

The page refreshes displaying a list of your datasets.

Select the name of the dataset to view

The page refreshes displaying the Data View for the selected dataset.

Select Delete this dataset from the Edit drop-down menu

A confirmation dialog appears, indicating the name of the selected dataset that you are deleting.

Click OK,DELETE

The dataset is deleted and the page refreshes, displaying your datasets dashboard.

Viewing Datasets

Once you have connected a dataset, you can view your data with the DATA VIEW or the MAP VIEW. You can toggle between these two views.

Data View

Data View allows you to inspect, filter, and query your data and see the results in a spreadsheet format. The CARTO sidebar enables you to write SQL queries, apply basic filters, merge two uploaded datasets, and add rows and columns.

Map View

Map View allows you to inspect your data as a layer over a basemap. You may apply SQL queries or filters on the view, style the data’s symbology using our wizards (or by writing your own CartoCSS), and create infowindows.

In the Map View, you may style and filter your data but this view is not the same as a shareable map. In order to create a shareable map, click VISUALIZE.

Data Visualization

Once a dataset is connected, and you have customized your map, you can visualize how your map will appear when it is published. Visualizations store any filters or styles that you have applied to your map. If you have multiple layers applied to your map, you can also view how layers overlap with one another. This procedure describes how to visualize your data and create a map.

Select VISUALIZE from the Data View or Map View of the selected map. A confirmation dialog appears, indicating that you must publish a map in order to visualize your data

Click, OK, CREATE MAP

A map is automatically generated based on the name of your dataset

Note: By default, a map is created and added to your Maps dashboard using the same name as the selected dataset. You can always rename the map with the map metadata options. Once a map is visualized, you can publish it.

Tip: If you need to save a draft of your map while applying changes to a newer version, it is suggested to duplicate your map so that you have a backup copy of it. The Duplicate map option is available from the Edit drop-down menu of the Data View or Map View of a selected map. Note that style changes applied to a duplicate map are not applied to the original.

Analyzing your Dataset

In some cases, when you connect a dataset and click on the MAP VIEW for the first time, the Analyzing dataset dialog appears. This analytical tool analyzes the data in each column, predicts how to visualize this data, and offers you snapshots of the visualized maps. You can select one of the possible map styles, or ignore the analyzing dataset suggestions.

CARTO built the algorithm for this feature to help you discover insights about your data, and to encourage you to select non-default map types for visualization. When you select an analyzing dataset option, the CartoCSS code is automatically applied and displays the map style instantly.

The following steps describe how the analyzing datasets options appear.

Click SHOW to preview the suggested interesting map options based on select columns

Tip: In some cases, several options may be available. Use the left and right arrow buttons to scroll and view all the options. Optionally, click SKIP to close these options.

Click a previewed suggestion to apply it as the default style for your map layer

When you select an analyzing dataset option, the CartoCSS code is automatically applied and displays the map style instantly.

Click the X to close the Analyzing dataset dialog.

Note: The Analyzing dataset tool only appears once per dataset. Regardless of whether you choose a suggestion, or close the dialog box, it will not appear again. If you delete a dataset, and reimport it, CARTO stores the dataset name in a cache, so the analyzing dataset option does not reappear. A future version of this tool will allow the user to re-trigger the analysis.

Calculating the Analyzing Dataset Function

This section describes how the analyzing dataset function is calculated internally.

When you upload data, it reads most of the columns. This excludes the cartodb_id column which is automatically generated when uploading a dataset to Carto. Other common columns such as lat, long, longitude, etc. are ignored

The columns are measured by applying an overall weight according to several metrics, such as: geometry, percentage of null values, number of distinct or unique categories

For numeric data, the distribution type is calculated based on this function

Based on the calculation results, an appropriate color ramp, and quantification method to change the appearance of the map, are identified

The maps with a high enough weight are presented to the user in the calculated map style. These are the options that appear when clicking SHOW from the Analyzing dataset dialog box

Note: The Analyzing dataset function can only identify a Category, Choropleth, Bubble, or Torque map. Future analysis will include other map styles and suggest normalization. Additionally, the analyzing dataset tool identifies your column data based on the data type (number, _string, boolean, or time).

If the column data type is weighted as mostly string data with a small number of unique categories, it is identified as a Category map

If the column data type is weighted as mostly time data, it is identified as a basic Torque map

If the column data type is weighted as mostly number data, it is identified as a Choropleth or Bubble map. In some cases it will be chosen to be a Category map if there are a small number of unique values.

Supported Data Types

When you upload your data to CARTO, it will automatically assign a data type to your data such as string, number, date, or boolean. It’s important to check that the correct data type is assigned. It is especially important to make sure CARTO knows if a column is a date type so maps that rely on temporal information such as Torque, animate correctly.

The data type is located under the column name. It can be changed by clicking on the date type name under the column name to open a secondary navigation window from which you can select the correct data type.

Edit Dataset Options

The following options are available from the Edit menu of the Data View or Map View of a selected dataset.

Dataset Edit Menu Option

Description

Export

Export your dataset for use offline. For details, see how to Export Data

Creates a duplicate of your dataset so that you have a backup copy of it. Note that changes applied to a duplicate dataset are not applied to the original

Merge with dataset

Merge your current dataset with another existing dataset by performing a column join (merges two datasets based on a shared value) or a spatial join (merges two datasets based on a number of intersecting records). For details, see Merging Data