zonebuilder

Divide geographic space into discrete chunks

https://github.com/zonebuilders/zonebuilder

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.6%) to scientific vocabulary

Keywords from Contributors

geo
Last synced: 10 months ago · JSON representation

Repository

Divide geographic space into discrete chunks

Basic Info
Statistics
  • Stars: 39
  • Watchers: 4
  • Forks: 4
  • Open Issues: 5
  • Releases: 2
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
editor_options: 
  chunk_output_type: console
---




```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# zonebuilder



[![R-CMD-check](https://github.com/zonebuilders/zonebuilder/workflows/R-CMD-check/badge.svg)](https://github.com/zonebuilders/zonebuilder/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/zonebuilder)](https://CRAN.R-project.org/package=zonebuilder)
[![CRAN RStudio mirror
downloads](https://cranlogs.r-pkg.org/badges/grand-total/zonebuilder)](https://www.r-pkg.org/pkg/zonebuilder)
[DOI](https://doi.org/10.5311/JOSIS.2022.24.172)


The goal of zonebuilder is to break up large geographic regions such as cities into manageable zones.
Zoning systems are important in many fields, including demographics, economy, health, and transport. The zones have standard configuration, which enabled comparability across cities. See its website at [zonebuilders.github.io/zonebuilder](https://zonebuilders.github.io/zonebuilder/) and the academic paper that describes the package in detail [here (Lovelace et al. 2022)](https://doi.org/10.5311/JOSIS.2022.24.172).

## Installation

You can install the released version of zonebuilder from [CRAN](https://CRAN.R-project.org) with:

```{r, eval=FALSE}
install.packages("zonebuilder")
```

Install it from [GitHub](https://github.com/) with:

```{r install-gh, eval=FALSE}
# install.packages("remotes")
remotes::install_github("zonebuilders/zonebuilder")
```

## Using zonebuilder

Zonebuilder builds on the `sf` package and works well with mapping packages such as `ggplot2`, `leaflet`, `mapdeck`, `mapview` and `tmap`, the last of which we'll use in the following maps.
Attaching the package provides the example datasets `london_a()` and `london_c()`, the geographic boundary and the centre of London:

```{r}
library(zonebuilder)
library(tmap)
tmap_mode("plot")
tm_shape(london_a()) +
  tm_borders() +
  tm_shape(london_c()) +
  tm_dots("red")
```

The main function `zb_zone` breaks this geographical scale into zones. The default settings follow the **ClockBoard** configuration:

```{r}
london_zones <- zb_zone(london_c(), london_a())
zb_plot(london_zones)
```

The idea behind this zoning system is based on the following principles:

* Most cities have a centre, the 'heart' of the city. Therefore, the zones are distributed around the centre.
* Typically, the population is much denser in and around the centre and also the traffic intensity is higher. Therefore, the zones are smaller in and around the centre.
* The rings (so A, B, C, D, etc) reflect the proximity to the centre point. The distances from the outer borders of the rings A, B, C, D, etc. follow the triangular number sequence 1, 3, 6, 10, etc. This means that in everyday life use, within zone A everything is in walking distance, from ring B to the centre requires a bike, from zone C and further to the centre typically requires public transport. 
* Regarding direction relative to the centre, we use the clock analogy, since most people are familiar with that. So each ring (annuli) is divided into 12 segments, where segment 12 is directed at 12:00, segment 1 at 1:00 etc. 


The package `zonebuilder` does not only create zoning systems based on the CloadBoard layout as illustrated below.


The function `zb_zone` makes use of `zb_doughnut` and `zb_segment`, which can also be used directly:

```{r fig.height=3}
par(mfrow = c(1, 3))
zb_plot(zb_doughnut(london_c(), london_a(), n_circles = 5), title = "Doughnuts")
zb_plot(zb_segment(london_c(), n_segments = 20), title = "Segments")
zb_plot(zb_zone(london_c(), n_circles = 4, n_segments = 4), title = "4 segments, 4 circles")
```

The package also contains a function to create zones based on a simple rectangular grid system:

```{r}
z = zb_quadrat(london_a(), ncol = 10)
plot(z)
```


## Contribute

Contributions are welcome!

It may be worth checking-in in a [discussion post](https://github.com/zonebuilders/zonebuilder/discussions/28) before opening an issue.

## Citation

Please cite the package as follows (Lovelace et al. 2022):

```
@article{lovelace_clockboard_2022,
  title = {{{ClockBoard}}: {{A}} Zoning System for Urban Analysis},
  shorttitle = {{{ClockBoard}}},
  author = {Lovelace, Robin and Tennekes, Martijn and Carlino, Dustin},
  date = {2022-06-20},
  journaltitle = {Journal of Spatial Information Science},
  number = {24},
  pages = {63--85},
  issn = {1948-660X},
  doi = {10.5311/JOSIS.2022.24.172},
  url = {https://josis.org/index.php/josis/article/view/172},
  urldate = {2022-07-02},
  abstract = {Zones are the building blocks of urban analysis. Fields ranging from demographics to transport planning routinely use zones - spatially contiguous areal units that break-up continuous space into discrete chunks - as the foundation for diverse analysis techniques. Key methods such as origin-destination analysis and choropleth mapping rely on zones with appropriate sizes, shapes and coverage. However, existing zoning systems are sub-optimal in many urban analysis contexts, for three main reasons: 1) administrative zoning systems are often based on somewhat arbitrary factors; 2) zoning systems that are evidence-based (e.g., based on equal population size) are often highly variable in size and shape, reducing their utility for inter-city comparison; and 3) official zoning systems in many places simply do not exist or are unavailable. We set out to develop a flexible, open and scalable solution to these problems. The result is the zonebuilder project (with R, Rust and Python implementations), which was used to create the ClockBoard zoning system. ClockBoard consists of 12 segments emanating from a central place and divided by concentric rings with radii that increase in line with the triangular number sequence (1, 3, 6 km etc). 'ClockBoards' thus create a consistent visual frame of reference for monocentric cities that is reminiscent of clocks and a dartboard. This paper outlines the design and potential uses of the ClockBoard zoning system in the historical context, and discusses future avenues for research into the design and assessment of zoning systems.},
  issue = {24},
  langid = {english},
  keywords = {modifiable area unit problem},
  file = {C:\Users\georl_admin\Zotero\storage\QRQDMJSH\Lovelace et al. - 2022 - ClockBoard A zoning system for urban analysis.pdf}
}
```

Owner

  • Name: zonebuilders
  • Login: zonebuilders
  • Kind: organization

GitHub Events

Total
  • Issues event: 10
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 6
  • Push event: 15
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2
Last Year
  • Issues event: 10
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 6
  • Push event: 15
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 284
  • Total Committers: 5
  • Avg Commits per committer: 56.8
  • Development Distribution Score (DDS): 0.218
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Robin Lovelace r****x@g****m 222
Martijn Tennekes m****s@g****m 57
Markoroos m****s@g****m 2
Dustin Carlino d****r@g****m 2
Markoroos 6****s 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 35
  • Total pull requests: 16
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 1 day
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 1.94
  • Average comments per pull request: 0.5
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: 39 minutes
  • Average time to close pull requests: about 6 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Robinlovelace (30)
  • mtennekes (3)
  • dabreegster (1)
  • gasato (1)
Pull Request Authors
  • Robinlovelace (15)
  • dabreegster (1)
Top Labels
Issue Labels
question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 170 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: zonebuilder

Create and Explore Geographic Zoning Systems

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 170 Last month
Rankings
Stargazers count: 8.8%
Forks count: 17.0%
Dependent repos count: 23.8%
Dependent packages count: 28.7%
Average: 29.4%
Downloads: 68.8%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • RColorBrewer * imports
  • grDevices * imports
  • graphics * imports
  • sf * imports
  • bookdown * suggests
  • covr * suggests
  • dplyr * suggests
  • knitr * suggests
  • leaflet * suggests
  • lwgeom * suggests
  • pct * suggests
  • rmarkdown * suggests
  • tmap * suggests
  • tmaptools * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/pr-fetch v1 composite
  • r-lib/actions/pr-push v1 composite
  • r-lib/actions/setup-r v1 composite