Skip to content

Commit

Permalink
Update docs with pkgdev
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 25, 2023
1 parent 21676d5 commit 7fb68b9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "CatastRo" in publications use:'
type: software
license: GPL-2.0-only
title: 'CatastRo: Interface to the API ''Sede Electronica Del Catastro'''
version: 0.2.3
version: 0.2.3.9000
doi: 10.5281/zenodo.6044091
abstract: Access public spatial data available under the 'INSPIRE' directive. Tools
for downloading references and addresses of properties, as well as map images.
Expand All @@ -34,7 +34,7 @@ preferred-citation:
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
year: '2023'
version: 0.2.3
version: 0.2.3.9000
url: https://ropenspain.github.io/CatastRo/
doi: 10.5281/zenodo.6044091
abstract: Access public spatial data available under the INSPIRE directive. Tools
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ A BibTeX entry for LaTeX users is:
title = {{CatastRo}: Interface to the {API} Sede Electrónica Del Catastro},
author = {Ángel {Delgado Panadero} and Diego Hernangómez},
year = {2023},
version = {0.2.3},
version = {0.2.3.9000},
url = {https://ropenspain.github.io/CatastRo/},
doi = {10.5281/zenodo.6044091},
abstract = {Access public spatial data available under the INSPIRE directive. Tools for downloading references and addresses of properties, as well as map images.},
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/rOpenSpain/CatastRo",
"issueTracker": "https://github.com/rOpenSpain/CatastRo/issues",
"license": "https://spdx.org/licenses/GPL-2.0",
"version": "0.2.3",
"version": "0.2.3.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -270,7 +270,7 @@
},
"SystemRequirements": null
},
"fileSize": "1480.262KB",
"fileSize": "1482.023KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.1 (2023-06-16 ucrt)",
"version": "0.2.3"
"version": "0.2.3.9000"
},
{
"id": "https://doi.org/10.5281/zenodo.6044091",
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.
21 changes: 11 additions & 10 deletions vignettes/CatastRo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ val_catr_code
#> # ℹ 1 more variable: cm <chr>

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 @@ -172,37 +174,39 @@ 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 @@ -215,6 +219,7 @@ 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 @@ -241,13 +246,9 @@ 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/>.

0 comments on commit 7fb68b9

Please sign in to comment.