spatial-lab / assignr Goto Github PK
View Code? Open in Web Editor NEWR package for geographic assignment
R package for geographic assignment
use SpatialPoints for oddsratio input instead of data.frame. Update man examples (assignR, oddsRatio)
Multi-isotope run times for large grids are too long, even after optimization. Easiest parallelization would operate at level of samples.
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)
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:
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.
need to reduce run time to <5s, valiStations = 1 and valiTimes = 2 should do it.
Then unwrap examples from \dontrun{}
Combine knownOrig tables into single object?
"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."
On a related note, I was looking quickly through the assignR reference manual on CRAN and noticed that it cites Natureserve as the source for the Mountain Plover shapefile. If you click through the links, Natureserve no longer has maps, as it has merged with BirdLife International. https://www.natureserve.org/conservation-tools/digital-distribution-maps-birds-western-hemisphere So I am not sure if we need to update that citation?
Replace 1:nrow, for example
Check this in calRaster.R
line 160 and plot.QA.R
line 19
Add support for known spdf without uncertainty for backwards compatibility.
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.
Only import specific functions needed.
rgdal appears in DESCRIPTION under 'Imports', but NAMESPACE does not import from rgdal. Remove from DESCRIPTION?
Hi,
In addition to the Global Network for Isotopes in Precipitation(GNIP) dataset,the package can add Global Network of Isotopes in Rivers (GNIR) dataset?
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.
Split out code for standard chain transformations as stand-alone function, allowing application to user data.
In v2.1.0:
Both bugs have been fixed in SHA f98c838 and will be pushed to CRAN in v2.1.1
Allow user to provide separate calibration and validation datasets for QA.
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?
Use of colSums to sum probabilities doesn't work when only a single numeric vector exists for each polygon.
argument to set.seed only allows for R>3.6
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)..."
Add function to calculate weighted distance and direction traveled metrics for unknown origin samples.
Per request from CRAN.
If length sites=1 recycle with a comment
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
?
Need option to provide and return names for different points/shapes, e.g., as argument
Users have flagged a number of errors and inconsistencies in the knownOrig database.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.