Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jul 9, 2024
1 parent 8841794 commit 3394cc0
Show file tree
Hide file tree
Showing 22 changed files with 100 additions and 104 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://geoportal.navarra.es/es/inspire>
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -190,7 +190,7 @@
},
"SystemRequirements": null
},
"fileSize": "961.034KB",
"fileSize": "952.888KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
188 changes: 94 additions & 94 deletions data-raw/logo.R
Original file line number Diff line number Diff line change
@@ -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",
)
Binary file modified data-raw/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down
Binary file modified man/figures/README-wfs-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 man/figures/logo.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 pkgdown/favicon/apple-touch-icon-120x120.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 pkgdown/favicon/apple-touch-icon-152x152.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 pkgdown/favicon/apple-touch-icon-180x180.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 pkgdown/favicon/apple-touch-icon-60x60.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 pkgdown/favicon/apple-touch-icon-76x76.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 pkgdown/favicon/apple-touch-icon.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 pkgdown/favicon/favicon-16x16.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 pkgdown/favicon/favicon-32x32.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 pkgdown/favicon/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion vignettes/CatastRoNav.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: "Get started"
output: rmarkdown::html_vignette
date: "2024-06-07"
vignette: >
%\VignetteIndexEntry{Get started}
%\VignetteEngine{knitr::rmarkdown}
Expand Down
1 change: 0 additions & 1 deletion vignettes/CatastRoNav.Rmd.orig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: "Get started"
output: rmarkdown::html_vignette
date: "`r Sys.Date()`"
vignette: >
%\VignetteIndexEntry{Get started}
%\VignetteEngine{knitr::rmarkdown}
Expand Down
Binary file modified vignettes/dataviz-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/minimal-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/olite-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 3394cc0

Please sign in to comment.