Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Working with CLDF data in R

These scripts illustrate how to use basic R (i.e. without any external dependencies, packages, etc.) to work with CLDF data sets. merge() and the df[filter$condition %in% filter2$condition,] construct are used to combine the different data sources and perform basic queries and filtering tasks.

Note: While accessing CLDF data using standard data analysis tools as shown here is easy, this approach should be combined with consultation of the JSON metadata supplied with a CLDF dataset, to verify assumptions regarding syntax (e.g. the CSV dialect) and semantics (e.g. the mapping of column names to CLDF properties) of the data files.

  • simple_access_to_values.R (or its notebook version) illustrates a very basic analysis on the basis of the WALS CLDF dump.

  • wals_ids_comparison.R (or its notebook version) illustrates, in a more involved fashion, how to filter and analyse different CLDF dumps together (WALS and IDS, in this case).

  • typology_visualisation.R, a more involved example, outlining how to access, merge, filter, and post-process data for visualisation purposes. See also the associated helper file with all the functions that are being used in the example. This is based on coded provided by @bambooforest, here.

You can’t perform that action at this time.