Perform Step 1 in this guide: https://kb.dynamicsoflanguage.edu.au/contribute/setup/
This file contains hidden or 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
| library(tidyverse) | |
| library(leaflet) | |
| lang_dialects <- read_csv( | |
| # CSV file of languages with region, latitude and longitude | |
| file = "https://git.io/vFeOj" | |
| ) | |
| abs_2016 <- read_csv( | |
| # CSBV file of ABS 2016 census data with language names and number of speakers |
This file contains hidden or 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
| library(shiny) | |
| library(dplyr) | |
| library(stringr) | |
| library(zoo) | |
| library(purrr) | |
| library(tidyr) | |
| options(shiny.maxRequestSize=30*1024^2) | |
| reversalize <- function(wrl_txt_path) { |
This file contains hidden or 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
| # You may need to run | |
| npm link moo | |
| npm link nearley | |
| # npm link [package-name-of-a-global-install] | |
| # for the first you run things to get the packages linked to | |
| # the directory in which you are running the scripts | |
| # Compile nearley grammar to javascript code | |
| nearleyc grammar.ne > grammar.js |
This file contains hidden or 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
| <% | |
| my_table = [ | |
| { "me" : "voiture", "eng": "car" }, | |
| { "me": "rouge", "eng": "red" } | |
| ] | |
| %> | |
| <table> | |
| <% my_table.map(row => {%> | |
| <tr> |
This file contains hidden or 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
| \me jakanypa (N): (H) | |
| \dm flora: watiya: \edm | |
| \lat Petalostylis cassioides \elat | |
| \me jakutakuta (N): (La,Y) | |
| \dm flora: miyi: \edm | |
| \lat Cassytha filiformis \elat | |
| \me janjinki (N): (Y) | |
| \dm flora: watiya: \edm | |
| \lat Acacia inaequilatera \elat | |
| \me janjinngi (N): (Y) |
This file contains hidden or 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
| # How to export TextGrid and Formant data from Praat: http://recordit.co/ybhGxsf99a | |
| # Make sure to setwd() to where annotations.csv and formants.csv are located | |
| library(dplyr) | |
| library(readr) | |
| left_join( | |
| read_csv("annotations.csv") %>% mutate(join_col = "temp"), | |
| read_csv("formants.csv") %>% mutate(join_col = "temp") | |
| ) %>% |
This file contains hidden or 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
| # Use install.packages() on dplyr and tidyr | |
| library(dplyr) | |
| library(tidyr) | |
| # mock up data frame (or use read_xlsx function from readxl package to read in an excel sheet) | |
| wrl_wide <- | |
| data.frame( | |
| Warlpiri = c("wumparlpa", "wartarurru"), | |
| `scientificName 1` = c("ecucalyptus leucophloia", "acacia validinervia"), | |
| `scientificName 2` = c("eucalyptus pruinosa", "acacia jennerae") |
This file contains hidden or 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
| library(base64enc) | |
| token2text <- function(token_obj, txt_file) { | |
| rds_path <- tempfile() | |
| saveRDS(object = token_obj, | |
| file = rds_path) | |
| # return base64 string | |
| writeLines(base64encode(rds_path), txt_file) | |
| } |
This file contains hidden or 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
| library(phonpack) | |
| library(base64enc) | |
| library(googlesheets) | |
| # Get from BitBucket pipeline environment | |
| BATCH_NO <- Sys.getenv("BITBUCKET_REPO_SLUG") | |
| AUTH_STR <- Sys.getenv("GOOGLE_AUTH") | |
| # Convert env variable to txt file, then to RDS file, then supply | |
| # to gs_auth() as RDS file |