dpseidel / stmove Goto Github PK
View Code? Open in Web Editor NEWBuild reproducible reports for spatial-temporal animal movement analysis
Home Page: https://www.danaseidel.com/stmove/
License: GNU General Public License v3.0
Build reproducible reports for spatial-temporal animal movement analysis
Home Page: https://www.danaseidel.com/stmove/
License: GNU General Public License v3.0
cut
the internal elephants dataset is complete and should be replaced with miriams for consistency and size before going public
For privacy's sake I should also/first remove old versions of sysdata using:
https://help.github.com/en/articles/removing-sensitive-data-from-a-repository
Currently if the seas
argument is an unnamed vector the user get's this error:
Error in traj$seas[yday(traj$date) == seas[i]] <- names(seas)[i] :
replacement has length zero
which is pretty undecipherable. There should be improved handling such that if there are no names, the names default to seas1, seas2, etc..
I tried running the build_report function using the AG195_final test dataset. The report did not complete and gave me the following error message:
Quitting from lines 59-99 (report.Rmd)
Error in parse_factor(paste(lubridate::month(date, label = TRUE), lubridate::year(date)), :
could not find function "parse_factor"
(As well as some warning messages):
In addition: Warning messages:
1: Removed 1 rows containing non-finite values (stat_bin).
2: Removed 13 rows containing non-finite values (stat_bin).
as is, all relative paths are relative to the library inst
folder. There is likely a simple fix here but I haven't found it. Right now, absolute paths need to be specified.
added it to rolling_stats but didn't fix it for the report building functions
currently it returns unnecessary ltraj columns.
It should simply return the four original columns and possibly a flag column indicating interpolated or not.
Could be related to fixing #5.
from wayne:
"The diurnal options should be pre and post noon, as you have it, but also—and likely more usefully—daylight and night (which is best approximated as 6am-6pm cutoffs for the local solar time). Also it may be possible to add a user option of the periods: e.g. the user inputs 2 numbers such as 05:30 and 18:30 which gives two periods—an 11 hour night and 13 hour day. This may be better for someone who has summer data and so on."
As of right now, tlocoh package causes build failure on travis (and would on cran) because it is an r-forge package and requires special download specification.
Package like sf
or ggrepel
only used in one package could be moved to suggests.
My current version has the two plots placed horizontally in the report, resulting in the turning angle distribution plot being almost entirely off the page. Plotting them vertically would likely solve this.
Hi Dana- When I first tried installing stmove, I got an error message saying that the package couldn't be installed because the curl package was already installed and it couldn't uninstall it. (Sorry, I didn't save the exact error message). The fix was easy- I just went in the R win-library and manually deleted the curl folder and the install worked just fine. I wasn't able to reproduce the error message when running remotes::install_github("dpseidel/stmove",force=TRUE)
consider including type flexibility on build_report
?
it's documented as an argument but not fed to the adehabitat functions. Early tests indicate that passing it through as intended causes errors. Should be removed and/or fixed.
Nancy suggests that rather than an index of time, the labels might be instead the datetime stamp.
Consider making this the default or simply giving users access to the specification arguments of wavelet plot.
for consistency. We're importing the package anyhow.
Also check everyone's theme.
not sure exactly how to flexibly do this. Wayne suggests giving users the option to break their rolling statistics into x number of plots to allow for better visualization.
scrap smoothing splines.
rewrite this section of results.
add a series of checks to the build_report function in order to return useful error messages to users,
Suggestions from George Wittemyer:
Start a dev branch to test out these changes.
As per nancy, the klocoh construction throws an error without an id column. We either need to change our data requirements or write a quick patch to construct.
caused by breaks specification in cut()
function (line 81 of stats.R)
It seems that there is some issue with the Add-in's conditional UI on my Dell. The "seasonal start dates" field should only appear when the "seasonal" option is checked.
version R version 3.4.4 (2018-03-15)
os Windows >= 8 x64
system x86_64, mingw32
Rstudio Version 1.1.453
Works fine on my Mac , 3.5.1 x86_64-apple-darwain15.6.0, High Sierra 10.13.6. Rstudio 1.2.1114
Need to do some investigating to figure out if it's system or version specific.
either need to add a check and warning, or just add geom_point
to the reports so they display something -- even if it's not all that informative.
range(hy33780$date)
[1] "2013-11-11 06:00:00 SAST" "2014-03-23 02:00:00 SAST"
interval_stats(hy33780, type = c("seasonal"), seas = c("2013-09-01", "2013-11-01", "2014-04-01", "2014-10-15"))
# A tibble: 1 x 8
interval_start mean_dist sd_dist acf_dist mean_ang sd_ang acf_ang ccf
<fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 2013-11-01 1989. 2606. 0.352 0.132 1.75 0.00358 0.0151
Citation: Owen-Smith N, Martin J (2015) Identifying Space Use at Foraging Arena Scale within the Home Ranges of Large Herbivores. PLoS ONE 10(6): e0128821. doi:10.1371/journal.pone.0128821
stmove::interval_stats(AG195, type = c("diurnal", "lunar", "seasonal"), seas = c(40, 120, 210))
currently gives the results for diurnal and this warning:
Warning messages:
1: In if (type == "diurnal") { :
the condition has length > 1 and only the first element will be used
2: In if (type == "lunar") { :
the condition has length > 1 and only the first element will be used
3: In if (type == "seasonal") { :
the condition has length > 1 and only the first element will be used
should be fixed to return a list
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.