Skip to contents

Generate adjacency data between NUTS 3 regions from Meta Social Connectedness Index.

Usage

generate_adjacency_meta(
  area = NULL,
  url = paste0("https://data.humdata.org/dataset/e9988552-74e4-4ff4-943f-c782ac8bca87/",
    "resource/b691d1d1-b286-456d-9a23-16e2f2d463cc/download/nuts_2024.zip")
)

Arguments

area

(character())
The geographic area (list of regions) of interest. If NULL, all regions are returned.

url

(character(1))
The location of the Meta Social Connectedness Index dataset (zip file).

Value

(data.frame(1))
The adjacency (connectedness) of the regions. Effectively, the adjacency is a long-form of the adjacency-matrix
The data.frame must include the following columns:
- from (character): Region identifier.
- to (character): Region identifier.
- adjacency (numeric): Strength of the connectedness.

Details

The Social Connectedness Index is a relative (symmetric) measure related to the likelihood of being friends on Facebook. We first normalise per region to determine the geographical distributions of Facebook friends for each region (identified by the "from" column) If the only activity in the world was visiting (Facebook) friends, which would be nice, these probabilities could be interpreted as movement adjacency. However, since work and school are still a thing (boo!), we will instead impose a infection-flow adjacency by computing the quantity: adjacency * t(adjacency). This can be interpreted roughly as the probability that a randomly selected friend will also select you back in a game of dice.

Examples

if (FALSE) { # \dontrun{
adjacency_meta_nordic <- generate_adjacency_meta(area = c("DK", "FI", "IS", "NO", "SE"))
} # }