Provides programmatic access to Glottography, an online
repository of geospatial speaker-area polygons for the world's
languages. The package allows users to list available datasets,
download and install them, and load speaker-area polygons as
standard spatial 'sf' objects in R. Data are sourced from either
the Glottography organization on GitHub
< https://github.com/Glottography> or the Glottography community
on Zenodo < https://zenodo.org/communities/glottography>.
Based on Ranacher et al. (2026)
Rglottography provides programmatic access to the Glottography dataset, a collection of language area polygons hosted on Zenodo and GitHub. The package allows users to list available datasets, download them, and load them as standard spatial (sf) objects in R.
Linguists, geographers, cultural anthropologists, and others working with areal linguistic data.
set_cache_dir(path): Set the location of the cache directory.list_datasets(): Lists all available Glottography datasets.download_dataset(dataset): Downloads one or more datasets to the local cache.load_glottography(dataset, install_missing = TRUE): Loads downloaded datasets as sf spatial objects.set_cache_dir(path): Sets a custom location for the cache directory. Use this if you want to change where datasets are stored.tools::R_user_dir("Rglottography", "data")). Users can change this location using set_cache_dir().inst/extdata/registry.json and copied to the cache directory.sf) objects for compatibility with geospatial analysis in R.You can install the development version of Rglottography from GitHub using remotes. If not already installed, first install remotes, then use it to install Rglottography from GitHub:
# install.packages("remotes")
remotes::install_github("Glottography/Rglottography")
The following commands demonstrate usage:
library(Rglottography)
# List available datasets
list_datasets()
# Load the dataset matsumae2021exploring, downloading it on first use.
glottography <- load_datasets("matsumae2021exploring", install_missing = TRUE)
languages <- glottography$languages
See the package vignettes for more detailed examples.