Skip to content

qibinran/temperature-sonority

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temperature and Language Sonority

Results

Usage

The following 5 steps can be run separately as the output of each step is already provided in this repository. temperature_global.csv is provided in zip file because its size is too large. Steps 1 and 2 require a local storage of the ASJP dataset and the FLDAS dataset, but you can skip these two steps so you do not need to download full datasets.

1. Extract geometry and sonority data from ASJP

Run py get_sonority.py [raw_path], where [raw_path] is the path to raw folder in the local ASJP dataset (e.g. C:\ASJP\raw\). Result will be saved as sonorities.csv and phones.csv.

2. Extract temperature data from FLDAS

Run py get_temperature.py [FLDAS_path] to extract monthy temperature data of all doculects in sonorities.csv, where [FLDAS_path] is the path to FLDAS_NOAH01_C_GL_M.001 folder of the local FLDAS dataset (e.g. C:\FLDAS\FLDAS_NOAH01_C_GL_M.001\). Result will be saved as temperatures.csv.

Run py get_temperature_global.py [FLDAS_path] to extract global monthy mean temperature data. Result will be saved as temperature_global.csv.

3. Plot global distribution of temperature and sonority

(Unzip temperature_global.zip.) Run py plot_global.py. Plot will be saved as global.png.

4. Combine and process temperature and sonority data

Run py process.py. Results will be saved as data.csv, data_family.csv, and data_macroarea.csv.

5. Generate distribution and correlation plot

Run corresponding code blocks in process.r in R to:

  • Read 3 csv files above and analysis the correlation
  • Plot distribution of temperature and sonority
  • Plot correlation of temperature and sonority

Plots were saved as distribution.pdf and correlation.pdf in this repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.6%
  • R 12.4%