CARTO User Manual

CARTO User Manual

Go back

Build a dashboard with a local CSV file


In this tutorial we are going to showcase how to upload a local CSV file to your CARTO Data Warehouse and then use it to build an interactive dashboard with our map-making tool, Builder.

As a local CSV file in this example we are going to use a dataset with a sample of CARTO Spatial Features dataset in Las Vegas. You can download this file from here.

Steps To Reproduce

  1. Go to the CARTO signup page.

    • Click on Log in.
    • Enter your email address and password. You can also log in with your existing Google account by clicking Continue with Google.
    • Once you have entered your credentials: click Continue.

    Log in Email and password

  2. From the Navigation Menu in the left panel, select Data Explorer.

    Menu features data explorer

  3. Click on the icon for uploading a local file that you can find at the top of the Connections tab.

    Data explorer import button

  4. In the modal screen, select the local file you want to upload and give a name to the imported table. The file will be uploaded to the CARTO Data Warehouse, and as mentioned in the introduction of this tutorial, we are going to use a dataset with a sample of CARTO Spatial Features that you can download from here. Click on Continue.

    Data explorer import data select file

  5. Review the details before starting the importing process and then click on Import. This will start the importing process, you can minimise the modal screen and continue working in CARTO while the file is being imported.

    Data explorer import data confirmation

    Data explorer import data importing

  6. When the import process completes, we can click on Access Dataset from the process window, and it will take you to the page of the imported table in the Data Explorer.

    Data explorer process window view dataset

    Data explorer imported table

  7. We click on Create map in order to start a map in CARTO Builder with the table loaded as a first layer.

    Map create map from table

  8. We can change the layer name to something like “Spatial Features - Las Vegas”.

    Map rename layer

  9. We can also then start styling the layer. We click on Layer style and we are going to start by styling the hexagons based on one attribute. For that we click on the “three dots” icon in the Color section and we select that “Color Based On” the field population.

    Map fill color based on

  10. We change the Opacity to 0,6 to be able to visualize the information from the basemap (which we will change on a later step).

    Map change opacity

  11. We are going to activate the “Height” option and define “Height Based On” the field elevation. We configure the “Elevation Scale” to be 20 and the “Height Range” between 0 and 500.

    Map height

  12. We can modify the visualization to be a map in 3D by modifying the “Map view” options.

    Map 3D view

    Map 3D

  13. We are now going to add some widgets to the map in order to be able to filter out the data and get some insights. Let’s now move to the “Widgets” section.

    Map widgets tab

  14. We are going to first add a Formula widget that sums the total population. We modify the “Formatting” to the “12.3k” format.

    Map formula widget

  15. We change the widget name to “Total Population”.

    Map rename formula widget

    Map formula widget renamed

  16. We add a second widget to the map, now based on the “Histogram” type. We select the field elevation and modify the number of buckets to 12. We rename the widget to “Elevation”.

    Map histogram widget renamed

  17. Let’s add a third widget to the map! We will now select the type “Category” and select the field urbanity from our table, leaving the operation to “Count”. We change the widget name to “Urbanity level”.

    Map category widget renamed

  18. We are going to add a final “Histogram” widget. For this one, we are going to pick the field prec_apr from our table and change the number of buckets to 12. We change the name of the widget to “Avg. Precipitation April”.

    Map second histogram widget renamed

  19. We are now going to design the popup/info-windows that appear when we hover over the hexagon cells from the H3 grid. For that we move to the “Interactions” section.

    Map interactions tab

  20. In the Tooltip we are going to select the following fields: population, urbanity, elevation and prec_apr.

    Map interactions selected fields

  21. Check that now when we hover our cursor over the cells we see the information from the selected fields in the previous step.

    Map interactions window

  22. We are now going to select the type of basemap that we want for our map. We move to the “Base maps” section.

    Map basemaps tab

  23. We can pick basemaps from different providers, such as CARTO, Google Maps and Amazon Location. For example we are going to modify the default basemap by CARTO’s Voyager edition.

    Map basemaps carto voyager

  24. Another cool functionality of CARTO Builder is the ability to have a dual map configuration. We can switch to this mode by selecting it from the “Map view” options.

    Map dual view

    Map dual

  25. In order to have a different visualization in each of the maps. We are going to duplicate our current layer.

    Map duplicate layer

  26. We rename the layer as “B Layer”.

    Map rename duplicated layer

  27. We now ensure that each of the 2 maps is visualizing a different layer. For this we click on the button Show layer panel.

    Map show layer panel

  28. In each of the maps we make visible only one of the layers.

    Map visible layers

  29. We are going to modify the second layer. For that we click on Layer style in one of the options for the layer named “B Layer”.

    Map layer style

  30. We are going to style the color of the layer based on the field tavg_apr (i.e. average temperature in the months of April over a period of 20 years). We can pick a different color palette.

    Map second layer fill color

  31. We are going to use the attribute prec_apr (i.e. average precipitation in the months of April over a period of 20 years) as the Height.

    Map second layer height

    Map dual styled

  32. Now that we are done styling our layers, we can hide the editor panel by clicking on the icon below and start operating the dashboard through the widgets.

    Map editor panel hidden

  33. For example we can filter the layers in order to analyse the Rural and Remote areas with higher precipitations in April.

    Map first filter

  34. Or we can filter the Very high density urban, High density urban and Medium density urban areas at higher elevations.

    Map second filter

  35. We can finally change the privacy settings of the map or even publishing it online by clicking on the “Share” options.

    Map share button

  36. We select the option to make this a “Public map”, which we then can share by providing an URL.

    Map public option

    Map public option

  37. Finally, we can visualize the result.