
Download the bilateral mobility sources used to build the fused OD structure
Source:R/download_mobility_od_sources.R
download_mobility_od_sources.RdFetches the three external origin-destination sources that
process_mobility_od_data fuses into a connectivity structure
for est_mobility: UN DESA bilateral migrant stock, Abel &
Cohen bilateral migration flows, and the Meta (Facebook) Social
Connectedness Index. The fourth source, land contiguity, is derived locally
from the ADM0 shapefiles and needs no download.
Arguments
- PATHS
List of paths from
get_paths. Must includeDATA_RAW.- sources
Which to fetch. Default all three.
- snapshot_date
Date stamp for the archive subdirectory. Defaults to
Sys.Date().- overwrite
If
FALSE(default), an existing snapshot is kept.- verbose
Print progress.
Sources and provenance
- UN DESA International Migrant Stock 2024
Bilateral migrant stock (persons born in the origin residing in the destination), Table 1, 2024 both-sexes column. ~6 MB xlsx. The un.org host rejects a default
libcurlagent with HTTP 403, so a browser User-Agent is sent. Licence: UN open data.- Abel & Cohen 2022
Bilateral migration flow estimates (Sci Data), figshare article 12845711,
bilat_mig_sex.csv(~23 MB), ISO3 already. Theda_min_closedestimator over the latest period is used downstream. Licence: CC BY.- Meta Social Connectedness Index
HDX
social-connectedness-index, resourcecountry.csv(~0.6 MB), columnsuser_country/friend_country(ISO2) andscaled_sci. Licence: CC BY-NC (Meta Data for Good) – see the note below.
Deviation from the E3 prototype. The original MOSAIC-OCV E3 work
used the GADM-1 resource (273 MB) and summed sub-region pairs up to national
totals. country.csv is Meta's own national-level product: ~500x
smaller, no aggregation step, and a directly-measured national index rather
than a sum of relative sub-national indices. Because the two are not
guaranteed to be proportional, a fused structure built here is close to but
not byte-identical with the E3 artifacts.
Licensing. Meta SCI is CC BY-NC. That is more restrictive
than the other MOSAIC inputs and than the CC BY / UN terms of DESA and
Abel-Cohen. Set sources to exclude "sci" (and reweight in
process_mobility_od_data) if a downstream use is commercial.
Examples
if (FALSE) { # \dontrun{
PATHS <- get_paths()
download_mobility_od_sources(PATHS)
process_mobility_od_data(PATHS)
} # }