Skip to content

Commit

Permalink
Re-document
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Sep 25, 2023
1 parent 7fb68b9 commit 8bc8434
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

3 changes: 2 additions & 1 deletion .github/workflows/pkgdown-gh-pages-clean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ jobs:
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
1 change: 1 addition & 0 deletions .github/workflows/roscron-check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2

1 change: 1 addition & 0 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ jobs:
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
clean = FALSE
)
shell: Rscript {0}

2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
affiliation: rOpenSpain
year: '2023'
version: '>= 0.7.0'
year: '2023'
- type: software
title: rappdirs
abstract: 'rappdirs: Application Directories: Determine Where to Save Data, Caches,
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
},
"SystemRequirements": null
},
"fileSize": "1482.023KB",
"fileSize": "1480.27KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file modified man/figures/README-atom-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/README-wms-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ reference:
- title: About the package
contents:
- CatastRo-package

6 changes: 6 additions & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
checks
library
checks.noindex
library.noindex
data.sqlite
*.html
68 changes: 68 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Platform

|field |value |
|:--------|:-------------------------------------------------------------------------------------|
|version |R version 4.2.2 (2022-10-31 ucrt) |
|os |Windows 10 x64 (build 22621) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |Spanish_Spain.utf8 |
|ctype |Spanish_Spain.utf8 |
|tz |Europe/Paris |
|date |2023-01-07 |
|rstudio |2022.12.0+353 Elsbeth Geranium (desktop) |
|pandoc |2.19.2 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown) |

# Dependencies

|package |old |new |Δ |
|:-----------|:------|:------|:--|
|CatastRo |0.2.2 |0.2.3 |* |
|askpass |1.1 |1.1 | |
|classInt |0.4-8 |0.4-8 | |
|cli |3.5.0 |3.5.0 | |
|countrycode |1.4.0 |1.4.0 | |
|curl |4.3.3 |4.3.3 | |
|DBI |1.1.3 |1.1.3 | |
|dplyr |1.0.10 |1.0.10 | |
|e1071 |1.7-12 |1.7-12 | |
|fansi |1.0.3 |1.0.3 | |
|generics |0.1.3 |0.1.3 | |
|geojsonsf |2.0.3 |2.0.3 | |
|geometries |0.2.0 |0.2.0 | |
|giscoR |0.3.2 |0.3.2 | |
|glue |1.6.2 |1.6.2 | |
|httr |1.4.4 |1.4.4 | |
|jsonify |1.2.2 |1.2.2 | |
|jsonlite |1.8.4 |1.8.4 | |
|lifecycle |1.0.3 |1.0.3 | |
|magrittr |2.0.3 |2.0.3 | |
|mapSpain |0.7.0 |0.7.0 | |
|mime |0.12 |0.12 | |
|openssl |2.0.5 |2.0.5 | |
|pillar |1.8.1 |1.8.1 | |
|pkgconfig |2.0.3 |2.0.3 | |
|proxy |0.4-27 |0.4-27 | |
|R6 |2.5.1 |2.5.1 | |
|rapidjsonr |1.2.0 |1.2.0 | |
|rappdirs |0.3.3 |0.3.3 | |
|Rcpp |1.0.9 |1.0.9 | |
|rlang |1.0.6 |1.0.6 | |
|s2 |1.1.1 |1.1.1 | |
|sf |1.0-9 |1.0-9 | |
|sfheaders |0.4.0 |0.4.0 | |
|stringi |1.7.8 |1.7.8 | |
|sys |3.4.1 |3.4.1 | |
|terra |1.6-47 |1.6-47 | |
|tibble |3.1.8 |3.1.8 | |
|tidyselect |1.2.0 |1.2.0 | |
|units |0.8-1 |0.8-1 | |
|utf8 |1.2.2 |1.2.2 | |
|vctrs |0.5.1 |0.5.1 | |
|withr |2.5.0 |2.5.0 | |
|wk |0.7.1 |0.7.1 | |
|xml2 |1.3.3 |1.3.3 | |

# Revdeps

7 changes: 7 additions & 0 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## revdepcheck results

We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

1 change: 1 addition & 0 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
28 changes: 13 additions & 15 deletions vignettes/CatastRo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,11 @@ val_catr_code <- catr_get_code_from_coords(val)

val_catr_code
#> # A tibble: 1 × 12
#> munic catr_to catr_munic catrcode cpro cmun inecode nm cd cmc cp
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 VALEN… 46 900 46900 46 250 46250 VALE… 46 900 46
#> # ℹ 1 more variable: cm <chr>
#> munic catr_to catr_munic catrcode cpro cmun inecode nm cd cmc cp cm
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 VALENCIA 46 900 46900 46 250 46250 VALENCIA 46 900 46 250

valencia_bu <- catr_atom_get_buildings(val_catr_code$catrcode)
#> Error in catr_hlp_dwnload(api_entry, filename, cache_dir, verbose, update_cache, :
#> Execution halted
```

Next step for creating the visualization is to limit the analysis to a circle of
Expand All @@ -174,39 +171,37 @@ buff <- val %>%
st_transform(st_crs(valencia_bu)) %>%
# Buffer
st_buffer(2500)
#> Error: object 'valencia_bu' not found


# Cut buildings

dataviz <- st_intersection(valencia_bu, buff)
#> Error in eval(expr, envir, enclos): object 'valencia_bu' not found

ggplot(dataviz) +
geom_sf()
#> Error in eval(expr, envir, enclos): object 'dataviz' not found
```

<div class="figure">
<img src="./minimal-1.png" alt="Minimal cadastral map of Valencia" width="100%" />
<p class="caption">Minimal cadastral map of Valencia</p>
</div>

Let's extract now the construction year, available in the column `beginning`:


```r
# Extract 4 initial positions
year <- substr(dataviz$beginning, 1, 4)
#> Error in eval(expr, envir, enclos): object 'dataviz' not found

# Replace all that doesn't look as a number with 0000
year[!(year %in% 0:2500)] <- "0000"
#> Error: object 'year' not found

# To numeric
year <- as.integer(year)
#> Error in eval(expr, envir, enclos): object 'year' not found

# New column
dataviz <- dataviz %>%
mutate(year = year)
#> Error in eval(expr, envir, enclos): object 'dataviz' not found
```

Last step is to create groups based on the year and create the data
Expand All @@ -219,7 +214,6 @@ dataviz <- dataviz %>%
mutate(year_cat = ggplot2::cut_number(year,
n = 15
))
#> Error in eval(expr, envir, enclos): object 'dataviz' not found


ggplot(dataviz) +
Expand All @@ -246,9 +240,13 @@ ggplot(dataviz) +
),
plot.margin = margin(r = 40, l = 40)
)
#> Error in eval(expr, envir, enclos): object 'dataviz' not found
```

<div class="figure">
<img src="./dataviz-1.png" alt="Valencia: Urban growth" width="100%" />
<p class="caption">Valencia: Urban growth</p>
</div>

## References

- Royé D (2019). "Visualize urban growth." <https://dominicroye.github.io/en/2019/visualize-urban-growth/>.
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.

0 comments on commit 8bc8434

Please sign in to comment.