CARTO User Manual

CARTO User Manual

Build an animated visualization with time series


There is an increasing need for conservation and connection with nature in cities. In this sense, geospatial analysis plays an important role in the effective management of our natural resources.

In this tutorial we are going to represent the distribution of tree species in the streets of San Francisco by color and we will add some interaction through widgets, which will allow us to explore the map by selecting targered filters of interest. In this example, filters are applied by specie and date of planting.

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. Select the CARTO Data Warehouse connection and click on demo data > demo_tables from the collapsible tree.

    Data Explorer content carto data warehouse

  4. Selected “san_francisco_street_trees” and explore the preview of the map and the details of the table.

    Data Explorer map prewiew

    Data Explorer data prewiew

  5. Create a map by clicking on the Create > Create map button on the top. This will open the table as a layer on a CARTO Builder map. Check Creating a map from your data to get started.

    Data Explorer create map from table

  6. Change layer name to “San Francisco trees”.

    Map layers rename

  7. Change the basemap. Go to Basemaps tab and select “Dark matter” from CARTO.

    Map basemap

  8. Click on Layer style to start styling the layer.

    Map layers options

    Map layers style

  9. Click on the “three dots” icon in the Fill Color section and select “Color Based On” feature species. Pick a palette for a categorical variable (versus a gradient).

    Map fill style based on field

  10. Modify the Radius of the points to make them smaller.

Map style radius

  1. Go to Widget tab. If you haven’t created a widget yet, you will see the following page:

    Map widgets add new widget

  2. Add a widget based on the column species. Now we can filter the data based on type of tree.

    Map widgets first widget

    Map widgets first widget_values in

  3. Add a second widget, now based on plant_date. This will generate a time-series widget directly on the map.

    Map widgets second widget

  4. Modify the time window to be “incremental”.

    Map widgets second widget incremental

  5. Now let’s configure the tooltip (or info window). Go to Interactions tab, activate the tooltip and select the field species.

    Map widgets new tooltip

  6. We can make the map public and share it online with our colleagues. For more details, see Publishing and sharing maps.

    Map public map

  7. Finally, we can visualize the result.