Skip to content
Snippets Groups Projects
Commit 52e26adf authored by Fisher, Jason C.'s avatar Fisher, Jason C.
Browse files

Merge branch 'develop' into 'develop'

Tidy install instructions and vignettes

See merge request !267
parents 1b1dae71 948cc419
No related branches found
No related tags found
2 merge requests!269Merge in develop and bump version,!267Tidy install instructions and vignettes
Pipeline #523532 passed
...@@ -40,12 +40,10 @@ To install the package along with its dependencies, which are required to run ex ...@@ -40,12 +40,10 @@ To install the package along with its dependencies, which are required to run ex
install.packages("inldata", dependencies = TRUE) install.packages("inldata", dependencies = TRUE)
``` ```
To install the development version of the package, you need to clone the repository and build from source, or run the following commands: To install the development version of the package, you can either clone the repository and build it from source, or run the following commands. Make sure the **remotes** package for R is installed.
```r ```r
if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_gitlab("inl/inldata@develop", remotes::install_gitlab("inl/inldata@develop",
auth_token = Sys.getenv("GITLAB_PAT"),
host = "code.usgs.gov", host = "code.usgs.gov",
dependencies = TRUE, dependencies = TRUE,
build_vignettes = TRUE build_vignettes = TRUE
......
...@@ -49,13 +49,12 @@ datasets, and create a USGS data release, run: ...@@ -49,13 +49,12 @@ datasets, and create a USGS data release, run:
install.packages("inldata", dependencies = TRUE) install.packages("inldata", dependencies = TRUE)
``` ```
To install the development version of the package, you need to clone the To install the development version of the package, you can either clone
repository and build from source, or run the following commands: the repository and build it from source, or run the following commands.
Make sure the **remotes** package for R is installed.
``` r ``` r
if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_gitlab("inl/inldata@develop", remotes::install_gitlab("inl/inldata@develop",
auth_token = Sys.getenv("GITLAB_PAT"),
host = "code.usgs.gov", host = "code.usgs.gov",
dependencies = TRUE, dependencies = TRUE,
build_vignettes = TRUE build_vignettes = TRUE
......
running running
'/usr/lib/R/bin/R --no-echo --no-restore --no-save --no-restore --file=data-raw/make-datasets.R' '/usr/lib/R/bin/R --no-echo --no-restore --no-save --no-restore --file=data-raw/make-datasets.R'
TIMESTAMP: 2024-07-30 21:39:41 PDT TIMESTAMP: 2024-09-09 13:00:42 PDT
STATUS: making 'crs' dataset ... STATUS: making 'crs' dataset ...
STATUS: making 'parameters' dataset ... STATUS: making 'parameters' dataset ...
...@@ -301,12 +301,10 @@ STATUS: making 'cities' dataset ... ...@@ -301,12 +301,10 @@ STATUS: making 'cities' dataset ...
STATUS: making 'counties' dataset ... STATUS: making 'counties' dataset ...
STATUS: making 'roads' dataset ... STATUS: making 'roads' dataset ...
STATUS: making 'lakes' dataset ... STATUS: making 'lakes' dataset ...
⠙ 21 extracted | 211 MB (104 MB/s) | 2s ⠙ 21 extracted | 338 MB ( 71 MB/s) | 4.8s
⠹ 21 extracted | 331 MB ( 66 MB/s) | 5s
STATUS: making 'streams' dataset ... STATUS: making 'streams' dataset ...
⠙ 21 extracted | 270 MB ( 86 MB/s) | 3.1s ⠙ 21 extracted | 298 MB ( 80 MB/s) | 3.7s
⠹ 26 extracted | 398 MB ( 65 MB/s) | 6.1s
STATUS: compress dataset files ... STATUS: compress dataset files ...
STATUS: copy dataset files to destination directory ... STATUS: copy dataset files to destination directory ...
DURATION: 6.900758 mins DURATION: 6.878001 mins
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -45,8 +45,8 @@ navbar: ...@@ -45,8 +45,8 @@ navbar:
href: articles/idaho.html href: articles/idaho.html
- text: Units of Measurement - text: Units of Measurement
href: articles/units.html href: articles/units.html
- text: ERD - text: Entity Relationship Diagram
href: articles/erd.html href: articles/erd.html
- text: Download - text: Download
href: articles/download.html href: articles/download.html
- text: Changelog - text: Changelog
......
...@@ -8,11 +8,12 @@ The **inldata** package offers a comprehensive collection of datasets in various ...@@ -8,11 +8,12 @@ The **inldata** package offers a comprehensive collection of datasets in various
```{r include=FALSE} ```{r include=FALSE}
pkg <- "inldata"
destdir <- "download_files" destdir <- "download_files"
paste0(destdir, "/*") |> unlink() paste0(destdir, "/*") |> unlink()
files <- inldata::write_datasets( files <- inldata::write_datasets(
package = "inldata", package = pkg,
destdir = destdir, destdir = destdir,
gzip = c("json", "geojson"), gzip = c("json", "geojson"),
pretty = FALSE pretty = FALSE
...@@ -118,7 +119,7 @@ j <- inldata::get_file_ext(hrefs) |> ...@@ -118,7 +119,7 @@ j <- inldata::get_file_ext(hrefs) |>
m[cbind(i, j)] <- data m[cbind(i, j)] <- data
tbl <- m tbl <- m
m <- utils::data(package = "inldata")$results m <- utils::data(package = pkg)$results
titles <- m[, "Title"] titles <- m[, "Title"]
names(titles) <- m[, "Item"] names(titles) <- m[, "Item"]
titles <- titles[rownames(tbl)] titles <- titles[rownames(tbl)]
...@@ -137,18 +138,29 @@ col_names <- sprintf( ...@@ -137,18 +138,29 @@ col_names <- sprintf(
titles, headers titles, headers
) )
ver <- utils::packageVersion(pkg = "inldata") |> format() ver <- utils::packageVersion(pkg = pkg) |> format()
archive <- sprintf("%s/inldata-datasets-%s.zip", destdir, ver) archive <- sprintf("%s/%s-datasets-v%s.zip", destdir, pkg, ver)
checkmate::assert_path_for_output(archive, overwrite = TRUE) checkmate::assert_path_for_output(archive, overwrite = TRUE)
archive::archive_write_dir(archive, dir = destdir, format = "zip") archive::archive_write_dir(archive, dir = destdir, format = "zip")
archive_size <- inldata::get_file_size(archive) archive_size <- inldata::get_file_size(archive)
``` ```
```{r echo=FALSE, results="asis"} <style>
table th {
text-align: center;
}
</style>
```{r echo=FALSE, results="asis"}
align <- c("l", rep("c", ncol(tbl) - 1L))
options(knitr.kable.NA = '-') options(knitr.kable.NA = '-')
knitr::kable(tbl, row.names = FALSE, col.names = col_names) knitr::kable(tbl,
row.names = FALSE,
col.names = col_names,
align = align,
table.attr = 'style="width:100%; text-align:center;"'
)
``` ```
......
...@@ -18,7 +18,7 @@ map <- webmap::make_map( ...@@ -18,7 +18,7 @@ map <- webmap::make_map(
popup = ~name, popup = ~name,
label = ~id, label = ~id,
labelOptions = leaflet::labelOptions(noHide = TRUE, textOnly = TRUE), labelOptions = leaflet::labelOptions(noHide = TRUE, textOnly = TRUE),
color = "#0033FF", color = "#A40802",
opacity = 0.5, opacity = 0.5,
weight = 2 weight = 2
) |> ) |>
......
...@@ -14,7 +14,7 @@ map <- webmap::make_map( ...@@ -14,7 +14,7 @@ map <- webmap::make_map(
) |> ) |>
leaflet::addPolylines( leaflet::addPolylines(
data = spdf, data = spdf,
color = "#025D8C", color = "#A40802",
weight = 3, weight = 3,
opacity = 0.5 opacity = 0.5
) |> ) |>
......
...@@ -26,7 +26,7 @@ map <- webmap::make_map( ...@@ -26,7 +26,7 @@ map <- webmap::make_map(
data = spdf, data = spdf,
popup = ~popup, popup = ~popup,
label = ~gnis_nm, label = ~gnis_nm,
color = "#3399CC", color = "#A40802",
opacity = 0.5, opacity = 0.5,
weight = 2 weight = 2
) |> ) |>
......
...@@ -16,7 +16,7 @@ map <- webmap::make_map( ...@@ -16,7 +16,7 @@ map <- webmap::make_map(
data = spdf, data = spdf,
popup = ~name, popup = ~name,
labelOptions = leaflet::labelOptions(noHide = TRUE, textOnly = TRUE), labelOptions = leaflet::labelOptions(noHide = TRUE, textOnly = TRUE),
color = "#0033FF", color = "#A40802",
opacity = 0.5, opacity = 0.5,
weight = 2 weight = 2
) |> ) |>
......
...@@ -25,7 +25,7 @@ map <- webmap::make_map( ...@@ -25,7 +25,7 @@ map <- webmap::make_map(
data = spdf, data = spdf,
popup = ~popup, popup = ~popup,
label = ~name, label = ~name,
color = "#025D8C", color = "#A40802",
opacity = 0.5, opacity = 0.5,
weight = 3 weight = 3
) |> ) |>
......
...@@ -26,7 +26,7 @@ map <- webmap::make_map( ...@@ -26,7 +26,7 @@ map <- webmap::make_map(
data = spdf, data = spdf,
popup = ~popup, popup = ~popup,
label = ~gnis_nm, label = ~gnis_nm,
color = "#3399CC", color = "#A40802",
weight = 2, weight = 2,
opacity = 0.5 opacity = 0.5
) |> ) |>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment