Update to v0.3.9000
37
man/add_admin_boundaries.Rd
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_admin_boundaries}
|
||||
\alias{add_admin_boundaries}
|
||||
\title{Add admin boundaries (lines) and the legend}
|
||||
\usage{
|
||||
add_admin_boundaries(
|
||||
lines,
|
||||
colors,
|
||||
labels,
|
||||
lwds,
|
||||
title = "",
|
||||
buffer = NULL,
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{lines}{List of multiline shape defined by sf package.}
|
||||
|
||||
\item{colors}{Vector of hexadecimal codes. Same order as lines.}
|
||||
|
||||
\item{labels}{Vector of labels in the legend. Same order as lines.}
|
||||
|
||||
\item{lwds}{Vector of line widths. Same order as lines.}
|
||||
|
||||
\item{title}{Legend title.}
|
||||
|
||||
\item{buffer}{A buffer, either one value or a vector of 4 values (left, bottom, right, top).}
|
||||
|
||||
\item{...}{Other arguments to pass to each shape in `tmap::tm_lines()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Add admin boundaries (lines) and the legend
|
||||
}
|
||||
43
man/add_admin_labels.Rd
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_admin_labels}
|
||||
\alias{add_admin_labels}
|
||||
\title{Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels.}
|
||||
\usage{
|
||||
add_admin_labels(
|
||||
point,
|
||||
text,
|
||||
size = 0.5,
|
||||
fontface = "bold",
|
||||
fontfamily = "Leelawadee",
|
||||
shadow = TRUE,
|
||||
auto_placement = FALSE,
|
||||
remove_overlap = FALSE,
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{point}{Multipoint shape defined by sf package.}
|
||||
|
||||
\item{text}{Text labels column.}
|
||||
|
||||
\item{size}{Relative size of the text labels.}
|
||||
|
||||
\item{fontface}{Fontface.}
|
||||
|
||||
\item{fontfamily}{Fontfamily. Leelawadee is your precious.}
|
||||
|
||||
\item{shadow}{Boolean. Add a shadow around text labels. Issue opened on Github to request.}
|
||||
|
||||
\item{auto_placement}{Logical that determines whether the labels are placed automatically.}
|
||||
|
||||
\item{remove_overlap}{Logical that determines whether the overlapping labels are removed.}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_text()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels.
|
||||
}
|
||||
34
man/add_compass.Rd
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_compass}
|
||||
\alias{add_compass}
|
||||
\title{Add a compass}
|
||||
\usage{
|
||||
add_compass(
|
||||
text_size = 0.6,
|
||||
position = c("right", 0.8),
|
||||
color_dark = cols_reach("black"),
|
||||
text_color = cols_reach("black"),
|
||||
type = "4star",
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{text_size}{Relative font size.}
|
||||
|
||||
\item{position}{Position of the compass. Vector of two values, specifying the x and y coordinates.}
|
||||
|
||||
\item{color_dark}{Color of the dark parts of the compass.}
|
||||
|
||||
\item{text_color}{color of the text.}
|
||||
|
||||
\item{type}{Compass type, one of: "arrow", "4star", "8star", "radar", "rose".}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_compass()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Add a compass
|
||||
}
|
||||
25
man/add_credits.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_credits}
|
||||
\alias{add_credits}
|
||||
\title{Do you want to credit someone or some institution?}
|
||||
\usage{
|
||||
add_credits(text, size = 0.4, bg_color = NA, position = c(0.75, 0.02), ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{text}{Text.}
|
||||
|
||||
\item{size}{Relative text size.}
|
||||
|
||||
\item{bg_color}{Background color.}
|
||||
|
||||
\item{position}{Position. Vector of two coordinates. Usually somewhere down.}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_credits()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Do you want to credit someone or some institution?
|
||||
}
|
||||
61
man/add_indicator_layer.Rd
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_indicator_layer}
|
||||
\alias{add_indicator_layer}
|
||||
\title{Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values}
|
||||
\usage{
|
||||
add_indicator_layer(
|
||||
poly,
|
||||
col,
|
||||
buffer = NULL,
|
||||
n = 5,
|
||||
style = "pretty",
|
||||
palette = pal_reach("red_5"),
|
||||
as_count = TRUE,
|
||||
color_na = cols_reach("white"),
|
||||
text_na = "Missing data",
|
||||
legend_title = "Proportion (\%)",
|
||||
legend_text_separator = " - ",
|
||||
border_alpha = 1,
|
||||
border_col = cols_reach("lt_grey_1"),
|
||||
lwd = 1,
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{poly}{Multipolygon shape defined by sf package.}
|
||||
|
||||
\item{col}{Numeric attribute to map.}
|
||||
|
||||
\item{buffer}{A buffer, either one value or a vector of 4 values (left, bottom, right, top).}
|
||||
|
||||
\item{n}{The desire number of classes.}
|
||||
|
||||
\item{style}{Method to process the color scale for continuous numerical variables. See `classInt::classIntervals()` for details.}
|
||||
|
||||
\item{palette}{Vector of fill colors as hexadecimal values. For REACH color palettes, it is possible to use `pal_reach()`. For now,'palette' must be changed manually, accordingly to the number of drawn classes.}
|
||||
|
||||
\item{as_count}{Boolean. When col is a numeric variable, should it be processed as a count variable? For instance, 0, 1-10, 11-20.}
|
||||
|
||||
\item{color_na}{Fill color for missing data.}
|
||||
|
||||
\item{text_na}{Legend text for missing data.}
|
||||
|
||||
\item{legend_title}{Legend title.}
|
||||
|
||||
\item{legend_text_separator}{Text separator for classes. E.g. " to " will give 0, 1 to 10, 11 to 20.}
|
||||
|
||||
\item{border_alpha}{Transparency of the border.}
|
||||
|
||||
\item{border_col}{Color of the border.}
|
||||
|
||||
\item{lwd}{Linewidth of the border.}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_polygons()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values
|
||||
}
|
||||
49
man/add_layout.Rd
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_layout}
|
||||
\alias{add_layout}
|
||||
\title{Basic defaults based on `tmap::tm_layout()`}
|
||||
\usage{
|
||||
add_layout(
|
||||
title = NULL,
|
||||
legend_position = c(0.02, 0.5),
|
||||
frame = FALSE,
|
||||
legend_frame = cols_reach("main_grey"),
|
||||
legend_text_size = 0.6,
|
||||
legend_title_size = 0.8,
|
||||
title_size = 0.9,
|
||||
title_fontface = "bold",
|
||||
title_color = cols_reach("main_grey"),
|
||||
fontfamily = "Leelawadee",
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{title}{Map title.}
|
||||
|
||||
\item{legend_position}{Legend position. Not above the map is a good start.}
|
||||
|
||||
\item{frame}{Boolean. Legend frame?}
|
||||
|
||||
\item{legend_frame}{Legend frame color.}
|
||||
|
||||
\item{legend_text_size}{Legend text size in 'pt'.}
|
||||
|
||||
\item{legend_title_size}{Legend title size in 'pt'.}
|
||||
|
||||
\item{title_size}{Title text size in 'pt'.}
|
||||
|
||||
\item{title_fontface}{Title fontface. Bold if you wanna exemplify a lot what it is about.}
|
||||
|
||||
\item{title_color}{Title font color.}
|
||||
|
||||
\item{fontfamily}{Overall fontfamily. Leelawadee is your precious.}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_layout()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Basic defaults based on `tmap::tm_layout()`
|
||||
}
|
||||
31
man/add_scale_bar.Rd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/map.R
|
||||
\name{add_scale_bar}
|
||||
\alias{add_scale_bar}
|
||||
\title{Add a scale bar}
|
||||
\usage{
|
||||
add_scale_bar(
|
||||
text_size = 0.6,
|
||||
position = c("left", 0.01),
|
||||
color_dark = cols_reach("black"),
|
||||
breaks = c(0, 50, 100),
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{text_size}{Relative font size.}
|
||||
|
||||
\item{position}{Position of the compass. Vector of two values, specifying the x and y coordinates.}
|
||||
|
||||
\item{color_dark}{Color of the dark parts of the compass.}
|
||||
|
||||
\item{breaks}{Breaks of the scale bar. If not specified, breaks will be automatically be chosen given the prefered width of the scale bar. Example: c(0, 50, 100).}
|
||||
|
||||
\item{...}{Other arguments to pass to `tmap::tm_compass()`.}
|
||||
}
|
||||
\value{
|
||||
A tmap layer.
|
||||
}
|
||||
\description{
|
||||
Add a scale bar
|
||||
}
|
||||
|
|
@ -26,7 +26,6 @@ bar_reach(
|
|||
title_size = 14,
|
||||
legend_position = "right",
|
||||
legend_rev = TRUE,
|
||||
void = FALSE,
|
||||
...
|
||||
)
|
||||
}
|
||||
|
|
@ -73,8 +72,6 @@ bar_reach(
|
|||
|
||||
\item{legend_rev}{Reverse the color in the guide? Default to TRUE.}
|
||||
|
||||
\item{void}{Boolean to remove all elements from the plot. Default to FALSE.}
|
||||
|
||||
\item{...}{Other arguments to be passed to "ggblanket::gg_col"}
|
||||
}
|
||||
\value{
|
||||
|
|
|
|||
25
man/border_admin0.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{border_admin0}
|
||||
\alias{border_admin0}
|
||||
\title{Haïti border.}
|
||||
\format{
|
||||
A sf multiline objet with 1 feature and 6 fields:
|
||||
\describe{
|
||||
\item{fid_1}{fid_1}
|
||||
\item{uno}{uno}
|
||||
\item{count}{count}
|
||||
\item{x_coord}{x_coord}
|
||||
\item{y_coord}{y_coord}
|
||||
\item{area}{area}
|
||||
\item{geometry}{Multiline geometry.}
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
border_admin0
|
||||
}
|
||||
\description{
|
||||
A multiline shapefile of Haiti's border.
|
||||
}
|
||||
\keyword{datasets}
|
||||
28
man/centroid_admin1.Rd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{centroid_admin1}
|
||||
\alias{centroid_admin1}
|
||||
\title{Haïti admin 1 centroids shapefile.}
|
||||
\format{
|
||||
A sf multipoint object with 10 features and 9 fields:
|
||||
\describe{
|
||||
\item{ADM1_PC}{Admin 1 postal code.}
|
||||
\item{ADM1_EN}{Full name in English.}
|
||||
\item{ADM1_FR}{Full name in French.}
|
||||
\item{ADM1_HT}{Full name in Haitian Creole.}
|
||||
\item{ADM0_EN}{Country name in English.}
|
||||
\item{ADM0_FR}{Country name in French.}
|
||||
\item{ADM0_HT}{Country name in Haitian Creole.}
|
||||
\item{ADM0_PC}{Country postal code.}
|
||||
\item{ADM1_FR_UPPER}{Admin 1 French name - uppercase.}
|
||||
\item{geometry}{Multipoint geometry.}
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
centroid_admin1
|
||||
}
|
||||
\description{
|
||||
A multipoint shapefile of Haiti's admin 1.
|
||||
}
|
||||
\keyword{datasets}
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.5 KiB |
BIN
man/figures/README-example-map.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
241
man/figures/README-example-map.svg
Normal file
|
After Width: | Height: | Size: 838 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 6.2 KiB |
27
man/frontier_admin0.Rd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{frontier_admin0}
|
||||
\alias{frontier_admin0}
|
||||
\title{Haïti frontier with Dominican Republic.}
|
||||
\format{
|
||||
A sf multipoint objet with 4 features and 8 fields:
|
||||
\describe{
|
||||
\item{fid_1}{fid_1}
|
||||
\item{objectid}{objectid}
|
||||
\item{id}{id}
|
||||
\item{fromnode}{fromnode}
|
||||
\item{tonode}{tonode}
|
||||
\item{leftpolygo}{leftpolygo}
|
||||
\item{rightpolygo}{rightpolygo}
|
||||
\item{shape_leng}{shape_leng}
|
||||
\item{geometry}{Multiline geometry.}
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
frontier_admin0
|
||||
}
|
||||
\description{
|
||||
A multiline shapefile of Haiti's frontier with Dominican Republic.
|
||||
}
|
||||
\keyword{datasets}
|
||||
29
man/indicator_admin1.Rd
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{indicator_admin1}
|
||||
\alias{indicator_admin1}
|
||||
\title{Indicator admin 1 polygons shapefile.}
|
||||
\format{
|
||||
A sf multipoint object with 10 features and 10 fields:
|
||||
\describe{
|
||||
\item{ADM1_PC}{Admin 1 postal code.}
|
||||
\item{admin1}{Admin 1 unique id.}
|
||||
\item{opn_dfc}{Proportion of HHs that reported open defecation as sanitation facility.}
|
||||
\item{ADM1_EN}{Full name in English.}
|
||||
\item{ADM1_FR}{Full name in French.}
|
||||
\item{ADM1_HT}{Full name in Haitian Creole.}
|
||||
\item{ADM0_EN}{Country name in English.}
|
||||
\item{ADM0_FR}{Country name in French.}
|
||||
\item{ADM0_HT}{Country name in Haitian Creole.}
|
||||
\item{ADM0_PC}{Country postal code.}
|
||||
\item{geometry}{Multipolygon geometry.}
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
indicator_admin1
|
||||
}
|
||||
\description{
|
||||
A multipolygon shapefile of Haiti's admin 1 with an indicator column 'opn_dfc'.
|
||||
}
|
||||
\keyword{datasets}
|
||||
26
man/line_admin1.Rd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{line_admin1}
|
||||
\alias{line_admin1}
|
||||
\title{Haïti admin 1 lines shapefile.}
|
||||
\format{
|
||||
A sf multiline object with 10 features and 8 fields:
|
||||
\describe{
|
||||
\item{ADM1_EN}{Full name in English.}
|
||||
\item{ADM1_FR}{Full name in French.}
|
||||
\item{ADM1_HT}{Full name in Haitian Creole.}
|
||||
\item{ADM0_EN}{Country name in English.}
|
||||
\item{ADM0_FR}{Country name in French.}
|
||||
\item{ADM0_HT}{Country name in Haitian Creole.}
|
||||
\item{ADM0_PCODE}{Country postal code.}
|
||||
\item{geometry}{Multiline geometry.}
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
line_admin1
|
||||
}
|
||||
\description{
|
||||
A multiline shapefile of Haiti's admin 1.
|
||||
}
|
||||
\keyword{datasets}
|
||||
|
|
@ -23,7 +23,6 @@ point_reach(
|
|||
text_size = 10,
|
||||
title_size = 14,
|
||||
legend_position = "right",
|
||||
void = FALSE,
|
||||
...
|
||||
)
|
||||
}
|
||||
|
|
@ -64,8 +63,6 @@ point_reach(
|
|||
|
||||
\item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".}
|
||||
|
||||
\item{void}{Boolean to remove all elements from the plot. Default to FALSE.}
|
||||
|
||||
\item{...}{Other arguments to be passed to "ggblanket::gg_col"}
|
||||
}
|
||||
\value{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ theme_reach(
|
|||
title_size = 14,
|
||||
plot_background_pal = "#FFFFFF",
|
||||
panel_background_pal = "#FFFFFF",
|
||||
void = FALSE,
|
||||
legend_position = "right",
|
||||
legend_direction = "vertical",
|
||||
legend_reverse = TRUE,
|
||||
|
|
@ -37,8 +36,6 @@ theme_reach(
|
|||
|
||||
\item{panel_background_pal}{The color for the panel background color. Default to white.}
|
||||
|
||||
\item{void}{Boolean to remove all elements from the plot. Default to FALSE.}
|
||||
|
||||
\item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".}
|
||||
|
||||
\item{legend_direction}{Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".}
|
||||
|
|
|
|||