Tip:
Highlight text to annotate it
X
In this video we will learn how to add, or "join" new attributes to a shape layer.
In previous tutorials, we saw that shape sources like shapefiles or database tables
often include attributes in addition to the geometry of the shapes.
In many cases, we may want to visualize attributes that do not come from the same file or database as the shape.
We can do this in GeoCanvas by joining new attributes to a shape layer.
For instance, in the "Coloring with Data" tutorial,
we showed the countries of the world
colored by the total number of summer olympic medals each country had won.
The original countries shapefile that we used
contained only a set of polygons representing each country.
We obtained olympic medal data from Wikipedia
formatted it as a "CSV,"
or "comma-separated value" file, in Excel,
then joined the attributes in the CSV file to the countries shapefile.
Just as with shape layers, attributes can be stored in files or in databases.
Let's see another example.
Here we see a shapefile with all the parcels in the San Francisco Bay area that we loaded into GeoCanvas.
The shapefile contains attributes
such as the city and county to which the parcel belongs.
Each column in this table corresponds to an attribute.
A collection of attributes is referred to as "dataset" in GeoCanvas.
Now, we have this other dataset that describes how close each parcel in San Francisco is to different amenities,
like restaurants, yoga, sushi, and bars.
This dataset is stored in a CSV file.
We can join a dataset with attributes to any shape layer.
To do so, we click on the "Add Dataset" button
and specify the file or the database table that contains the dataset.
Here's the amenties file. We open it and select the "Join Field" in the shape layer.
The "Join Field" is a column that is present in the shape layer and is also in the dataset.
This is how GeoCanvas knows how to match rows of attributes to individual parcel shapes.
For this example, the join field is "osm_node_id."
Once we load the amenities dataset, we can pick an attribute that we want to visualize on the map.
For instance, here is the map for sushi proximity.
The darker parcels are the ones that are closer to sushi restaurants.
Here's another map for proximity to yoga centers,
and another one showing proximity to bars.
We can turn on the legend to see the minimum and maximum attribute values associated with each color.