CARTO User Manual

CARTO User Manual

Go back

Build a dashboard with a local CSV file

Context

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. Once you have selected your file, lick on Continue.

    Data explorer import data select file

  1. Set the location and name of the output table. Once you have completed this configuration, click on Save here.

    Data explorer import data destination

  2. 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

  3. 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

  4. 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

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

    Map rename layer

  6. 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

  7. 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

  8. 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

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

    Map 3D view

    Map 3D

  10. 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

  11. 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

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

    Map rename formula widget

    Map formula widget renamed

  13. 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

  14. 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

  15. 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

  16. 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

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

    Map interactions selected fields

  18. 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

  19. 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

  20. 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

  21. 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

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

    Map duplicate layer

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

    Map rename duplicated layer

  24. 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

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

    Map visible layers

  26. 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

  27. 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

  28. 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

  29. 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

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

    Map first filter

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

    Map second filter

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

    Map share button

  33. 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

  34. Finally, we can visualize the result.