Giter Club home page Giter Club logo

Comments (15)

sckott avatar sckott commented on September 3, 2024

i'm waiting on this until major changes are merged in in https://github.com/ropenscilabs/taxa/tree/issue-9

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Ok. The only thing that perhaps should get done is adding examples to the documentation for taxonomy, subtaxa, supertaxa, roots, and stems. Are you going to do that? I can also do it. Either way is fine with me. We can also merge now if you want; everything is working as far as I can tell.

from taxa.

sckott avatar sckott commented on September 3, 2024

Right on the examples, but most of your changes are not on master branch right? So I want to merge those in before merging together with binomen.

for examples happy to add some, but again, would be nice to merge in your changes first.

can you send PR soon?

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Oh yea, its ready to merge. I assumed you would make the changes on the issue-9 branch, but a PR makes more sense. I will send it now

from taxa.

sckott avatar sckott commented on September 3, 2024

thanks, i wasn't sure which branch was the most recent

from taxa.

sckott avatar sckott commented on September 3, 2024

i'm going to ask CRAN to archive binomen this week since we're rolling into this pkg, and it will fail on CRAN checks with a new dplyr coming out on 11 May

-- scratch that - forget that we were going to rename pkg to binomen - not sure if we'll have this pkg ready by 11 may, so i'll make a fix for new dplyr for binomen on cran

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Thanks for the update

from taxa.

sckott avatar sckott commented on September 3, 2024

working on branch include-binomen

from taxa.

sckott avatar sckott commented on September 3, 2024

@zachary-foster What do you think? See ?pop and ?hierarchy - thoughts on how that's implemented and how it behaves? good to decide on how we should structure these, then can roll out the rest of the functions following the same structure

from taxa.

sckott avatar sckott commented on September 3, 2024

oh, and install from include-binomen

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Cool, I will look at this later today

from taxa.

sckott avatar sckott commented on September 3, 2024

thx

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Looks good. Perhaps rename to something that mentioned rank? Like pop_rank? Or make usable with names and ids too?

It would be cool if we could do something like pop(data, species:family) too

When I was looking at this, I thought we might be able to add an abstracted version as well that can filter by taxon name and taxon ids or any other information we can derive from the class. We might be able to reuse a lot of code from taxmap to make an abstracted filtering function like filter_taxa for hierarchy. The basic idea would be:

  • A set of simple accessor functions for per-taxon attributes that each return a vector. e.g. names,ids, ranks, authorities`.
  • Equivalent to the taxmap functions get_data and get_names that together can find variable names from expressions and return the relevant data from the accessor functions.
  • A function like filter_taxa that can take any number of expressions that resolve to TRUE/FALSE or index vectors and subset the taxa accordingly.

For example:

filter_taxa(hier_obj, ranks == "species", ids %in% c(123, 456))

We could also add subtaxa and supertaxa options.

from taxa.

zachary-foster avatar zachary-foster commented on September 3, 2024

Thinking about this more, the filter_taxa syntax could be apllied to all of the classes with multiple taxa like 'taxa' 'hierarchy' 'hierarchies' and 'taxonomy'. All of the NSE code can be reused and having a 'get_data' method for each class would make converting class info to tables a simple wrapper over get_data

from taxa.

sckott avatar sckott commented on September 3, 2024

Or make usable with names and ids too?

that sounds good, though we'll probably only be able to do a subset of operations with names and ids since there's no ordering to them

It would be cool if we could do something like pop(data, species:family) too

this is the operation strain in binomen, haven't ported that over yet

Will have a look at filter_taxa

from taxa.

Related Issues (20)

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.