predictiveecology / biomass_speciesdata Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
per LandWebProprietaryData
, the "new" way is to use sim$rasterToMatch
as we need more than just a projection for the rasters
As pointed out in #32 , we should ideally be using Plots
to plot the final speciesLayers
. Switching to Plots
can be done at the module level or in LandR::plotVTM
input objects like e.g. studyArea
and studyAreaLarge
, which are shared across LandR modules need to always have the same defaults in .inputObjects
We need to change httr::config
throughout this and other modules to be able to download KNN layers.
Solution:
httr::config(ssl_verify)
and wrap problematic prepInputs calls into httr::with_config()
This module should be generic enough to be converted to an R package.
I really want to get the Initial Types plot produced as png, so improving the plotting in this module is needed.
transfer to eliotmcintire
(eventually, will be at PredictiveEcology
but we aren't ready for that to be public there yet)
the final [filebacked] raster stack that is output from this modules needs be stored in the user's directory rather than a temporary location. all these temp files are clogging up storage space, and may not persist between reboots.
this likely goes deeper than just this module (i.e., likely needs to be addressed in prepInputs
et al.)
please subscribe the slack channel to updates when the change is complete
SpaDES
packages other than SpaDES.addins
are being installed when install.packages("SpaDES", dependencies = TRUE)
is run in the GH workflow:
trying URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/SpaDES.core_1.1.0.tar.gz'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/SpaDES.core_1.1.0.tar.gz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
URL 'https://rspm-sync.rstudio.com/bin/4.2-focal/[428](https://github.com/PredictiveEcology/Biomass_speciesData/actions/runs/3252427112/jobs/5338629347#step:7:429)ad5ba346e0b5ca56fbf85c942d0492880c1306ef36070df1ce490b2b15293.tar.gz': status was 'SSL connect error'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘SpaDES.core’ failed
trying URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/SpaDES.tools_1.0.0.tar.gz'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/SpaDES.tools_1.0.0.tar.gz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
URL 'https://rspm-sync.rstudio.com/bin/4.2-focal/4a3ea2cd0123b232eca27250dd0bc622e898645bd67578ef535a7397aa39499f.tar.gz': status was 'SSL connect error'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘SpaDES.tools’ failed
trying URL 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest/src/contrib/covr_3.6.1.tar.gz'
Content type 'binary/octet-stream' length 322914 bytes (315 KB)
==================================================
similar to the AOU/ROF species hists produced by Benoit
LandR::speciesInStudyArea
must be able to deal with both kNN 2001 and 2011similar to PredictiveEcology/Biomass_borealDataPrep#22, does the rasterToMatch
really need an FRI, or is this a product of copy/pasting from LandWeb?
As per PredictiveEcology/actions#1
Using .plots = c("object", "png", "raw")
in headless session (w/o using xvfb
) fails with the following cairo graphics error:
Oct20 09:03:00 Biomass_speciesData total elpsd: 6.2 secs | 0 Biomass_speciesData ini
2022-10-20 09:03:00 WARNING::message call unable to open connection to X11 display '' x11()
2022-10-20 09:03:00 ERROR::e: unable to start device X11cairo
2022-10-20 09:03:00 ERROR::e: .External2(C_X11, d$display, d$width, d$height, d$pointsize, d$gamma, d$colortype, d$maxcubesize, d$bg, d$canvas, d$fonts, NA, d$xpos, d$ypos, d$title, type, antialias, d$family, optionSymbolFont(d$symbolfamily))
Error in .External2(C_X11, d$display, d$width, d$height, d$pointsize, :
unable to start device X11cairo
I can presumably get around this by starting my R session using xvfb-run -a R
or similar, but this imposes addional system dependencies (which user may not have ability to install) and adds an extra layer to the run requirements of this module, which impacts all LandR Biomass sims.
@CeresBarros I know I prefer cairo graphics in some cases, but are they essential here?
prepInputs()
call on Pickell dataset generates warnings:
Warning messages:
1: In projectInputs.Raster(x = new("RasterLayer", file = new(".RasterFile", :
This raster layer has integer values; it will be reprojected to float. Did you want to pass 'method = "ngb"'?
2: In .getFormat(filename) :
extension .dat is unknown. Using default format.
an on the CASFRI data generates:
Warning message: In projectInputs.Raster(x = new("RasterLayer", file = new(".RasterFile", : This raster layer has integer values; it will be reprojected to float. Did you want to pass 'method = "ngb"'?
The following objects are created in the init
event but are listed as inputs in metadata:
Pickell
CASFRIRas
They should either be moved to .inputObjects
, or should be removed from metadata entirely as they are transient objects used for the creation of sim$speciesLayers
.
Browse[1]> uniqueKeepSp
[1] "Abie_sp" "Pice_gla" "Pice_mar" "Pinu_sp" "Popu_tre"
Browse[1]> sim$speciesLayers
class : RasterBrick
dimensions : 727, 1070, 777890, 5 (nrow, ncol, ncell, nlayers)
resolution : 250, 250 (x, y)
extent : -1005571, -738070.6, 7159155, 7340905 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=lcc +lat_1=49 +lat_2=77 +lat_0=0 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
data source : in memory
names : Pine, Black.Spruce, Deciduous, Fir, White.Spruce
min values : 0, 0, 0, 0, 0
max values : 100, 100, 100, 100, 100
see loadCASFRI()
and TODO in biomassDataInit()
studyArea should be created first, then studyAreaLarge copied from studyArea if it is missing.
I noticed some TODOs re: which studyArea
to use in the prepInputs
calls. I am going to be reviewing this for borealDataPrep
, so I may as well do that here too.
At the moment I believe studyArea
is preferred for everything except stand age. However, some functions may require additional cropping/masking because of this (e.g., biomass may be needed at both the studyArea
and studyAreaLarge
extent)
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.