-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
93 lines (63 loc) · 4.04 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(DT)
```
# ediblecity 0.2.1.900
<!-- badges: start -->
[![DOI](https://zenodo.org/badge/404743169.svg)](https://zenodo.org/badge/latestdoi/404743169)
[![R-CMD-check](https://github.com/icra/edibleCity/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/icra/edibleCity/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/ediblecity)](https://CRAN.R-project.org/package=ediblecity)
<!-- [![Codecov test coverage](https://codecov.io/gh/icra/edibleCity/branch/master/graph/badge.svg)](https://app.codecov.io/gh/icra/edibleCity?branch=master) -->
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->
The goal of ediblecity is to is to estimate the potential of UA to contribute to addressing several urban challenges at the city-scale. Within this aim, we followed the urban challenges defined by the Eklipse project that are followed for nearly all of the European projects focused on Nature-based Solutions. We selected 8 indicators directly related to one or several urban challenges.
## Installation
You can install the last LTR version from CRAN:
``` r
install.packages("ediblecity")
```
Alternatively, you can install the development version of ediblecity from [r-universe](https://r-universe.dev) with:
``` r
install.packages("ediblecity", repos = "jospueyo.r-universe.dev")
```
## Indicators estimated
The package provides eight indicators that estimate different benefits of urban agriculture:
- `food_production()`: Amount of food produced in the city.
- `green_capita()`: Green per capita can be computed as raw or as the difference among neighbourhoods.
- `green_distance()`: Distance to closest public green area larger than certain surface. It computes also the proportion of homes that are further than a specific threshold.
- `UHI()`: Urban heat island as a rasters (`stars` object) or as numeric values.
- `edible_jobs()`: Number of jobs created by commercial urban agriculture.
- `edible_volunteers()`: Number of volunteers involved in community urban agriculture.
- `no2_seq()`: Amount of NO<sub>2</sub> sequestered by urban green (in gr/s).
- `runoff_prev()`: Runoff in the city after a specific rain event. It also computes the amount of rainwater harvested by urban agriculture initiatives.
## Set a scenario
Although `ediblecity` can also estimate indicators directly from an `sf` object, the function `set_scenario` provides a basic tool to create an scenario combining different proportions of elements of urban agriculture. Some warnings are triggered when the function can't satisfy the parameters passed by the user.
```{r example}
library(ediblecity)
scenario <- set_scenario(city_example,
pGardens = 0.7,
pVacant = 0.8,
pRooftop = 0.6,
pCommercial = 0.5)
```
All attributes of urban agriculture elements are included in `city_land_uses` dataframe. This can be used as default. Otherwise, a customized dataframe can be provided to compute each indicator.
```{r city_land_uses}
knitr::kable(city_land_uses)
```
## Contributors
Contributions are welcome! Some of the existing indicators can be improved as well as new indicators can be created. Likewise, the creation of new scenarios can include new elements of urban agriculture or provide further customization.
Scientific collaborations are also welcome! Check my research profile at [Google scholar](https://scholar.google.com/citations?user=zP9DBLMAAAAJ&hl=ca).
## Acknowledgements
<p align="center">
<img src="man/figures/README-edicitnet_logo.jpg" style="width:150px"/>
</p>
<img src="man/figures/README-EC_logo.png" style="width:40px"/> This research was funded by Edicitnet project (grant agreement nº 776665)