View source: R/read_cbs_yishuv.R
| read_cbs_yishuv | R Documentation |
This function is a wrapper around readxl::read_excel(), reading a specific
yishuvim data file or a part of it. A yishuv, or a point of residence, is a
geographically defined place where people live. Some yishuvim are municipalities,
in the case of of cities and local councils, but most are not. most yishuvim are
part of municipalities that are regional councils. Also, some yishuvim are not
themselves and are not part of a municipality, like some Bedouin places in
southern Israel, some industry areas, Mikveh Israel, and more.
read_cbs_yishuv(path, cols = NULL, col_names = NULL)
path |
A character vector of length 1, denoting the local file path to the yishuvim data file. A full list of available files by the CBS is at the relevant CBS page. |
cols |
<tidy-select>
Columns to keep. The default |
col_names |
A character vector containing the new column names of the
output tibble. If |
A tibble with yishuvim data for a specific year, where every row is a yishuv and every column is a different variable for this yishuv in that year. Be advised all columns are of type character, so you need to parse the data types yourself at will. Column names are cleaned so only single whitespaces are kept.
library(dplyr)
read_cbs_yishuv(system.file("extdata", "bycode2021.xlsx", package = "il.cbs.muni")) |>
dplyr::glimpse()
read_cbs_yishuv(
system.file("extdata", "bycode2021.xlsx", package = "il.cbs.muni"),
cols = c(1, 2, 5, 13)
) |>
mutate(across(2, pad_yishuv_id)) |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.