Importing OpenStreetMap Data
This tutorial will walk you through the basics of exporting OpenStreetMap data for use in the CARTO Editor. This is a good introductory tutorial if you are unfamiliar with OpenStreetMap data. For a more advanced tutorial on downloading and using OpenStreetMap data, check out our tutorial on using Overpass Turbo.
What is OpenStreetMap?
OpenStreetMap allows us to export data on many of the features that make up our cities, including polygons for neighborhoods and cities, roads, and even lampposts. OpenStreetMap data is contributed by a diverse community. It is rich with local knowledge and frequently updated.
Getting OpenStreetMap Data
OpenStreetMap data can be exported directly from the OpenStreetMap website.
After loading the website, move the map to an area from which you wish to download data. Click on the Export menu option located on the top left side of the website. This will bring up a second export menu button in the left sidebar. You can confirm the area you wish to download by checking the bounding box in the sidebar before clicking Export in the sidebar. Your OSM data will automatically begin to download.
Quick Tip: OSM data can be quite large, make sure you are zoomed in enough to limit the size of the dataset you download.
Using OpenStreetMap Data in CARTO
CARTO is setup to easily handle the import of OpenStreetMap data. Simply navigate to the Datasets section of your map, select “Connect Dataset” and upload the downloaded file. Once the data is imported, you will be able to view it from the Data View of the CARTO Editor.
Once your data is uploaded, don’t forget to cite the source of the data back to OpenStreetMap in the descripton of your dataset. As part of using OpenStreetMap data, you must give credit to OpenStreetMap per their Copyright and License agreement. You should add an OpenStreetMap link and credit if you don’t plan on using an OSM basemap where the credit is already included by CARTO.
You can add attribution to OpenStreetMap by editing the metadata associated with your dataset by selecting the “Edit metadata” link in the upper left corner of your dataset in the Data View of the CARTO Editor.
Add the attribution tag to the metadata description.
That’s it! Now you can easily use OpenStreetMap data in any of your maps from within the CARTO Editor.