Skip to content

Commit 94f1d58

Browse files
authored
Merge pull request #186 from ropensci/multiverse-badge
add r-multiverse and cran badges
2 parents 37cb55f + 416e300 commit 94f1d58

File tree

2 files changed

+43
-25
lines changed

2 files changed

+43
-25
lines changed

README.Rmd

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ knitr::opts_chunk$set(
2222
[![Codecov test coverage](https://codecov.io/gh/ropensci/geotargets/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ropensci/geotargets?branch=master)
2323
[![pkgcheck](https://github.com/ropensci/geotargets/workflows/pkgcheck/badge.svg)](https://github.com/ropensci/geotargets/actions?query=workflow%3Apkgcheck)
2424
[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/675_status.svg)](https://github.com/ropensci/software-review/issues/675)
25+
[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fgeotargets&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/geotargets)
26+
[![CRAN status](https://www.r-pkg.org/badges/version/geotargets)](https://CRAN.R-project.org/package=geotargets)
2527
<!-- badges: end -->
2628

2729
`geotargets` extends [`targets`](https://github.com/ropensci/targets) to work with geospatial data formats, such as rasters and vectors (e.g., shapefiles). Currently we support raster and vector formats for the [`terra`](https://github.com/rspatial/terra) package.
@@ -91,7 +93,8 @@ If you would like to see and download working examples for yourself, see the rep
9193
#| label: tar-terra-rast
9294
library(targets)
9395
94-
tar_dir({ # tar_dir() runs code from a temporary directory.
96+
tar_dir({
97+
# tar_dir() runs code from a temporary directory.
9598
tar_script({
9699
library(geotargets)
97100
@@ -118,15 +121,14 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
118121

119122
```{r}
120123
#| label: tar-terra-vect
121-
tar_dir({ # tar_dir() runs code from a temporary directory.
124+
tar_dir({
125+
# tar_dir() runs code from a temporary directory.
122126
tar_script({
123127
library(geotargets)
124128
125129
lux_area <- function(projection = "EPSG:4326") {
126130
terra::project(
127-
terra::vect(system.file("ex", "lux.shp",
128-
package = "terra"
129-
)),
131+
terra::vect(system.file("ex", "lux.shp", package = "terra")),
130132
projection
131133
)
132134
}
@@ -150,7 +152,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
150152

151153
```{r}
152154
#| label: tar-terra-sprc
153-
tar_dir({ # tar_dir() runs code from a temporary directory.
155+
tar_dir({
156+
# tar_dir() runs code from a temporary directory.
154157
tar_script({
155158
library(geotargets)
156159
@@ -186,14 +189,19 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
186189

187190
```{r}
188191
#| label: tar-stars
189-
tar_dir({ # tar_dir() runs code from a temporary directory.
192+
tar_dir({
193+
# tar_dir() runs code from a temporary directory.
190194
tar_script({
191195
library(geotargets)
192196
193197
list(
194198
tar_stars(
195199
test_stars,
196-
stars::read_stars(system.file("tif", "olinda_dem_utm25s.tif", package = "stars"))
200+
stars::read_stars(system.file(
201+
"tif",
202+
"olinda_dem_utm25s.tif",
203+
package = "stars"
204+
))
197205
)
198206
)
199207
})

README.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ coverage](https://codecov.io/gh/ropensci/geotargets/branch/master/graph/badge.sv
1616
[![pkgcheck](https://github.com/ropensci/geotargets/workflows/pkgcheck/badge.svg)](https://github.com/ropensci/geotargets/actions?query=workflow%3Apkgcheck)
1717
[![Status at rOpenSci Software Peer
1818
Review](https://badges.ropensci.org/675_status.svg)](https://github.com/ropensci/software-review/issues/675)
19+
[![R-multiverse
20+
status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fgeotargets&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/geotargets)
21+
[![CRAN
22+
status](https://www.r-pkg.org/badges/version/geotargets)](https://CRAN.R-project.org/package=geotargets)
1923
<!-- badges: end -->
2024

2125
`geotargets` extends [`targets`](https://github.com/ropensci/targets) to
@@ -99,7 +103,8 @@ the repos:
99103
``` r
100104
library(targets)
101105

102-
tar_dir({ # tar_dir() runs code from a temporary directory.
106+
tar_dir({
107+
# tar_dir() runs code from a temporary directory.
103108
tar_script({
104109
library(geotargets)
105110

@@ -120,10 +125,10 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
120125
x
121126
})
122127
#> + terra_rast_example dispatched
123-
#> ✔ terra_rast_example completed [2ms, 8.52 kB]
124-
#> ✔ ended pipeline [185ms, 1 completed, 0 skipped]
128+
#> ✔ terra_rast_example completed [65ms, 8.52 kB]
129+
#> ✔ ended pipeline [383ms, 1 completed, 0 skipped]
125130
#> class : SpatRaster
126-
#> dimensions : 90, 95, 1 (nrow, ncol, nlyr)
131+
#> size : 90, 95, 1 (nrow, ncol, nlyr)
127132
#> resolution : 0.008333333, 0.008333333 (x, y)
128133
#> extent : 5.741667, 6.533333, 49.44167, 50.19167 (xmin, xmax, ymin, ymax)
129134
#> coord. ref. : lon/lat WGS 84 (EPSG:4326)
@@ -136,15 +141,14 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
136141
## `tar_terra_vect()`: targets with terra vectors
137142

138143
``` r
139-
tar_dir({ # tar_dir() runs code from a temporary directory.
144+
tar_dir({
145+
# tar_dir() runs code from a temporary directory.
140146
tar_script({
141147
library(geotargets)
142148

143149
lux_area <- function(projection = "EPSG:4326") {
144150
terra::project(
145-
terra::vect(system.file("ex", "lux.shp",
146-
package = "terra"
147-
)),
151+
terra::vect(system.file("ex", "lux.shp", package = "terra")),
148152
projection
149153
)
150154
}
@@ -162,8 +166,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
162166
x
163167
})
164168
#> + terra_vect_example dispatched
165-
#> ✔ terra_vect_example completed [24ms, 117.65 kB]
166-
#> ✔ ended pipeline [185ms, 1 completed, 0 skipped]
169+
#> ✔ terra_vect_example completed [72ms, 172.03 kB]
170+
#> ✔ ended pipeline [264ms, 1 completed, 0 skipped]
167171
#> class : SpatVector
168172
#> geometry : polygons
169173
#> dimensions : 12, 6 (geometries, attributes)
@@ -180,7 +184,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
180184
## `tar_terra_sprc()`: targets with terra raster collections
181185

182186
``` r
183-
tar_dir({ # tar_dir() runs code from a temporary directory.
187+
tar_dir({
188+
# tar_dir() runs code from a temporary directory.
184189
tar_script({
185190
library(geotargets)
186191

@@ -209,8 +214,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
209214
x
210215
})
211216
#> + raster_elevs dispatched
212-
#> ✔ raster_elevs completed [45ms, 37.90 kB]
213-
#> ✔ ended pipeline [226ms, 1 completed, 0 skipped]
217+
#> ✔ raster_elevs completed [191ms, 37.90 kB]
218+
#> ✔ ended pipeline [470ms, 1 completed, 0 skipped]
214219
#> class : SpatRasterCollection
215220
#> length : 2
216221
#> nrow : 90, 115
@@ -224,14 +229,19 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
224229
## `tar_stars()`: targets with stars objects
225230

226231
``` r
227-
tar_dir({ # tar_dir() runs code from a temporary directory.
232+
tar_dir({
233+
# tar_dir() runs code from a temporary directory.
228234
tar_script({
229235
library(geotargets)
230236

231237
list(
232238
tar_stars(
233239
test_stars,
234-
stars::read_stars(system.file("tif", "olinda_dem_utm25s.tif", package = "stars"))
240+
stars::read_stars(system.file(
241+
"tif",
242+
"olinda_dem_utm25s.tif",
243+
package = "stars"
244+
))
235245
)
236246
)
237247
})
@@ -241,8 +251,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory.
241251
x
242252
})
243253
#> + test_stars dispatched
244-
#> ✔ test_stars completed [16ms, 49.90 kB]
245-
#> ✔ ended pipeline [185ms, 1 completed, 0 skipped]
254+
#> ✔ test_stars completed [63ms, 49.90 kB]
255+
#> ✔ ended pipeline [275ms, 1 completed, 0 skipped]
246256
#> stars object with 2 dimensions and 1 attribute
247257
#> attribute(s):
248258
#> Min. 1st Qu. Median Mean 3rd Qu. Max.

0 commit comments

Comments
 (0)