File tree 2 files changed +10
-30
lines changed
2 files changed +10
-30
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,6 @@ source: Rmd
6
6
---
7
7
8
8
9
- ``` warning
10
- Warning in
11
- download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip",
12
- : cannot open URL
13
- 'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip':
14
- HTTP status was '500 Internal Server Error'
15
- ```
16
-
17
- ``` error
18
- Error in download.file("https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip", : cannot open URL 'https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_graticules_all.zip'
19
- ```
20
9
21
10
::::::::::::::::::::::::::::::::::::::: objectives
22
11
@@ -90,24 +79,19 @@ unique(DSM_HARV_df$fct_elevation)
90
79
Levels: (305,342] (342,379] (379,416]
91
80
```
92
81
93
- And we can get the count of values in each group using ` dplyr ` 's ` group_by() `
94
- and ` count() ` functions:
82
+ And we can get the count of values in each group using ` dplyr ` 's ` count() ` function:
95
83
96
84
97
85
``` r
98
86
DSM_HARV_df %> %
99
- group_by(fct_elevation ) %> %
100
- count()
87
+ count(fct_elevation )
101
88
```
102
89
103
90
``` output
104
- # A tibble: 3 × 2
105
- # Groups: fct_elevation [3]
106
91
fct_elevation n
107
- <fct> <int>
108
- 1 (305,342] 418891
109
- 2 (342,379] 1530073
110
- 3 (379,416] 370835
92
+ 1 (305,342] 418891
93
+ 2 (342,379] 1530073
94
+ 3 (379,416] 370835
111
95
```
112
96
113
97
We might prefer to customize the cutoff values for these groups.
@@ -159,18 +143,14 @@ And we can get the count of values in each group in the same way we did before:
159
143
160
144
``` r
161
145
DSM_HARV_df %> %
162
- group_by(fct_elevation_2 ) %> %
163
- count()
146
+ count(fct_elevation_2 )
164
147
```
165
148
166
149
``` output
167
- # A tibble: 3 × 2
168
- # Groups: fct_elevation_2 [3]
169
150
fct_elevation_2 n
170
- <fct> <int>
171
- 1 (300,350] 741815
172
- 2 (350,400] 1567316
173
- 3 (400,450] 10668
151
+ 1 (300,350] 741815
152
+ 2 (350,400] 1567316
153
+ 3 (400,450] 10668
174
154
```
175
155
176
156
We can use those groups to plot our raster data, with each group being a
Original file line number Diff line number Diff line change 5
5
"config.yaml" "8f4c7a49b9d32beef686bcd8ae3e4c5f" "site/built/config.yaml" "2024-06-04"
6
6
"index.md" "8704017272467874007912c316744a00" "site/built/index.md" "2024-06-04"
7
7
"episodes/01-raster-structure.Rmd" "93bf05e4999d6545ba0f3f1ba1aafdaa" "site/built/01-raster-structure.md" "2024-06-15"
8
- "episodes/02-raster-plot.Rmd" "3bc30659ae4d91c31a1175ff7127531a " "site/built/02-raster-plot.md" "2024-06-04 "
8
+ "episodes/02-raster-plot.Rmd" "5de487340aa50257089b12295059018b " "site/built/02-raster-plot.md" "2024-06-15 "
9
9
"episodes/03-raster-reproject-in-r.Rmd" "d11ff839db427f11b0f0d5e8f7825c80" "site/built/03-raster-reproject-in-r.md" "2024-06-04"
10
10
"episodes/04-raster-calculations-in-r.Rmd" "a100233c7c80bcae34c0112d10980d0d" "site/built/04-raster-calculations-in-r.md" "2024-06-04"
11
11
"episodes/05-raster-multi-band-in-r.Rmd" "cc2d67a1e5356d3684289205221a8233" "site/built/05-raster-multi-band-in-r.md" "2024-06-04"
You can’t perform that action at this time.
0 commit comments