Created
May 30, 2022 06:09
-
-
Save agricolamz/97b83d99ec72fc74a31b9f92859b0b8e to your computer and use it in GitHub Desktop.
create a map of linguae francae of Dagestan for Nina Dobrushina
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 30.05.2022, George Moroz | |
# GPL-3.0 license | |
library(tidyverse) | |
library(lingtypology) | |
# load data --------------------------------------------------------------- | |
values <- read_tsv("values.tsv") | |
individual_points <- read_csv("individual_points.csv") | |
# from Moroz, Verhees (2020), see https://github.com/sverhees/master_villages | |
data_for_extrapolation <- read_tsv("https://raw.githubusercontent.com/sverhees/master_villages/master/data/villages.tsv") | |
# merge and clean for lingtypology ---------------------------------------- | |
data_for_extrapolation %>% | |
filter(!kutans) %>% | |
inner_join(values) %>% | |
mutate(lang = case_when(lang == "Azerbaijani" ~ "Northern Azerbaijani", | |
lang == "Dargwa" ~ "Nuclear North Dargwa", | |
lang == "Khwarshi" ~ "Khwarshi-Inkhoqwari", | |
TRUE ~ lang)) -> | |
for_map | |
# create a map ------------------------------------------------------------ | |
map.feature(languages = for_map$lang, | |
latitude = for_map$lat, | |
longitude = for_map$lon, | |
density.estimation = for_map$value, | |
density.estimation.color = c("#1f77b4", "#ff7f0e","#2ca02c"), | |
density.method = "kernal density estimation", | |
density.points = FALSE, | |
density.legend.position = "bottomright", | |
tile="Stamen.TonerLite", | |
minimap = TRUE, | |
minimap.position = "topright") %>% | |
map.feature(languages = individual_points$lang, | |
latitude = individual_points$lat, | |
longitude = individual_points$lon, | |
label = individual_points$lang, | |
pipe.data = ., | |
tile="Stamen.TonerLite") | |
# Mehtods are hidden, but retrievable from ?map.feature, look at | |
# ?lingtypology::polygon.points_kde() | |
# ?lingtypology::polygon.points_fd() | |
# If you have in mind something better, I would love to include it in lingtypology. | |
# you can see data used in extropolation ---------------------------------- | |
map.feature(languages = for_map$lang, | |
features = for_map$value, | |
latitude = for_map$lat, | |
longitude = for_map$lon, | |
density.estimation = for_map$value, | |
density.estimation.color = c("#1f77b4", "#ff7f0e","#2ca02c"), | |
density.method = "kernal density estimation", | |
density.points = TRUE, | |
density.legend.position = "bottomright", | |
label = for_map$village, | |
tile="Stamen.TonerLite", | |
minimap = TRUE, | |
minimap.position = "topright", | |
width = 2) | |
# Afterwards I used some tricks with repeating some observations in order to | |
# get more smooth picture you see in my tweet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lang | aff | gltc_lang | lat | lon | |
---|---|---|---|---|---|
Akhvakh | Andic | akhv1239 | 42.40035 | 46.30369 | |
Andi | Andic | andi1255 | 42.80785 | 46.29187 | |
Bagvalal | Andic | bagv1239 | 42.39664 | 46.1041 | |
Botlikh | Andic | botl1242 | 42.665 | 46.22 | |
Chamalal | Andic | cham1309 | 42.50239 | 45.99496 | |
Godoberi | Andic | ghod1238 | 42.74276 | 46.22524 | |
Karata | Andic | kara1474 | 42.65005 | 46.31511 | |
Tindi | Andic | tind1238 | 42.33164 | 45.92268 | |
Avar | Avar | avar1256 | 42.43056 | 46.66639 | |
Nuclear North Dargwa | Dargwa | darg1241 | 42.42568 | 47.43876 | |
Chirag | Dargwa | chir1284 | 41.8381 | 47.4303 | |
Icari | Dargwa | icar1234 | 41.99733 | 47.5833 | |
Kajtak | Dargwa | kajt1238 | 42.06139 | 47.79597 | |
Kubachi | Dargwa | kuba1248 | 42.0856 | 47.6031 | |
Sirhwa-Tanty | Dargwa | sirh1234 | 42.1642 | 47.3167 | |
Megeb | Dargwa | mege1234 | 42.2528 | 47.0472 | |
Khinalug | Khinalug | khin1240 | 41.18014 | 48.05714 | |
Kumyk | Kipchak | kumy1244 | 42.83754 | 47.15412 | |
Lak | Lak | lakk1252 | 42.13275 | 47.0809 | |
Agul | Lezgic | aghu1253 | 41.92418 | 47.58429 | |
Archi | Lezgic | arch1244 | 42.0664 | 46.8678 | |
Budukh | Lezgic | budu1248 | 41.22722 | 48.33533 | |
Kryz | Lezgic | kryt1240 | 41.18107 | 48.18457 | |
Lezgian | Lezgic | lezg1247 | 41.51572 | 47.89507 | |
Rutul | Lezgic | rutu1240 | 41.61866 | 47.32436 | |
Tabasaran | Lezgic | taba1259 | 42.01976 | 47.83791 | |
Tsakhur | Lezgic | tsak1249 | 41.62466 | 47.17889 | |
Udi | Lezgic | udii1243 | 40.9 | 47.7236 | |
Bezhta | Tsezic | bezh1248 | 42.1206 | 46.03319 | |
Hinuq | Tsezic | hinu1240 | 42.45022 | 45.80638 | |
Hunzib | Tsezic | hunz1247 | 42.08076 | 46.13691 | |
Khwarshi-Inkhoqwari | Tsezic | khva1239 | 42.353471 | 46.107859 | |
Tsez | Tsezic | dido1241 | 42.26458 | 45.80959 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lang | value | |
---|---|---|
Dargwa | other | |
Lak | other | |
Agul | Azerbaijani | |
Budukh | Azerbaijani | |
Khinalug | Azerbaijani | |
Lezgian | Azerbaijani | |
Rutul | Azerbaijani | |
Tabasaran | Azerbaijani | |
Tsakhur | Azerbaijani | |
Udi | Azerbaijani | |
Akhvakh | Avar | |
Andi | Avar | |
Archi | Avar | |
Avar | Avar | |
Bagvalal | Avar | |
Bezhta | Avar | |
Botlikh | Avar | |
Chamalal | Avar | |
Godoberi | Avar | |
Hinuq | Avar | |
Hunzib | Avar | |
Karata | Avar | |
Khwarshi | Avar | |
Kryz | Azerbaijani | |
Tindi | Avar | |
Tsez | Avar | |
Kumyk | other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment