Hey! This content applies only to previous CARTO products

Please check if it's relevant to your use case. On October 2021 we released a new version of our platform.
You can learn more and read the latest documentation at docs.carto.com

Questions  /  Working with Data  /  Intro to Data

How to Give Attribution

Learn how to provide the proper attribution for your maps and data

Why should I use attribution?

When you create a map or analyze data in CARTO, you are using a variety of technologies and service providers that are part of the CARTO platform. They require attribution. Please visit this page for more specifics about which elements of your project require attribution, and what type of attribution they should use.

In some cases CARTO automatically adds the attribution. In others you will need to add it. This guide outlines both cases, and gives examples of how to implement attribution yourself.

Datasets

Attribution is not automatically added to datasets. You can easily include it this way:

  1. Log into your CARTO dashboard and enter part of your dataset’s name into the Search field. Click on the appropriate result to open the dataset.

  2. Click the three dots next to the dataset title and select Edit metadata. That will open a Dataset metadata screen.

  3. Enter the appropriate attribution text in the ATTRIBUTIONS field. You can also choose a license type in the LICENSE field, and enter a url or text in the SOURCE field. Click SAVE.

Dataset attribution

Tip: You can also access the metadata screen by mousing over your dataset title in the dashboard Home screen’s Data section, or the dashboard Data panel. That will reveal a button with three dots. Click on it, and select Edit name & description.

This custom attribution will automatically appear in Builder maps that use CARTO basemaps, next to the basemap attribution text.

Basemaps

Attribution is added automatically for CARTO basemaps. Since CARTO basemaps incorporate OpenStreetMap data, OpenStreetMap attribution is automatically included.

Attribution is also automatically added for Stamen, Nokia HERE, Mapbox, and NASA basemaps in Builder maps.

This attribution is visible when you click on a Builder map’s question mark icon.

Basemap attribution

It also appears automatically when the Builder map is exported as an image.

Builder

Builder maps automatically show the basemap attributions described above. Builder maps that use CARTO basemaps also show dataset attribution.

Basemap and Dataset attribution

CARTO.js

Attribution is automatically added for CARTO.js maps that use CARTO basemaps in a Leaflet map object or Google basemaps in a Google map object. Other attributions need to be inserted manually in the code.

Leaflet attribution

Here’s an example showing where to add custom attribution in a Leaflet Map Object:

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {
	foo: 'bar',
	attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
}).addTo(map);

Note: See more information about Leaflet attribution here.

CARTO VL

Attribution for CARTO basemaps is automatically included in CARTO VL maps.

Since CARTO VL maps incorporate Mapbox GL technology, it is also possible to add custom attribution.

That can be included in the Mapbox GL map object this way:

const map = new mapboxgl.Map({
	container: 'map',
	style: carto.basemaps.darkmatter,
	center: [-3.6908, 40.4297],
	zoom: 14,
	customAttribution:[
		"my custom attribution 1",
		"my custom attribution 2",
	]
});

CARTO VL attribution

Note: See the Mapbox GL JS API documentation for additional attribution display options using their AttributionControl.

Printed Maps

In Builder there is an option to Export your map as an image. When a map is exported, the attributions mentioned in the Builder section above are automatically added.

Maps created with the carto-print Python library do not include attribution automatically. The attribution needs to be included in your printed publication.