This function first divides geographic space into [annuli]( (concentric 2d rings or 'doughnuts') and then subdivides each annulus into a number of segments.

  x = NULL,
  area = NULL,
  n_circles = NA,
  n_segments = 12,
  distance = 1,
  distance_growth = 1,
  labeling = NA,
  starting_angle = NA,
  segment_center = FALSE,
  intersection = TRUE,
  city = NULL



Centre point. Should be an sf or sfc object containing one point, or a name of a city (which is looked up with OSM geocoding).


(optional) Area. Should be an sf or sfc object containing one (multi) polygon


Number of rings including the central circle. By default 5, unless area is specified (then it is set automatically to fill the area).


(optional) Number of segments. The number of segments. Either one number which determines the number of segments applied to all circles, or a vector with a number for each circle (which should be a multiple of 4, see also the argument labeling). By default, the central circle is not segmented (see the argument segment_center).


Distance The distances between the circles. For the center circle, it is the distance between the center and the circle. If only one number is specified, distance_growth determines the increment at which the distances grow for the outer circles.


The rate at which the distances between the circles grow. Only applicable when distance is one number and n_circles > 1. See also distance.


The labeling of the zones. Either "clock" which uses the clock ananolgy (i.e. hours 1 to 12) or "NESW" which uses the cardinal directions N, E, S, W. If the number of segments is 12, the clock labeling is used, and otherwise NESW. Note that the number of segments should be a multiple of four. If, for instance the number of segments is 8, than the segments are labeled N1, N2, E1, E2, S1, S2, W1, and W2.


The angle of the first of the radii that create the segments (degrees). By default, it is either 15 when n_segments is 12 (i.e. the ClockBoard setting) and -45 otherwise.


Should the central circle be divided into segments? `FALSE` by default.


Should the zones be intersected with the area? TRUE by default.


(optional) Name of the city. If specified, it adds a column `city` to the returned `sf` object.


An `sf` object containing zones covering the region


By default 12 segments are used for each annuli, resulting in a zoning system that can be used to refer to segments in [clock position](, with 12 representing North, 3 representing East, 6 Sounth and 9 Western segments.


# default settings
z = zb_zone(london_c(), london_a())
# \donttest{

if (require(tmap)) {
  z = zb_zone("Berlin")
#> Loading required package: tmap

# variations
zb_plot(zb_zone(london_c(), london_a(), n_circles = 2))

zb_plot(zb_zone(london_c(), london_a(), n_circles = 4, distance = 2, distance_growth = 0))

zb_plot(zb_zone(london_c(), london_a(), n_circles = 3, n_segments = c(1,4,8)))

# }