Giter Site home page Giter Site logo

assignr's People

Contributors

bumbanian avatar demerara avatar meganreich avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

assignr's Issues

oddsRatio input

use SpatialPoints for oddsratio input instead of data.frame. Update man examples (assignR, oddsRatio)

pdRaster parallel option

Multi-isotope run times for large grids are too long, even after optimization. Easiest parallelization would operate at level of samples.

sub data output

Update subOrigData so output can be read directly into calRaster w/o additional modification (i.e. have it return a spatial points dataframe w correct format and same projection info as the world d2H isoscape)

Suggestions for assiginR packages

Dear SPATIAL-Lab,

Congratulations on your team's assiginR package being published in the Methods in Ecology and Evolution. The assiginR is very very nice R package, stable isotopes of O and H in water are meaningful indicators of aquatic food webs and fish migrations.

Suggestions:

  1. Can you add the Global Network of Isotopes in Rivers (GNIR) dataset to this package? Or other public isotopic datasets (e.g., C, Sr isotopes)
  2. For the convenience of users, can users add isotope values for tissues of known origin according to research requirements? How can a user create a dataset similar to knownOrig?

References
https://www.iaea.org/services/networks/gnir
Nan, Y., Tian, F., Hu, H., Wang, L., & Zhao, S. (2019). Stable Isotope Composition of River Waters across the World. Water, 11(9),1760.

toy QA examples

need to reduce run time to <5s, valiStations = 1 and valiTimes = 2 should do it.
Then unwrap examples from \dontrun{}

Add tests

"The Github repository at the moment does not include any tests. If you are unfamiliar with tests, you can read more about them here: http://r-pkgs.had.co.nz/tests.html. In general, they help ensure your code does what you want it to do. The testthat packages has made great steps to make this easier. I would also encourage you to consider evaluating the code coverage of your tests using something like codecov (https://docs.codecov.io/docs/quick-start), which can also be publicised on your Github repo. This helps you and others see how much of your code is covered by the tests you have written and is becoming standard in best practice software development."

Use seq_along()

Replace 1:nrow, for example
Check this in calRaster.R line 160 and plot.QA.R line 19

single column known

Add support for known spdf without uncertainty for backwards compatibility.

Update funcs to use new subOrigData return object

Now returns list w/ multi-column SPDF, sources dataframe, and "marker". Subsequent functions need to identify appropriate isotope data columns using marker.

Returned data object now includes standard deviations for sample values, incorporate these in the regression modeling.

namespace - rgdal

rgdal appears in DESCRIPTION under 'Imports', but NAMESPACE does not import from rgdal. Remove from DESCRIPTION?

Option to resample at site level in QA

Current QA tool generates random samples of the known-origin samples at the sample level, meaning if multiple samples exist at a site it's rare that entire sites are dropped. Add option to conduct resampling at the site level - generate random sample of the known origin sites.

getIsoscapes bugs

In v2.1.0:

  1. incorrect url prohibits US Surface Water download
  2. in some cases, output may not be updated if multiple downloads are requested during the same R session

Both bugs have been fixed in SHA f98c838 and will be pushed to CRAN in v2.1.1

Split data QA

Allow user to provide separate calibration and validation datasets for QA.

refTrans

If exchangeable hydrogen was corrected by 3-point linear calibration using three different standard materials,
Which Calibration of hstds should I use?

For example, my samples were corrected by USGS43, USGS CBS, and USGS KHS. so I can use US_H_6 and also EC_H_9.
Is there any method that can add both or another alternative resolution?

oddsRatio returns NaN

oddsRatio function returns:
"$P1/P2 odds ratio
a b c d e
NaN NaN NaN NaN NaN

$Ratio of numbers of cells in two polygons
[1] 1.862384"

Original function:
"...if (nlayers(pdR) > 1) {
extrVals.p1 = colSums(extrVals[[1]])
extrVals.p2 = colSums(extrVals[[2]])
}
else {
extrVals.p1 = sum(extrVals[[1]])
extrVals.p2 = sum(extrVals[[2]])..."

Edit function to remove missing values:

"...if (nlayers(pdR) > 1) {
extrVals.p1 = colSums(extrVals[[1]],na.rm=TRUE)
extrVals.p2 = colSums(extrVals[[2]],na.rm=TRUE)
}
else {
extrVals.p1 = sum(extrVals[[1]],na.rm=TRUE)
extrVals.p2 = sum(extrVals[[2]],na.rm=TRUE)..."

Distance metrics

Add function to calculate weighted distance and direction traveled metrics for unknown origin samples.

default value for the valiStation in QA function

@bumbanian

QA(isoscape, known, valiStation = floor(length(known)*0.1), valiTime = 50, 
  mask = NULL, setSeed = TRUE, name = NULL)

If the length of known is less than 10, then the default value of valiStation would be floor(length(known)*0.1 = 0, which will cause an error. How about replacing valiStation = floor(length(known)*0.1) with just valiStation = 1?

Add names to oddsRatio

Need option to provide and return names for different points/shapes, e.g., as argument

dependency on retiring spatial infrastructure packages

Email of April 1:

assignR has strong dependence on at least one of rgdal, rgeos or
maptools, but does not seem to use any functionality in code. The usage
may have been in raster, which now uses terra instead, or may be in
examples or vignettes. Please move all use of rgdal, rgeos or maptools
to Suggests: and protect any use against these packages not being present.
The packages will be archived in October 2023. See
https://r-spatial.org/r/2022/04/12/evolution.html,
https://r-spatial.org/r/2022/12/14/evolution2.html and
https://rsbivand.github.io/csds_jan23/bivand_csds_ssg_230117.pdf and perhaps
view
https://www.youtube.com/watch?v=TlpjIqTPMCA&list=PLzREt6r1NenmWEidssmLm-VO_Y
mAh4pq9&index=1.

Best wishes,

On Wed, 14 Dec 2022, Roger Bivand wrote:

Dear Maintainer,

assignR depends on (depends, imports or suggests) raster and one or
more of the retiring packages rgdal, rgeos or maptools
(https://r-spatial.org/r/2022/04/12/evolution.html). Since raster
3.6.3, all use of external FOSS library functionality has been
transferred to terra, making the retiring packages very likely
redundant. It would help greatly if you could remove dependencies on the
retiring packages as soon as possible.

See also https://r-spatial.org/r/2023/04/10/evolution3.html. Dealine best June, latest October 2023.

Species names in knownOrig

One of my students discovered that "Turtle Dove" and "Serin serin" do not appear to align with the scientific name format of the "Taxon" field.

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.