Giter VIP home page Giter VIP logo

birdsize's Introduction

rOpenSci

Project Status: Abandoned

This repository has been archived. The former README is now in README-NOT.md.

birdsize's People

Contributors

diazrenata avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mstrimas

birdsize's Issues

pkgcheck results - main

Checks for birdsize (v0.0.0.9000)

git hash: cddbbff1

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✖️ does not have a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✖️ These functions do not have examples: [draw_population, lookup_species_pars, simulate_population].
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 81.4%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: MIT + file LICENSE

notes from today

  • downloaded retriever data; use this later to add in community_clean fxns and a vignette demoing use of data as it comes from the retriever
  • switched to s4 species class to coerce data types and clean up species_define/looking up stuff S4 is fun to play with but I don't think it adds a lot in this specific context.
  • renamed user facing fxns to object_verb

docs for this refactor are a little sketchy

Fxns to document better

  • community_generate
  • community_summarize
  • filter_bbs_survey
  • individual_metabolic_rate
  • pop_generate
  • pop_summarize
  • species_define
  • species_lookup

Add functionality to directly access BBS data?

I could add functionality to download and process BBS data through this package. So far I have not done this, in order to keep this package lightweight and focused on the key functionality of estimating size measurements for birds. Adding it might make it easier for users to extract size estimates for populations/communities on specific routes.

The rdataretriever package includes functionality (and a vignette) for loading BBS data; MATSS does as well (using the retriever under the hood). (In fact I have always worked with BBS data downloaded via MATSS.

My thinking is to avoid duplication of effort by reworking the problem of downloading BBS data; but to work through the exercise of downloading BBS using the general-user instructions for the retriever and using birdsize to work with those data; probably including instructions/a vignette for doing so.

pkgcheck failure notes

I'm getting a variety of interesting failures running pkgcheck either locally or via actions.

I've tried:

  • deleting all of pkgcheck's cache files
  • deleting and redownloading the whole repo
  • running the checks interactively; fails with the same error (can't subset column that doesn't exist).

This is new today.

error handling

Currently using verbose if() + stop() for informative error messages. May want to shift to something gentler.

pkgcheck results - community_data

Checks for birdsize (v0.0.0.9000)

git hash: 573807a7

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✖️ Package coverage is 58.9% (should be at least 75%).
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: MIT + file LICENSE

fxn naming to comply with ROpenSci norms

ROS uses object_verb; that may make more sense than my usual wordiness

This is probably most relevant for user-facing functions

This package doesn't have package-defined classes

So thinking through what things have what things done to them, that a user will see

prioritization of methods

If both species_mean and species_code are provided, which to use?

I wrote the function to default to using species_mean, but on reflection I feel like using species_code may be preferable.

accessing species table from bbs data releases

the table here: https://www.sciencebase.gov/catalog/file/get/5ea04e9a82cefae35a129d65?f=__disk__6f%2F16%2F1f%2F6f161fc7c7db1dcaf1259deb02d824700f280460&allowOpen=true

from the 2020 release

is really hard to parse in R using read.table or readLines because the separators are nonstandard and there are irregular line lengths.

Ideally I would prefer to pull in the species list from the URL and then parse it rather than have to include more of the BBS dataset in this package. But that's not seeming tractable at least from this data source.

Meta stuff

  • update badge
  • readme
  • prereview issue
  • template issue
  • edit DESCRIPTION file
  • vignettes, see #59

scoping

Overall the core intended functionality of this package is to simulate size measurements for birds based on either a species ID (following BBS AOU) or a mean body size (if you want to do simulations).

Body masses are simulated as draws from a normal distribution with mean and standard deviation.

If you supply a species code, look up these parameters from the lookup table (sd_table).

If you supply a species' mean, simulate the sd according to the scaling relationship (use estimate_sd).


Other wider and further afield questions include...

  • species name lookup fxn (make AOU table user-visible, possibly include string search fxns)
  • supplying a species x abundance table (apply core sim fxn over multiple species)
  • supply a bbs route and year(s) ---> x this would require including bbs data in the package which is a whole attributions and data management and data updating situation that I think actually hampers broader utility more than it necessarily helps
  • 0 standard deviation (use species' means only)
  • estimating individual level bmr
  • returning community-wide summary statistics (total biomass, total energy use, mean individual size, mean individual bmr)

Vignettes for different use cases

Vignettes or add-on fxns for plotting and analyzing ISDs? again may be drifting more specialized


am I then going to refactor bbs-size-shifts to use this package? yep, probably. should not be too hard


s e e d s. this is a rabbit hole but I'm unsure whether to muck about with seeds in this package at all, or if you can set.seed() and then call a function from this package (that runs rnorm()) and have the seed stay consistent. i.e. leave seed management up to the user. or if you have to set the seed within a function. on reflection it seems pretty sus to build an r package that messes around with your seeds, but scope. idk.

Next steps

The next milestone for this is going to be ROpenSci review.
For that:

  • Clean up function documentation
  • Make sure datasets and manuscripts are cited properly throughout
  • Rewrite vignettes (see ipad notes)
  • Remove hartland data

Current pkgstats loc is 384.

Could add fxns, have also wanted to add shiny app, but I think do the above and then return to adding additional pieces.

citations

Dunning 2008

Pardieck 2020 BBS data release

Fristoe et al 2015

Thibault et al 2011

Harris et al 2018

Update species tables

There are about 30 records for species in the most recent BBS data release (via retriever) that aren't in raw_masses. This appears to me to be a mixture of subspecies conflicts, name changes, and a random 🦜

It's bugging me so I'm thinking to update raw_masses with those records. There might be a pathway via matching, or simply appending those rows to raw_masses and revisiting in excel

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.