Example - Analyze Barcelona Biking Data
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.
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 theDATA LIBRARY
and will look forbarcelona
. We will seelct theBarrios 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.
- We are going to click on the button
- 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
orB
). 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 theAnalysis
tab. Finally, click on theADD 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 layerbarris_barcelona
we will see the newpopulation
column added to the layer.
Styling
- Go to the edit pane, click on the
barris_barcelona
layer B and select theSTYLE
tab. Set theFill
colorBY VALUE
and select thepopulation
column to style the polygons using the population.
- Then, go to the edit pane, click on the
biking_sheet1
layer A and select theSTYLE
tab. Set theFill
color toBY VALUE
and select thetype
column. Finally, set theFill
size toBY VALUE
and select thebikes
column to see the number of bikes for each station visually.
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 variablesstreet_name
andstatus
- 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
.
- Under the
- Click on
CONTINUE
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 toRename
.
Publish
- Click on
SHARE
. - Set the map’s privacy to
LINK
orPUBLIC
. - 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.