@@ -86,34 +86,34 @@ object, (for example, `as_tibble()` would return a `tibble`).
86
86
87
87
Current methods and functions provided by ** tidyterra** are:
88
88
89
- | tidyverse method | ` SpatVector ` | ` SpatRaster ` |
90
- | --------------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------- ----|
91
- | ` tibble::as_tibble() ` | ✔️ | ✔️ |
92
- | ` dplyr::select() ` | ✔️ | ✔️ Select layers |
93
- | ` dplyr::mutate() ` | ✔️ | ✔️ Create /modify layers |
94
- | ` dplyr::transmute() ` | ✔️ | ✔️ |
95
- | ` dplyr::filter() ` | ✔️ | ✔️ Modify cells values and (additionally) remove outer cells. |
96
- | ` dplyr::slice() ` | ✔️ | ✔️ Additional methods for slicing by row and column. |
97
- | ` dplyr::pull() ` | ✔️ | ✔️ |
98
- | ` dplyr::rename() ` | ✔️ | ✔️ |
99
- | ` dplyr::relocate() ` | ✔️ | ✔️ |
100
- | ` dplyr::distinct() ` | ✔️ | |
101
- | ` dplyr::arrange() ` | ✔️ | |
102
- | ` dplyr::glimpse() ` | ✔️ | ✔️ |
103
- | ` dplyr::inner_join() ` family | ✔️ | |
104
- | ` dplyr::summarise() ` | ✔️ | |
105
- | ` dplyr::group_by() ` family | ✔️ | |
106
- | ` dplyr::rowwise() ` | ✔️ | |
107
- | ` dplyr::count() ` , ` tally() ` | ✔️ | |
108
- | ` dplyr::bind_cols() ` / ` dplyr::bind_rows() ` | ✔️ as ` bind_spat_cols() ` / ` bind_spat_rows() ` | |
109
- | ` tidyr::drop_na() ` | ✔️ | ✔️ Remove cell values with ` NA ` on any layer. Additionally, outer cells with ` NA ` are removed. |
110
- | ` tidyr::replace_na() ` | ✔️ | ✔️ |
111
- | ` tidyr::fill() ` | ✔️ | |
112
- | ` tidyr::pivot_longer() ` | ✔️ | |
113
- | ` tidyr::pivot_wider() ` | ✔️ | |
114
- | ` ggplot2::autoplot() ` | ✔️ | ✔️ |
115
- | ` ggplot2::fortify() ` | ✔️ to ** sf** via ` sf::st_as_sf() ` | To a ** tibble** with coordinates. |
116
- | ` ggplot2::geom_*() ` | ✔️ ` geom_spatvector() ` | ✔️ ` geom_spatraster() ` and ` geom_spatraster_rgb() ` . |
89
+ | tidyverse method | ` SpatVector ` | ` SpatRaster ` |
90
+ | ----| ----| ----|
91
+ | ` tibble::as_tibble() ` | ✔️ | ✔️ |
92
+ | ` dplyr::select() ` | ✔️ | ✔️ Select layers |
93
+ | ` dplyr::mutate() ` | ✔️ | ✔️ Create /modify layers |
94
+ | ` dplyr::transmute() ` | ✔️ | ✔️ |
95
+ | ` dplyr::filter() ` | ✔️ | ✔️ Modify cells values and (additionally) remove outer cells. |
96
+ | ` dplyr::slice() ` | ✔️ | ✔️ Additional methods for slicing by row and column. |
97
+ | ` dplyr::pull() ` | ✔️ | ✔️ |
98
+ | ` dplyr::rename() ` | ✔️ | ✔️ |
99
+ | ` dplyr::relocate() ` | ✔️ | ✔️ |
100
+ | ` dplyr::distinct() ` | ✔️ | |
101
+ | ` dplyr::arrange() ` | ✔️ | |
102
+ | ` dplyr::glimpse() ` | ✔️ | ✔️ |
103
+ | ` dplyr::inner_join() ` family | ✔️ | |
104
+ | ` dplyr::summarise() ` | ✔️ | |
105
+ | ` dplyr::group_by() ` family | ✔️ | |
106
+ | ` dplyr::rowwise() ` | ✔️ | |
107
+ | ` dplyr::count() ` , ` tally() ` | ✔️ | |
108
+ | ` dplyr::bind_cols() ` / ` dplyr::bind_rows() ` | ✔️ as ` bind_spat_cols() ` / ` bind_spat_rows() ` | |
109
+ | ` tidyr::drop_na() ` | ✔️ | ✔️ Remove cell values with ` NA ` on any layer. Additionally, outer cells with ` NA ` are removed. |
110
+ | ` tidyr::replace_na() ` | ✔️ | ✔️ |
111
+ | ` tidyr::fill() ` | ✔️ | |
112
+ | ` tidyr::pivot_longer() ` | ✔️ | |
113
+ | ` tidyr::pivot_wider() ` | ✔️ | |
114
+ | ` ggplot2::autoplot() ` | ✔️ | ✔️ |
115
+ | ` ggplot2::fortify() ` | ✔️ to ** sf** via ` sf::st_as_sf() ` | To a ** tibble** with coordinates. |
116
+ | ` ggplot2::geom_*() ` | ✔️ ` geom_spatvector() ` | ✔️ ` geom_spatraster() ` and ` geom_spatraster_rgb() ` . |
117
117
118
118
## :exclamation : A note on performance
119
119
@@ -233,16 +233,16 @@ ggplot(prov) +
233
233
theme_minimal() +
234
234
coord_sf(crs = 25830 ) +
235
235
labs(
236
- fill = " variation " ,
237
- title = " Variation of temperature in Castille and Leon (Spain)" ,
238
- subtitle = " Average temperatures in June vs. May"
236
+ fill = " Variation " ,
237
+ title = " Variation of Temperature in Castile and León (Spain)" ,
238
+ subtitle = " Average Temperatures: June vs. May"
239
239
)
240
240
```
241
241
242
242
<img src =" https://raw.githubusercontent.com/dieghernan/tidyterra/main/img/README-example-temp-2.png " width =" 100% " />
243
243
244
- ** tidyterra** also provide a geom for plotting RGB ` SpatRaster ` tiles
245
- with ** ggplot2**
244
+ ** tidyterra** also provides a geom for plotting RGB ` SpatRaster ` tiles
245
+ with ** ggplot2** :
246
246
247
247
``` r
248
248
rgb_tile <- rast(system.file(" extdata/cyl_tile.tif" , package = " tidyterra" ))
259
259
260
260
``` r
261
261
262
- # Recognizes coord_sf()
262
+ # Automatically recognizes and applies coord_sf() for spatial data.
263
263
plot +
264
- # Change crs and datum (for relabeling graticules)
264
+ # Change the CRS and datum (useful for relabeling graticules).
265
265
coord_sf(crs = 3857 , datum = 3857 )
266
266
```
267
267
0 commit comments