Plotting typological data with R

I made a tutorial on how to plot typological data (here from grambank) with R.

Here is the code.

library(ggplot2) # for creating nice plots
library(dplyr) # for manipulating data frames
library(sf) # for manipulation of shape files 
library(rnaturalearth) # for geographic data
library(rnaturalearthhires) # for high resolution geographic data
library(lingtypology) # for access to databases such as glottolog
library(viridis) # for colorblind-friendly color palettes


# Download to a temporary file
grambank057 <- tempfile(fileext = ".geojson")
download.file(
  "https://grambank.clld.org/parameters/GB057.geojson",
  grambank057
)


# Read the downloaded geoJson file with the sf library:
grambank  <- read_sf(grambank057)
head(grambank)

# create base map of Cameroon
cameroon <- ne_states(country = "Cameroon", returnclass = "sf")

# filter out all data points from grambank that are not in Cameroon
camerbank <- st_filter(grambank, cameroon)
head(camerbank)


#Grambank
ggplot() +
  geom_sf(data=cameroon)+
  theme_void() +
  geom_sf(data = camerbank, aes(fill=label), pch=21, size=2)+
  scale_fill_viridis(option="inferno", discrete=TRUE)

Exploring linguistic typology through language puzzles

In this class, we solve a linguistic puzzle each week, primarily from the International Olympiad of Linguistics. Topics include writing systems, number systems, verbal morphology, kinship systems, and others. I first taught this class in the winter of 2020/21. You can use my syllabus for inspiration, if you’d like to try this out. My students loved the class and so did I. Since this was a distant-learning class, I also prepared short video lectures for each session. You can watch some of them at the HHU mediathek. I will definitely teach this class again, probably with varying sets of puzzles.