Skip to content

Commit

Permalink
Remove metR
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 14, 2025
1 parent ba9a981 commit 2bcdc41
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 134 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pkgdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
extra-packages: |
local::.
any::pkgdown
any::metR
Nowosad/spDataLarge
needs: website

- name: Deploy package
Expand Down
15 changes: 1 addition & 14 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "tidyterra" in publications use:'
type: software
license: MIT
title: 'tidyterra: ''tidyverse'' Methods and ''ggplot2'' Helpers for ''terra'' Objects'
version: 0.6.2
version: 0.6.2.9000
doi: 10.21105/joss.05751
identifiers:
- type: doi
Expand Down Expand Up @@ -375,19 +375,6 @@ references:
orcid: https://orcid.org/0000-0002-1932-3323
year: '2025'
doi: 10.32614/CRAN.package.maptiles
- type: software
title: metR
abstract: 'metR: Tools for Easier Analysis of Meteorological Fields'
notes: Suggests
url: https://eliocamp.github.io/metR/
repository: https://CRAN.R-project.org/package=metR
authors:
- family-names: Campitelli
given-names: Elio
email: [email protected]
orcid: https://orcid.org/0000-0002-7742-9230
year: '2025'
doi: 10.32614/CRAN.package.metR
- type: software
title: rmarkdown
abstract: 'rmarkdown: Dynamic Documents for R'
Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidyterra
Title: 'tidyverse' Methods and 'ggplot2' Helpers for 'terra' Objects
Version: 0.6.2
Version: 0.6.2.9000
Authors@R: c(
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658")),
Expand Down Expand Up @@ -37,7 +37,6 @@ Suggests:
knitr,
lifecycle,
maptiles,
metR,
rmarkdown,
s2,
testthat (>= 3.0.0),
Expand All @@ -46,7 +45,7 @@ Suggests:
VignetteBuilder:
knitr
Config/Needs/coverage: covr
Config/Needs/website: geodata, dieghernan/gitdevr, ragg, styler,
Config/Needs/website: geodata, dieghernan/gitdevr, ragg, styler, metR,
ggspatial, cpp11, remotes, gganimate, gifski
Config/testthat/edition: 3
Config/testthat/parallel: true
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# tidyterra (development version)

- Remove **metR** from Suggests.

# tidyterra 0.6.2

- Add (limited) support for `SpatGraticule` (see `terra::graticule()`) #155.
Expand Down
24 changes: 0 additions & 24 deletions R/fortify-Spat.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,30 +92,6 @@
#' color = "black"
#' )
#'
#' # ... and other packages
#' # Use metR with facets
#' library(metR)
#' temp <- terra::rast(system.file("extdata/cyl_temp.tif",
#' package = "tidyterra"
#' ))
#' brks <- seq(0, 21, 3) # Fix breaks!
#'
#' # Pivot option for faceting
#' ggplot(temp, aes(x, y), pivot = TRUE) +
#' # tidyterra, don't inherit aes
#' geom_spatraster_contour_filled(
#' data = temp, inherit.aes = FALSE,
#' breaks = brks
#' ) +
#' # metR
#' geom_contour_tanaka(aes(z = value), breaks = brks) +
#' facet_wrap(~lyr, nrow = 1) +
#' scale_fill_whitebox_d(palette = "muted") +
#' theme_minimal() +
#' labs(
#' title = "tidyterra + metR", subtitle = "Facets",
#' fill = "temp (°C)", x = "", y = ""
#' )
#'
#' # Create a SpatVector
#' extfile <- system.file("extdata/cyl.gpkg", package = "tidyterra")
Expand Down
6 changes: 3 additions & 3 deletions R/geom_spat_contour.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#' [ggplot2::geom_contour()].
#'
#' The \CRANpkg{metR} package also provides a set of alternative functions:
#' - [metR::geom_contour2()].
#' - [metR::geom_text_contour()] and [metR::geom_label_contour()].
#' - [metR::geom_contour_tanaka()].
#' - `metR::geom_contour2()`.
#' - `metR::geom_text_contour()` and `metR::geom_label_contour()`.
#' - `metR::geom_contour_tanaka()`.
#'
#' @section \CRANpkg{terra} equivalent:
#'
Expand Down
71 changes: 28 additions & 43 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,6 @@ A BibTeX entry for LaTeX users is:
Full manual of the most recent release of **tidyterra** on **CRAN** is online:
<https://dieghernan.github.io/tidyterra/>

```{r echo=FALSE, results='asis'}
tterra_v <- packageVersion("tidyterra")
l <- unlist(strsplit(as.character(tterra_v), ".", fixed = TRUE))
if (length(l) == 4) {
cat(
"\n",
"You can have a look to the documentation of",
"the dev version in <https://dieghernan.github.io/tidyterra/dev/>"
)
}
```

**tidyverse** methods implemented on **tidyterra** works differently depending
on the type of `Spat*` object:

Expand All @@ -120,34 +106,34 @@ example, `as_tibble()` would return a `tibble`).

Current methods and functions provided by **tidyterra** are:

| tidyverse method | `SpatVector` | `SpatRaster` |
|---------------------|---------------------|--------------------------------------|
| `tibble::as_tibble()` | ✔️ | ✔️ |
| `dplyr::select()` | ✔️ | ✔️ Select layers |
| `dplyr::mutate()` | ✔️ | ✔️ Create /modify layers |
| `dplyr::transmute()` | ✔️ | ✔️ |
| `dplyr::filter()` | ✔️ | ✔️ Modify cells values and (additionally) remove outer cells. |
| `dplyr::slice()` | ✔️ | ✔️ Additional methods for slicing by row and column. |
| `dplyr::pull()` | ✔️ | ✔️ |
| `dplyr::rename()` | ✔️ | ✔️ |
| `dplyr::relocate()` | ✔️ | ✔️ |
| `dplyr::distinct()` | ✔️ | |
| `dplyr::arrange()` | ✔️ | |
| `dplyr::glimpse()` | ✔️ | ✔️ |
| `dplyr::inner_join()` family | ✔️ | |
| `dplyr::summarise()` | ✔️ | |
| `dplyr::group_by()` family | ✔️ | |
| `dplyr::rowwise()` | ✔️ | |
| `dplyr::count()`, `tally()` | ✔️ | |
| `dplyr::bind_cols()` / `dplyr::bind_rows()` | ✔️ as `bind_spat_cols()` / `bind_spat_rows()` | |
| `tidyr::drop_na()` | ✔️ | ✔️ Remove cell values with `NA` on any layer. Additionally, outer cells with `NA` are removed. |
| `tidyr::replace_na()` | ✔️ | ✔️ |
| `tidyr::fill()` | ✔️ | |
| `tidyr::pivot_longer()` | ✔️ | |
| `tidyr::pivot_wider()` | ✔️ | |
| `ggplot2::autoplot()` | ✔️ | ✔️ |
| `ggplot2::fortify()` | ✔️ to **sf** via `sf::st_as_sf()` | To a **tibble** with coordinates. |
| `ggplot2::geom_*()` | ✔️ `geom_spatvector()` | ✔️ `geom_spatraster()` and `geom_spatraster_rgb()`. |
| tidyverse method | `SpatVector` | `SpatRaster` |
|----|----|----|
| `tibble::as_tibble()` | ✔️ | ✔️ |
| `dplyr::select()` | ✔️ | ✔️ Select layers |
| `dplyr::mutate()` | ✔️ | ✔️ Create /modify layers |
| `dplyr::transmute()` | ✔️ | ✔️ |
| `dplyr::filter()` | ✔️ | ✔️ Modify cells values and (additionally) remove outer cells. |
| `dplyr::slice()` | ✔️ | ✔️ Additional methods for slicing by row and column. |
| `dplyr::pull()` | ✔️ | ✔️ |
| `dplyr::rename()` | ✔️ | ✔️ |
| `dplyr::relocate()` | ✔️ | ✔️ |
| `dplyr::distinct()` | ✔️ | |
| `dplyr::arrange()` | ✔️ | |
| `dplyr::glimpse()` | ✔️ | ✔️ |
| `dplyr::inner_join()` family | ✔️ | |
| `dplyr::summarise()` | ✔️ | |
| `dplyr::group_by()` family | ✔️ | |
| `dplyr::rowwise()` | ✔️ | |
| `dplyr::count()`, `tally()` | ✔️ | |
| `dplyr::bind_cols()` / `dplyr::bind_rows()` | ✔️ as `bind_spat_cols()` / `bind_spat_rows()` | |
| `tidyr::drop_na()` | ✔️ | ✔️ Remove cell values with `NA` on any layer. Additionally, outer cells with `NA` are removed. |
| `tidyr::replace_na()` | ✔️ | ✔️ |
| `tidyr::fill()` | ✔️ | |
| `tidyr::pivot_longer()` | ✔️ | |
| `tidyr::pivot_wider()` | ✔️ | |
| `ggplot2::autoplot()` | ✔️ | ✔️ |
| `ggplot2::fortify()` | ✔️ to **sf** via `sf::st_as_sf()` | To a **tibble** with coordinates. |
| `ggplot2::geom_*()` | ✔️ `geom_spatvector()` | ✔️ `geom_spatraster()` and `geom_spatraster_rgb()`. |

## :exclamation: A note on performance

Expand Down Expand Up @@ -335,7 +321,6 @@ open a new [issue](https://github.com/dieghernan/tidyterra/issues)!
You can also ask in [Stack Overflow](https://stackoverflow.com/) using the tag
[[tidyterra]](https://stackoverflow.com/questions/tagged/tidyterra).


## Acknowledgement

**tidyterra** **ggplot2** geoms are based on
Expand Down
16 changes: 2 additions & 14 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/dieghernan/tidyterra",
"issueTracker": "https://github.com/dieghernan/tidyterra/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.6.2",
"version": "0.6.2.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -121,18 +121,6 @@
},
"sameAs": "https://CRAN.R-project.org/package=maptiles"
},
{
"@type": "SoftwareApplication",
"identifier": "metR",
"name": "metR",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=metR"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
Expand Down Expand Up @@ -344,7 +332,7 @@
"SystemRequirements": null
},
"keywords": ["r", "terra", "ggplot-extension", "r-spatial", "rspatial", "cran", "cran-r", "r-package", "rstats", "rstats-package"],
"fileSize": "2402.461KB",
"fileSize": "2399.291KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.4.2 (2024-10-31 ucrt)",
"version": "0.6.2"
"version": "0.6.2.9000"
}
24 changes: 0 additions & 24 deletions man/fortify.Spat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/geom_spat_contour.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ figures:
dpi: 300
fig.retina: 2

development:
mode: auto

navbar:
structure:
left:
Expand Down
Binary file modified vignettes/aggregate-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/contourlines-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/faceted-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/hypso-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/lux_ggplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/rgb-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/spatraster-example1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2bcdc41

Please sign in to comment.