View source: R/get_xSub_multi.R
| get_xSub_multi | R Documentation |
This function downloads and merges mutiple country files from www.x-sub.org. Syntax is similar to get_xSub().
get_xSub_multi( data_source, sources_type = "individual", data_type = "spatial panel", country_iso3 = NULL, space_unit, time_unit, geo_window = "1 km", time_window = "1 day", dyad_type = "undirected", merge_files = TRUE, out_dir = getwd(), write_file = FALSE, write_format = "csv", verbose = FALSE )
data_source |
Name of data source. Character string. See |
sources_type |
Type of data sources ("individual" or "multiple"). Character string. |
data_type |
Type of dataset ("event" or "panel"). Character string. |
country_iso3 |
Country codes (ISO3). Character string or vector. See |
space_unit |
Geographic level of analysis. Character string. Can be one of |
time_unit |
Temporal level of analysis. Character string. Can be one of |
geo_window |
Geographic window (if source_type="multiple"). Could be either of "1 km" or "5 km". Character string or vector. |
time_window |
Time window (if source_type="multiple"). Could be either of "1 day" or "2 day". Character string or vector. |
dyad_type |
Time window (if source_type="multiple"). Could be either of "undirected" or "directed". Character string or vector. |
merge_files |
Logical. If |
out_dir |
Path to directory where files will be saved. Character string. |
write_file |
Logical. If |
write_format |
Output file format. Character string. Can be one of |
verbose |
Logical. When |
info_xSub, get_xSub
info_xSub, get_xSub
# Check which countries are available for GED
info_xSub(data_source="GED")
# Example with two countries
## Not run:
my_file <- get_xSub_multi(data_source = "PITF",country_iso3 = c("ALB","ARM"),
space_unit = "adm0",time_unit = "year")
## End(Not run)
# Example with two countries
## Not run:
my_file <- get_xSub_multi(data_source = "GED",country_iso3 = c("EGY","AGO"),
space_unit = "adm1",time_unit = "month")
## End(Not run)
# Example with two countries, multiple sources, event-level
## Not run:
my_file <- get_xSub_multi(sources_type = "multiple",data_type="event",country_iso3 = c("EGY","AGO"))
## End(Not run)
# Example with all countries (WARNING: this can take a long time to run)
## Not run:
my_file <- get_xSub_multi(data_source = "BeissingerProtest",country_iso3 = NULL,
space_unit = "adm0",time_unit = "year")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.