diff --git a/.github/workflows/update-docs.yaml b/.github/workflows/update-docs.yaml index 6ee452c..e375916 100644 --- a/.github/workflows/update-docs.yaml +++ b/.github/workflows/update-docs.yaml @@ -33,9 +33,7 @@ jobs: - name: Update docs run: | - pkgdev::precompute_vignette_all() - pkgdev::update_docs(precompute = FALSE) - + pkgdev::update_docs(url_update = FALSE) shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index b23e266..d6befd4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -30,11 +30,11 @@ Suggests: VignetteBuilder: knitr Config/Needs/website: ropenspain/rostemplate, devtools, sessioninfo, - remotes, sfheaders, rapidjsonr, jsonify, geometries, tidyverse + remotes, sfheaders, rapidjsonr, jsonify, geometries, tidyverse, magick Config/testthat/edition: 3 Config/testthat/parallel: true Copyright: Data Source: SITNA – Catastro de Navarra Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/codemeta.json b/codemeta.json index 523758d..ff76e5e 100644 --- a/codemeta.json +++ b/codemeta.json @@ -14,7 +14,7 @@ "name": "R", "url": "https://r-project.org" }, - "runtimePlatform": "R version 4.4.0 (2024-04-24 ucrt)", + "runtimePlatform": "R version 4.4.1 (2024-06-14)", "author": [ { "@type": "Person", @@ -190,7 +190,7 @@ }, "SystemRequirements": null }, - "fileSize": "961.034KB", + "fileSize": "952.888KB", "citation": [ { "@type": "SoftwareSourceCode", diff --git a/data-raw/logo.R b/data-raw/logo.R index 2ea1177..0d141a2 100644 --- a/data-raw/logo.R +++ b/data-raw/logo.R @@ -1,94 +1,94 @@ -library(CatastRoNav) -library(sf) -library(dplyr) -library(nominatimlite) - -# Use Pamplona - -# Coord Plaza del Azoguejo: To Point -top <- geo_lite_sf("Plaza del Castillo, Pamplona") %>% - st_transform(st_crs(25830)) - -# Create spatial hexagon -hex <- function(x, center, size) { - angle_deg <- 60 * x - 30 - angle_rad <- pi / 180 * angle_deg - x <- center[1, 1] + size * cos(angle_rad) - y <- center[1, 2] + size * sin(angle_rad) - - return(c(x, y)) -} -hex_pol <- lapply(1:7, - hex, - center = st_coordinates(top), # Center coords - size = 500 # Side lenght (meters) -) %>% - # Convert to spatial polygon - unlist() %>% - matrix(ncol = 2, byrow = TRUE) %>% - list() %>% - st_polygon() %>% - st_sfc() %>% - st_set_crs(st_crs(top)) - -# Get Buildings -pamplona <- top %>% - st_buffer(1000) %>% - catrnav_wfs_get_buildings_bbox() - - -finalpols <- st_intersection(pamplona, hex_pol) -plot(finalpols$geometry) - - -library(ggplot2) - -pal <- colorRampPalette(c("#da291c", "#da291c", "white")) - - -p <- ggplot(finalpols) + - geom_sf(aes(fill = value), - col = "white", - size = 0.01, - show.legend = FALSE, - alpha = 1 - ) + - scale_fill_gradientn( - colors = pal(7), - na.value = pal(7)[6] - ) + - theme_void() - - - -p - - -library(hexSticker) - -cols <- pal(7) -text <- colorspace::darken(cols[1], 0.9) - - -sysfonts::font_add("noto", - regular = "data-raw/NotoSerif-Regular.ttf", - bold = "data-raw/NotoSerif-Bold.ttf" -) - -showtext::showtext_auto() - -sticker(p, - package = "CatastRoNav", - p_family = "noto", - p_fontface = "bold", - s_width = 2.1, - s_height = 2.1, - s_x = 1, - s_y = 0.95, - p_color = text, - p_size = 19.5, - p_y = 1, - h_fill = "white", - h_color = text, - filename = "data-raw/logo.png", -) +library(CatastRoNav) +library(sf) +library(dplyr) +library(nominatimlite) + +# Use Pamplona + +# Coord Plaza del Castillo: To Point +top <- geo_lite_sf("Plaza del Castillo, Pamplona") %>% + st_transform(st_crs(25830)) + +# Create spatial hexagon +hex <- function(x, center, size) { + angle_deg <- 60 * x - 30 + angle_rad <- pi / 180 * angle_deg + x <- center[1, 1] + size * cos(angle_rad) + y <- center[1, 2] + size * sin(angle_rad) + + return(c(x, y)) +} +hex_pol <- lapply(1:7, + hex, + center = st_coordinates(top), # Center coords + size = 500 # Side lenght (meters) +) %>% + # Convert to spatial polygon + unlist() %>% + matrix(ncol = 2, byrow = TRUE) %>% + list() %>% + st_polygon() %>% + st_sfc() %>% + st_set_crs(st_crs(top)) + +# Get Buildings +pamplona <- top %>% + st_buffer(1000) %>% + catrnav_wfs_get_buildings_bbox() + + +finalpols <- st_intersection(pamplona, hex_pol) +plot(finalpols$geometry) + + +library(ggplot2) + +pal <- colorRampPalette(c("#da291c", "#da291c", "white")) + + +p <- ggplot(finalpols) + + geom_sf(aes(fill = value), + col = "white", + size = 0.01, + show.legend = FALSE, + alpha = 1 + ) + + scale_fill_gradientn( + colors = pal(7), + na.value = pal(7)[6] + ) + + theme_void() + + + +p + + +library(hexSticker) + +cols <- pal(7) +text <- colorspace::darken(cols[1], 0.9) + + +sysfonts::font_add("noto", + regular = "data-raw/NotoSerif-Regular.ttf", + bold = "data-raw/NotoSerif-Bold.ttf" +) + +showtext::showtext_auto() + +sticker(p, + package = "CatastRoNav", + p_family = "noto", + p_fontface = "bold", + s_width = 2.1, + s_height = 2.1, + s_x = 1, + s_y = 0.95, + p_color = text, + p_size = 19.5, + p_y = 1, + h_fill = "white", + h_color = text, + filename = "data-raw/logo.png", +) diff --git a/data-raw/logo.png b/data-raw/logo.png index dc78a5b..7a08614 100644 Binary files a/data-raw/logo.png and b/data-raw/logo.png differ diff --git a/inst/schemaorg.json b/inst/schemaorg.json index f8e5518..e9268f0 100644 --- a/inst/schemaorg.json +++ b/inst/schemaorg.json @@ -19,7 +19,7 @@ "name": "R", "url": "https://r-project.org" }, - "runtimePlatform": "R version 4.4.0 (2024-04-24 ucrt)", + "runtimePlatform": "R version 4.4.1 (2024-06-14)", "version": "0.1.0" }, { diff --git a/man/figures/README-wfs-1.png b/man/figures/README-wfs-1.png index 13d04aa..19613b2 100644 Binary files a/man/figures/README-wfs-1.png and b/man/figures/README-wfs-1.png differ diff --git a/man/figures/logo.png b/man/figures/logo.png index dce5dcf..7a08614 100644 Binary files a/man/figures/logo.png and b/man/figures/logo.png differ diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png index 30721ed..65ffbc9 100644 Binary files a/pkgdown/favicon/apple-touch-icon-120x120.png and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png index 189983c..f70fc13 100644 Binary files a/pkgdown/favicon/apple-touch-icon-152x152.png and b/pkgdown/favicon/apple-touch-icon-152x152.png differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png index 8c12143..c852e00 100644 Binary files a/pkgdown/favicon/apple-touch-icon-180x180.png and b/pkgdown/favicon/apple-touch-icon-180x180.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png index 9447eb7..571f804 100644 Binary files a/pkgdown/favicon/apple-touch-icon-60x60.png and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png index 29847e3..47a9daa 100644 Binary files a/pkgdown/favicon/apple-touch-icon-76x76.png and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png index 8c12143..c852e00 100644 Binary files a/pkgdown/favicon/apple-touch-icon.png and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png index 2c0a9d5..68ff002 100644 Binary files a/pkgdown/favicon/favicon-16x16.png and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png index f89725e..b511964 100644 Binary files a/pkgdown/favicon/favicon-32x32.png and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico index 1be8725..238525f 100644 Binary files a/pkgdown/favicon/favicon.ico and b/pkgdown/favicon/favicon.ico differ diff --git a/vignettes/CatastRoNav.Rmd b/vignettes/CatastRoNav.Rmd index 8bd7153..c340c3f 100644 --- a/vignettes/CatastRoNav.Rmd +++ b/vignettes/CatastRoNav.Rmd @@ -1,7 +1,6 @@ --- title: "Get started" output: rmarkdown::html_vignette -date: "2024-06-07" vignette: > %\VignetteIndexEntry{Get started} %\VignetteEngine{knitr::rmarkdown} diff --git a/vignettes/CatastRoNav.Rmd.orig b/vignettes/CatastRoNav.Rmd.orig index 8a79a53..340525f 100644 --- a/vignettes/CatastRoNav.Rmd.orig +++ b/vignettes/CatastRoNav.Rmd.orig @@ -1,7 +1,6 @@ --- title: "Get started" output: rmarkdown::html_vignette -date: "`r Sys.Date()`" vignette: > %\VignetteIndexEntry{Get started} %\VignetteEngine{knitr::rmarkdown} diff --git a/vignettes/dataviz-1.png b/vignettes/dataviz-1.png index cb1efd3..b04af21 100644 Binary files a/vignettes/dataviz-1.png and b/vignettes/dataviz-1.png differ diff --git a/vignettes/minimal-1.png b/vignettes/minimal-1.png index 9a59d42..0cd9521 100644 Binary files a/vignettes/minimal-1.png and b/vignettes/minimal-1.png differ diff --git a/vignettes/olite-1.png b/vignettes/olite-1.png index 45d605c..ddfd974 100644 Binary files a/vignettes/olite-1.png and b/vignettes/olite-1.png differ