Skip to content

Commit a17c688

Browse files
authored
Merge pull request #7 from UCSB-Library-Research-Data-Services/chapter/layers-2-basemap
Chapter/layers 2 basemap
2 parents fe5d991 + 01eca3f commit a17c688

File tree

7 files changed

+51
-4
lines changed

7 files changed

+51
-4
lines changed

01_make_map.qmd

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,58 @@ In there, you can add a title, tags, and a short description of your map.
129129

130130
## Step 2: Customize symbology & transparency
131131

132-
Based on data `street_pavement`
132+
After adding our three layers, we have some work to do to make the map more readable. First, let's adjust the symbology of the bike racks layer to reduce its size and change its symbol to a bike icon.
133133

134-
1. Create filter to show only bikepaths
135-
2. Join 2 filters together to *OR* sidewalks
136-
3. Adjust symbology in some way (TBD)
134+
- Click on the layer `bike_racks_ucsb` to open its properties panel.
135+
- On the panel `Symbology`, click on `Edit layer style`.
136+
- Look for the `② Pick a style` option and select `Style options`.
137+
- Click on the pencil icon next to `Symbol style` to open the symbol selector.
138+
139+
There, we have multiple options to customize the symbol. Let's click on the current symbol chevron to open the full symbol gallery.
140+
141+
From the menu, we can select several categories of symbols. Let's select the `Government` category and look for a bike parking icon. Click on the `Done` button to apply the changes and return to the symbol style panel.
142+
143+
![](images/Workshop1/Step2/symbology-select-symbol.png){width="90%" fig-align="center"}
144+
145+
To change the size of the symbol, we can use the `Size` slider to reduce it to a more appropriate size. In this case, we're using 5.68 px. Also, select "Adjust size automatically" if you want the symbols to scale as you zoom in and out of the map.
146+
147+
![](images/Workshop1/Step2/symbology-point-size.png){width="90%" fig-align="center"}
148+
149+
150+
### Adjust style based on attribute
151+
152+
Now, what if we wanted to adjust the symbology based on an attribute? Let's say we wanted to fill each building with a different color based on its use (academic, residential, administrative, etc.). We can do that by changing the style of the `UCSB Campus Buildings` layer.
153+
154+
- Click on the layer `UCSB Campus Buildings` to open its properties panel.
155+
- On the panel `Symbology`, click on `Edit layer style`.
156+
- Look for the `① Choose attributes` option and select `+ Field`.
157+
- Select the attribute `b_use`, which stands for building use, and click on `Add`.
158+
159+
![](images/Workshop1/Step2/symbology-by-attribute.png){width="90%" fig-align="center"}
160+
161+
As a result, you will see that the buildings are now filled with different colors based on their use. You can further customize the colors by clicking on the color ramp and selecting a different one.
162+
163+
![](images/Workshop1/Step2/symbology-by-attribute-result.png){width="90%" fig-align="center"}
164+
165+
### Adjust layer transparency based on attribute
166+
167+
Finally, let's say we wanted to adjust the transparency of cycleways based on the max speed allowed on each bike path. We can do that by changing the style of the `osm_cycleways` layer.
168+
169+
- Click on the layer `osm_cycleways` to open its properties panel.
170+
- On the panel `Symbology`, click on `Edit layer style`.
171+
- Look for the `② Pick a style` option and select `Style options`.
172+
- Open the panel `Transparency by attribute` and switch the toggle to set the transparency based on attribute values.
173+
- Select the attribute `maxspeed`.
174+
175+
As a result, you will see that the bike paths are now more transparent for higher speed limits and less transparent for lower speed limits.
176+
177+
To increase the visibility of the bike paths, we can increase the width of the lines by editing the `Width` slider on the `Symbol style` panel. We selected 3.75 px for this example.
178+
179+
![](images/Workshop1/Step2/symbology-transparency-by-attribute.png){width="90%" fig-align="center"}
180+
181+
Here is the final result of our symbology adjustments:
182+
183+
![](images/Workshop1/Step2/symbology-final-result.png){width="90%" fig-align="center"}
137184

138185
## Step 3: Annotate the map
139186

1.33 MB
Loading
1.7 MB
Loading
2.23 MB
Loading
1.02 MB
Loading
1.62 MB
Loading
876 KB
Loading

0 commit comments

Comments
 (0)