glottospace: Make glottodata spatial and generate language polygons from...

View source: R/glottospace.R

glottospaceR Documentation

Make glottodata spatial and generate language polygons from points.

Description

This function takes glottodata (either with or without metadata) and turns it into spatial points or polygons.

Usage

glottospace(glottodata, method = NULL, radius = NULL)

Arguments

glottodata

A glottodata table, or list of a glottodata table and metadata table(s)

method

Interpolation method, either "buffer" or "voronoi" (synonymous with "thiessen")

radius

In case interpolation method "buffer", the radius in km around the points. If method "thiessen", a buffer will be created into the ocean, particularly relevant for island languages.

Value

A spatial version of glottodata. In case glottodata has metadata, only glottodata will be converted to spatial (but all metadata tables are kept). Object returned as sf object, or a list of which the first element is an sf object, depending on the input.

Examples

glottodata <- glottoget("demodata", meta = TRUE)

glottopols <- glottospace(glottodata, method = "voronoi")


glottodata <- glottofilter(country = "Netherlands")
glottopols <- glottospace(glottodata, method = "buffer", radius = 20)
glottomap(glottopols)

glottodata <- glottofilter(continent = "South America")
glottopols <- glottospace(glottodata, method = "thiessen")
glottomap(glottopols)

glottodata <- glottofilter(country = "Philippines")
glottopols <- glottospace(glottodata, radius = 100, method = "thiessen")
glottomap(glottopols)


SietzeN/glottospace documentation built on June 15, 2024, 10:45 p.m.