Giter VIP home page Giter VIP logo

lingtypology's Introduction

lingtypology

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R build status Coverage Status

CRAN version Research software impact DOI

lingtypology package connects R with the Glottolog database (v. 4.8) and provides additional functionality for linguistic mapping. The Glottolog database contains the catalogue of the world's languages. This package helps researchers to make linguistic maps, using philosophy of the Cross-Linguistic Linked Data project, which uniform access to the data across publications. This package is based on leaflet package, so lingtypology package is a package for linguistic interactive mapping. You also might be interested in looking into some alternatives to lingtypology:

  • lingtypology in Python by Michael Voronov;
  • glottospace -- R package for the geospatial analysis based on Glottolog by Sietze Norder et al;
  • lingtypr -- R package which partially intersects with lingtypology functionality by Laura Becker;
  • glottoTrees -- R package for visualising and modifing glottolog trees by Erich Round

Installation

Get the stable version from CRAN:

install.packages("lingtypology")

… or get the development version from GitHub:

install.packages("remotes")
remotes::install_github("ropensci/lingtypology")

Sometimes installation failed because of the absence of the package crosstalk. Just install it using command install.packages("crosstalk").

Load a library:

library(lingtypology)

For a detailed tutorial see GitHub pages.

You can contribute to lingtypology, but look through contribution info before.


lingtypology's People

Contributors

agricolamz avatar forlinguistics avatar jeroen avatar karthik avatar kirillkoncha avatar suppukerr avatar timelyportfolio avatar ustera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lingtypology's Issues

mistakes durng downloading only one feature from databases

x86_64-pc-linux-gnu
R version 3.4.2 (2017-09-28)
packageVersion("leaflet")
[1] ‘1.1.0’
packageVersion("lingtypology")
[1] ‘1.0.8’

There is a mistake downloading only one feature in wals.feature():

df <- wals.feature("1a")
Warning:
В merge.data.frame(final_df, lingtypology::wals, by = "wals.code") :
  column name ‘1a’ is duplicated in the result
df <- afbo.feature("adjectivizer")
colnames(df)
[1] "Recipient.name"                 "Recipient.glottocode"           "Recipient.iso639.3"            
 [4] "Recipient.genus"                "Donor.name"                     "Donor.glottocode"              
 [7] "Donor.iso639.3"                 "Donor.genus"                    "reliability"                   
[10] "number.of.interrelated.affixes" "number.of.borrowed.affixes"     "References"                    
[13] "df[, features]"  

Instead of df[, features] should be adjectivizer.

Warning message: There is no coordinates for languages Ben Tey Dogon

Apologies if this is not a LingTypology issue per se, but just noting that when I use Glottolog as the source for coordinates, sometimes I get the above warning message even though the coordinates for the language(s) in question are indeed to be found in Glottolog.

Advice is greatly appreciated :)

Affiliation (and other) data missing

I re-ran a script using lingtypology that worked about three months ago, but now it returned errors as some iso codes in my data no longer returned affiliation data (only "N/A"). The affiliation data are indeed missing from the R files glottolog.original and glottolog.modified, even though they are in the Glottolog database online.

The languages missing affiliation data in my set are (in iso codes):
heb, jup, eto, kal, sme, mrj, est, nbl

Any idea why these are missing?

Mapping of relative frequencies for feature variants

This is inspired by gabmap and probably useful mostly for dialectology.

Imagine dialect A has lexeme L_1 for the concept C, dialect B has lexeme L_2, and dialect C has a mixture of two in some proportion (also possible for phonetic realizations of a phoneme). It would be cool to be able to specify those variants in a cell like A/B/B, and then their relative frequency would be calculated and displayed by dots with varying gradients.

I can look into this and tell you if I can do it, if you are interested in adding it.

CLAHub Contributor License Agreement creation

Dear @sckott,

I'd like to create a contributor license agreement on the https://www.clahub.com/ with the following text:

Developer Certificate of Origin Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Developer’s Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

I can't do it since I'm not a package maintainer. Could you create it, or could you give me the maintainer role.

No code look up for family level Glottolog

Please, put the results of these functions below, if your issue is related to the technical bugs. Thank you!

info about OS and package versions ``` > sessionInfo()$R.version$platform [1] "x86_64-apple-darwin17.0" > sessionInfo()$R.version$version.string [1] "R version 4.0.5 (2021-03-31)" > packageVersion("leaflet") [1] ‘2.0.4.1’ > packageVersion("lingtypology") [1] ‘1.1.5’ ```
library(lingtypology)
> iso.gltc('zaza1246')
zaza1246 
      NA
> gltc.iso('zza')
zza 
 NA

The iso/gltc lookup (and vice versa) do not handle language family level mappings?

https://glottolog.org/resource/languoid/id/zaza1246

Not sure if this is a bug or a feature.

Reapiting colors make it wrong

sessionInfo()$R.version$platform
[1] "x86_64-pc-linux-gnu"
sessionInfo()$R.version$version.string
[1] "R version 3.4.1 (2017-06-30)"
packageVersion("leaflet")
[1] ‘1.1.0’
packageVersion("lingtypology")
[1] ‘1.0.6’

If you don't repeat colors, it works fine:

map.feature(languages = c("Adyghe", "Kabardian", "Russian", "Polish"),
            features = c("Adyghe", "Kabardian", "Russian", "Polish"),
            color = c("blue", "black", "red", "green"))

But if you repeat colors, it doesn't work. ):

map.feature(languages = c("Adyghe", "Kabardian", "Russian", "Polish"),
            features = c("Adyghe", "Kabardian", "Russian", "Polish"),
            color = c("blue", "black", "red", "red"))

discovered by @sverhees

Dialect names are inaccessible

Mech (mech1238) is a dialect of Bodo:

> lang.gltc('mech1238')
mech1238 
      NA 

No dialect name -> no affiliation, no coords, etc.
+ It would be advantageous to be able to access all data based on glottocodes.

labels freak out when stroke.feature argument has NA

sessionInfo()$R.version$platform
[1] "x86_64-pc-linux-gnu"
sessionInfo()$R.version$version.string
[1] "R version 3.4.1 (2017-06-30)"
packageVersion("leaflet")
[1] ‘1.1.0’
packageVersion("lingtypology")
[1] ‘1.0.7’

If i use NA value in stroke, labels freak out.

language <- c("Manx", "Trio", "Thai")
features <- c(28, 10, 21)
stroke_1  <-  c("stress", "stress", "tone")
stroke_2  <-  c(NA, "stress", "tone")
map.feature(language,
            label = features,
            label.hide = FALSE,
            stroke.features = stroke_1) # everything is ok!
map.feature(language,
            label = features,
            label.hide = FALSE,
            stroke.features = stroke_2) # labels freak out!

Unable to view a language on a map

Dear all,

I am Silué, a PhD student in linguistics in France. I have discovered lingtypology very recently and I am a very new user. I would like to ask for some help related to an issue I am facing with lingtypology. In fact, I am studying a language called Kafire. It is part of Senufo languages and I wanted to be able to view that language on a map. However, it does not appear while I know that it is on Glottolog with the code Kafire 1243. For instance, a colleague of mine wanted to create a map with the languages that have logophoricity in the project Reported Speech in African Storytelling, but it is only Cebaara Senufo that could appear in place and instead of Kafire. I do not know if this issue is related to the fact that Kafire does not have an ISO code. Moreover, I do not understand why it is, like other Senufo varieties (Kufuru, Tagara...) a child of Cebaara Senufo in Glottolog while we know that all of them are the varieties of Senanri (Central Senufo). So, they should be sisters. Could someone help me?

Please, put the results of these functions below, if your issue is related to the technical bugs. Thank you!

info about OS and package versions ``` sessionInfo()$R.version$platform sessionInfo()$R.version$version.string packageVersion("leaflet") packageVersion("lingtypology") ```

color by clade?

Not an issue per se, but was wondering if it is possible to color according to language family rather than default alphabetical order? Thank you!!!

Coordinates are not returned for Situ

Situ (situ1238) has coordinates in Glottolog, but:

> lang.gltc('situ1238')
situ1238 
  "Situ" 
> long.lang('Situ')
Situ 
  NA 
> lat.lang('Situ')
Situ 
  NA

Access glottolog data from github repository clone or fork

Hi there,
great work!
I've seen here that you changed some of the glottolog data before making it accessible via your package. I think the best approach to do this would be as follows:

Alternatively, your package could access the glottolog data locally - i.e. in a local copy of clld/glottolog on the users machine. I don't know how this would work in terms of performance. But it would give your users the maximum in terms of freedom, because they could use the functionality of your package on their own forks of glottolog.

fatal: Could not read from remote repository

Dear @sckott,

is it possible that somebody changed some access rights to this repository?

One hour before I've pushed here, but now I can't. And I can push to other repositories...

$ git remote -v
origin	[email protected]:ropensci/lingtypology.git (fetch)
origin	[email protected]:ropensci/lingtypology.git (push)

$ ssh -vT [email protected]
OpenSSH_7.9p1, OpenSSL 1.1.1  11 Sep 2018
...
Hi agricolamz! You've successfully authenticated, but GitHub does not provide shell access.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3444, received 2476 bytes, in 0.3 seconds
Bytes per second: sent 10733.0, received 7716.3
debug1: Exit status 1
debug1: compress outgoing: raw data 113, compressed 106, factor 0.94
debug1: compress incoming: raw data 162, compressed 146, factor 0.90

`soundcomparisons.feature()` failed to connect

@annedadaa, deal with this please. And may be think about more general approach to bad or absence of the internet connection.

...and btw, why there is no your name in ?lingtypology::soundcomparisons.feature()

Dear maintainer,

Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_lingtypology.html>.

Please correct before 2021-10-28 to safely retain your package on CRAN.

It seems we need to remind you of the CRAN policy:

'Packages which use Internet resources should fail gracefully with an informative message
if the resource is not available or has changed (and not give a check warning nor error).'

This needs correction whether or not the resource recovers.

The CRAN Team

ropensci review comments

linqtypology review

author: "Kenton Russell"
date: "March 8, 2017"

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

  • As the reviewer I confirm that there are no conflicts of interest for me to review this work (such as being a major contributor to the software).

Documentation

The package includes all the following forms of documentation:

  • A statement of need clearly stating problems the software is designed to solve and its target audience in README
  • Installation instructions: for the development version of package and any non-standard dependencies in README
  • Vignette(s) demonstrating major functionality that runs successfully locally
  • Function Documentation: for all exported functions in R help
  • Examples for all exported functions in R Help that run successfully locally
  • Community guidelines including contribution guidelines in the README or CONTRIBUTING, and URL, Maintainer and BugReports fields in DESCRIPTION

Functionality

  • Installation: Installation succeeds as documented.
  • Functionality: Any functional claims of the software been confirmed.
  • Performance: Any performance claims of the software been confirmed.
  • Automated tests: Unit tests cover essential functions of the package
    and a reasonable range of inputs and conditions. All tests pass on the local machine.
  • Packaging guidelines: The package conforms to the rOpenSci packaging guidelines

Final approval (post-review)

  • The author has responded to my review and made changes to my satisfaction. I recommend approving this package.

Estimated hours spent reviewing: 4


Review Comments

  1. Very thorough and well-written package with some quite nifty usage of leaflet.

  2. Add Date in DESCRIPTION as suggested in comment

  3. Add a quick example for makelink. Can be as simple as makelink("Adyghe"). Well done adding examples for all documented functions!

  4. Get 100% coverage :) So close, and to get there might be as simple as adding to test-lang-country.R. However, I could easily be mistaken.

expect_equal(lang.country(list("North Korea", "Lebanon")), c("Korean", "English", "French", "Assyrian Neo-Aramaic",
        "Northern Kurdish", "Armenian", "North Levantine Arabic", "Turoyo", "Chaldean Neo-Aramaic",
        "Standard Arabic", "Pidgin Madam"))
  1. Optional, but style code according to a styleguide (does ROpenSci have one?) to make more readable.

blank map

Does anyone else have trouble with the png() option or is it on my end? My maps are completely blank. Thanks in advance!

legend reordering

How to reorder levels in legend? When I reorder factor, the colors are desplayed wrong.

All the tones are 0 when using phoible.feature(source = "UPSID") to get data.

> sessionInfo()$R.version$platform
[1] "x86_64-w64-mingw32"
> sessionInfo()$R.version$version.string
[1] "R version 3.5.0 (2018-04-23)"
> packageVersion("leaflet")
[1] ‘2.0.0’
> packageVersion("lingtypology")
[1] ‘1.0.12’

All the tones are 0 when using phoible.feature(source = "UPSID") to get data.

df_phoible <- phoible.feature(source = "UPSID")

update README

The README still mentions Glottolog 2.7, while the package is already at 4.4 - as far as I can tell.

some more databases

CRAN package rowr and its reverse dependencies

Dear maintainers,

This concerns the CRAN packages

  AutoModel TPMplt TestDimorph lingtypology rowr

maintained by one of you:

  Alex Lishinski <[email protected]>: AutoModel
  Bassam A. Abulnoor <[email protected]>: TestDimorph
  Chen ZHANG <[email protected]>: TPMplt
  Craig Varrichio <[email protected]>: rowr
  George Moroz <[email protected]>: lingtypology

We have repeatedly asked for an update fixing the check problems
shown on
  <https://cran.r-project.org/web/checks/check_results_rowr.html>
with no reply from the maintainer thus far.

Thus, package rowr is now scheduled for archival on 2020-01-25, and
archiving this will necessitate also archiving its strong reverse
dependencies.

Please negotiate the necessary actions.

Best
Kurt Hornik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.