Skip to content

Commit

Permalink
Merge pull request #45 from Ecosystem-Assessments/kcreview
Browse files Browse the repository at this point in the history
minor changes
  • Loading branch information
david-beauchesne authored Jul 17, 2024
2 parents 8d4b40e + a3d7a62 commit 1cd6edc
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 40 deletions.
23 changes: 13 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,51 @@ BugReports: https://github.com/david-beauchesne/pipedat/issues
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Config/testthat/edition: 3
Depends:
R (>= 3.3.0)
Imports:
archive,
bookdown,
cli,
crayon,
curl,
dplyr,
glue,
grDevices,
here,
ids,
RefManageR,
rgovcan,
rlang,
rmarkdown,
sf,
stars,
stringr,
terra,
tools,
utils,
vroom,
yaml
Depends:
R (>= 2.10)
Suggests:
archive,
eaMethods,
fasterize,
fs,
geojsonsf,
graphics,
graphicsutils,
grDevices,
ids,
knitr,
latex2exp,
purrr,
raster,
readr,
rgovcan,
R.utils,
sdmpredictors,
stats,
stringr,
testthat (>= 3.0.0),
tidyr,
usethis,
uuid,
viridis,
vroom,
whisker,
XML
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export(write_pipeline)
importFrom(RefManageR,BibEntry)
importFrom(RefManageR,WriteBib)
importFrom(cli,symbol)
importFrom(crayon,blue)
importFrom(glue,glue)
importFrom(glue,glue_sql)
importFrom(grDevices,colorRampPalette)
Expand Down
4 changes: 2 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ get_pipeline_url <- function(uid) {
#' @export
get_grid_info <- function(grd = here::here("project-data", "grid", "grid.tif")) {
# Get grid
if (class(grd) == "character") grd <- stars::read_stars(grd)
if (!"stars" %in% class(grd)) grd <- stars::st_as_stars(grd)
if (inherits(grd, "character")) grd <- stars::read_stars(grd)
if (!inherits(grd, "stars")) grd <- stars::st_as_stars(grd)

# Info
list(
Expand Down
4 changes: 2 additions & 2 deletions R/importdat.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#' in the global R environment for use in other pipelines or
#' user processes.
#'
#' @param uid unique identifier of queried data. The full list of available data pipelines can be consulted using `pipelines()`
#' @param type type of data to import, one of "format" or "integrated"
#' @param uid unique identifier of queried data. The full list of available data pipelines can be consulted using `pipelist()`.
#' @param type type of data to import, one of "format" or "integrated".
#'
#' @return This function returns objects in the global R environment
#'
Expand Down
6 changes: 3 additions & 3 deletions R/masteringrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
#' @export
masteringrid <- function(dat, grd = here::here("project-data", "grid", "grid.tif")) {
# Get grid
if (class(grd) == "character") grd <- stars::read_stars(grd)
if (!"stars" %in% class(grd)) grd <- stars::st_as_stars(grd)
if (inherits(grd, "character")) grd <- stars::read_stars(grd)
if (!inherits(grd, "stars")) grd <- stars::st_as_stars(grd)

# stars objects
if ("stars" %in% class(dat)) {
if (inherits(dat, "stars")) {
stars::st_warp(dat, grd)
}

Expand Down
2 changes: 1 addition & 1 deletion R/pipedat.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' built to access data programmatically and reproducibly, which
#' we refer to as *data pipelines*.
#'
#' @param uid unique identifier of queried data. The full list of available data pipelines can be consulted using `pipelines()`
#' @param uid unique identifier of queried data. The full list of available data pipelines can be consulted using `pipelist()`
#' @eval dp_params()
#' @param ... further arguments used in functions, if applicable.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/pipelist.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' List of available data pipalines
#' List of available data pipelines
#'
#' This function provides the list of individual scripts
#' built to access data programmatically and reproducibly, which
Expand Down
6 changes: 3 additions & 3 deletions R/pipeload.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#' built to access data programmatically and reproducibly, which
#' we refer to as *data pipelines*.
#'
#' @param urls urls for data download
#' @param govcan unique identifier of resource on the open government federal data portal to download
#' @param urls urls for data download.
#' @param govcan unique identifier of resource on the open government federal data portal to download.
#' @param output output folder for queried data.
#' @param large logical, whether file to download is large and thus R options should be modified for longer timeout options. Default set to false
#' @param large logical, whether file to download is large and thus R options should be modified for longer timeout options. Default set to `FALSE`.
#'
#' @return This function returns the queried raw data, formatted data, metadata and bibtex associated with the raw data.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/pipereport.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Create a report from the pipedat data in a project
#'
#' This function create a generic report that provides a summary of the data that was loaded and formatted throught the pipedat package in a specific location. The purpose of this report is to accompany a project report by providing the relevant information concerning the data that was accessed and formated through pipedat.
#' This function creates a generic report that provides a summary of the data that was loaded and formatted throught the pipedat package in a specific location. The purpose of this report is to accompany a project report by providing the relevant information concerning the data that was accessed and formated through pipedat.
#'
#' @return This function creates a new report in `pubs/pipedat/` using the template `inst/templates/report.Rmd` and all the data available in `project-data/pipedat/` and `project-data/grid/`.
#'
Expand Down
5 changes: 1 addition & 4 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#' pipedat: pipelines to access, load, and format data from various sources
#'
#' @docType package
#' @name pipedat
#'
#' @importFrom glue glue glue_sql
#' @importFrom grDevices dev.off png colorRampPalette
#' @importFrom graphics par box layout lines mtext
#' @importFrom graphics polygon text
#' @importFrom graphics par box layout lines mtext polygon text
#' @importFrom RefManageR BibEntry WriteBib
#' @importFrom rlang sym
#' @importFrom sf st_bbox st_write st_read st_transform
Expand All @@ -22,7 +20,6 @@
#' @importFrom yaml yaml.load_file write_yaml read_yaml
#' @importFrom rlang abort warn
#' @importFrom cli symbol
#' @importFrom crayon blue
NULL


Expand Down
2 changes: 0 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ knitr::opts_chunk$set(
# pipedat <a href='https://github.com/Ecosystem-Assessments/pipedat'><img src='man/figures/logo.png' align="right" height="175" /></a>

<!-- badges: start -->
<!-- [![Check package](https://github.com/inSileco/graphicsutils/actions/workflows/check-moreorless-standard.yaml/badge.svg)](https://github.com/inSileco/graphicsutils/actions/workflows/check-moreorless-standard.yaml) -->
<!-- [![codecov](https://codecov.io/gh/inSileco/graphicsutils/branch/master/graph/badge.svg)](https://codecov.io/gh/inSileco/graphicsutils) -->
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#preliminary)
![](https://img.shields.io/badge/status-preliminary-blue.svg)
[![R-CMD-check](https://github.com/Ecosystem-Assessments/pipedat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Ecosystem-Assessments/pipedat/actions/workflows/R-CMD-check.yaml)
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/pipeflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipedat:
- 2021
- 2022
# ==========================================================================
# UID of pipelines to eexecute
# UID of pipelines to execute
pipelines:
- "pipeline_id1"
- "pipeline_id2"
Expand Down
4 changes: 2 additions & 2 deletions man/importdat.Rd

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

3 changes: 1 addition & 2 deletions man/pipedat.Rd

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

2 changes: 1 addition & 1 deletion man/pipelist.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/pipeload.Rd

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

2 changes: 1 addition & 1 deletion man/pipereport.Rd

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

0 comments on commit 1cd6edc

Please sign in to comment.