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

Tutorials  /  Using Builder  /  Guides

Example - Analyze Barcelona Biking Data

Learn how to analyze and visualize Barcelona's public bike distribution and availability with CARTO Builder.

You will need to import the following dataset/s into your account:

  • New York subway stations: biking_sheet. You can download it from here.

In order to download them to your local machines, you are using CARTO SQL API behind the scenes.

Create a map

  • Click on NEW MAP.
  • Click on CONNECT DATASET.
  • Drag and drop biking_sheet1.
  • Click on CONNECT DATASET.
  • Click on Don't show me this again to avoid modals.
  • You can rename the map title as “biking Barcelona” by double-clicking on it.

map

Layers

  • Add new layer:
    • We are going to click on the button ADD in order to add a new layer on the map. In the add layer menu, we will click on the DATA LIBRARY and will look for barcelona. We will seelct the Barrios de Barcelona dataset. Finally we will drag and drop layer B below layer A in order to have the biking stations as the top layer and the neighbourhoods of Barcelona as a low layer.

layers_ordered

  • Click on one of the layers to show its components:
    • DATA tab: an overview of your table schema; from here you can also add widgets. If you want to have a look at your dataset, click the Data View icon, located on the bottom right of Builder when a map layer is selected.
    • ANALYSIS: Add analysis.
    • STYLE: Change styles.
    • POP-UP: Add pop-up.
    • LEGEND: Add legend

Have a look at the letter and number the layers card has (A or B). This would be very useful for adding widgets and analysis. Depending on the order in which you added your data, your layer letters could be different than the screenshots. In this example, biking stations are layer A, and neighbourhoods of Barcelona are layer B.

Analysis

Data observatory

  • Go to the edit pane.
  • Click layer barris_barcelona and then select the Analysis tab. Finally, click on the ADD ANALYSIS button in order to add the analysis.
  • Select Enrich from Data Observatory analysis.
  • Click on ADD ANALYSIS.
  • Set the parameters as follows:
    • New COL. NAME: population.
    • COUNTRY: SPAIN.
    • MEASUREMENT: Age and Gender.
    • SEGMENTS: Total Population.
  • Now click on APPLY to see the result of the analysis. If we open the table view of the layer barris_barcelona we will see the new population column added to the layer.

filter

Styling

  • Go to the edit pane, click on the barris_barcelona layer B and select the STYLE tab. Set the Fill color BY VALUE and select the population column to style the polygons using the population.

style

  • Then, go to the edit pane, click on the biking_sheet1 layer A and select the STYLE tab. Set the Fill color to BY VALUE and select the type column. Finally, set the Fill size to BY VALUE and select the bikes column to see the number of bikes for each station visually.

style

Widgets

  • Go to the edit pane and click on the widgets tab.
  • Click on ADD WIDGET button.
    • Under the CATEGORY tab, click on the check box of variables street_name and status
    • Under the ‘HISTOGRAM’ tab, click on the check box of variables population
    • Under the ‘FORMULA’ tab, click on the check box of variable point_count.
  • Click on CONTINUE

widgets

Customize widgets

  • Reorder widgets: From WIDGET tab, drag and drop them into your preferred order.
  • Rename widgets: From WIDGET tab, rename each widget by clicking on its three blue dots and selecting the option to Rename.

Publish

  • Click on SHARE.
  • Set the map’s privacy to LINK or PUBLIC.
  • Click on PUBLISH.
  • Now you can share the map:
    • Link: https://public.carto.com/builder/11a01495-5512-4296-bffe-263159bff955/embed
    • iframe:

Remember to update your map every time you make a change. To see those changes refresh your embed, or the web page where your map is hosted.