-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode_maps.R
56 lines (35 loc) · 1.35 KB
/
code_maps.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Preparation -------------------------------------------------------------
# load packages
library(tidyverse)
library(lingtypology)
# set working directory
setwd("~/2018_labseminar")
# load data
map <- read_tsv("allev.csv")
# Evidential perfects -----------------------------------------------------
# subset glottolog points
glot <- map[complete.cases(map$evidentiality),]
# re-order elements in legend
glot$evidentiality <- factor(glot$evidentiality, levels = c("+", "-", "~"))
# draw map
map.feature(glot$Language,
latitude = glot$Lat,
longitude = glot$Lon,
color = glot$group_color,
features = glot$Group,
tile = c("Esri.WorldGrayCanvas"),
stroke.features = glot$evidentiality,
stroke.title = "Evidential perfect",
stroke.color = c("black", "honeydew1", "gray"))
# Evidential perfects + all villages by affiliation -----------------------
map.feature(map$Language,
latitude = map$Lat,
longitude = map$Lon,
color = map$group_color,
opacity = 0.5,
features = map$Group,
legend = F,
tile = c("Esri.WorldGrayCanvas"),
stroke.features = map$evidentiality,
stroke.title = "Evidential perfect",
stroke.color = c("black", "honeydew1", "gray"))