-
Notifications
You must be signed in to change notification settings - Fork 2
/
wcad.Rmd
executable file
·57 lines (49 loc) · 1.58 KB
/
wcad.Rmd
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
57
---
output:
html_document:
include:
after_body: footer.html
knit: (function(inputFile, encoding) {
out_dir <- 'docs';
rmarkdown::render(inputFile,
encoding=encoding,
output_file=file.path(dirname(inputFile), out_dir, 'index.html')) })
---
```{r setup, include=FALSE, warning=F}
knitr::opts_chunk$set(echo=FALSE, message=FALSE, warning = FALSE)
library(lingtypology)
library(tidyverse)
```
### The World Consonant Alternation Database {.tabset .tabset-fade .tabset-pills}
Some characters may be displayed incorrectly.
Download database: [.tsv](https://raw.githubusercontent.com/agricolamz/wcad/master/database.csv)
#### about database
Here is a map of the languages from WCAD:
```{r}
bibliography <- read_tsv("bibliography.csv")
wwsb <- read_tsv("database.csv")
library(lingtypology)
wwsb %>%
distinct(glottocode, language) %>%
left_join(bibliography) %>%
mutate(language = lang.gltc(glottocode)) %>%
select(-glottocode) ->
bibliography
map.feature(unique(bibliography$language),
color = "blue")
```
#### search
```{r}
library(DT)
wwsb %>%
distinct(glottocode, language) %>%
left_join(bibliography) %>%
mutate(language = url.lang(language)) %>%
select(-glottocode) %>%
datatable(filter = 'top', rownames = FALSE, options = list(pageLength = 20, dom = 'tip'), escape = FALSE)
```
#### bibliography
```{r}
bibliography$language <- url.lang(bibliography$language)
datatable(bibliography, filter = 'top', rownames = FALSE, options = list(pageLength = 20, autoWidth = FALSE), escape = FALSE)
```