Coder Social home page Coder Social logo

logginglab's Issues

cleaninventory

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

loggingsummary

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

maintrailextract

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

Increase user-friendliness

To increase user-friendliness, I'm implementing new developments on personal branches of my fork (uf_basic, uf_intermediate, and uf-advance). The developments are:

Basic

  • Remove checks for unused columns PlotArea
  • Remove checks for unused columns VernName, Circ, Xfield, Yfield, Lat, Lon
  • Check Plot column only if present
  • Check CensusYear column only if present
  • Ease basic types inputs with autoconversion tests (with as.integer, as.logical and as.character)
  • Ease table types inputs with autoconversion (DT & tibble & data.frame)
  • Ease spatial types inputs with autoconversion (raster & terra, sp & sf)
  • Add a stop if check/prepare inputs remove all lines
  • Add a message if DBH or diameter column exists but not Circ
  • Check DBH interval (1cm to 10m)

Intermediate

  • Replace creekdistances argument for a named list with two arguments for two raster inputs
  • Add an helper function to creat the mask

Advance

  • Replace LoggingSimulationOutputs and LoggingSimulationOutputs_iter by new R objects with associated class to simplify and consolidate outputs and ease package use with commonly known methods (loggingsummary & loggingsummary1 to summary, show, print, autoplot)

preliminary functions

inventorycheckformat

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

addtreedim

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

How to stock data in a R package

Vincyane question

  • Testing data
  • Default data
    • Species criteria (minimum diameter, economic interest...)
    • Global parameters (track size ...)

How to implement logging pre-defined scenarii and manual parameters?

If I have scenarios to simulate, and the parameters of these scenarios are the arguments of my function,
ex : scenario 1 : A = 1, B = 4, C = 10
manual: we choose the values of A, B and C
fun(scenario, A, B, C)

what is the best strategy?

  • create a table from which the function will take the values of the arguments (overwriting those that the user could have put)

  • lines of code at the beginning of each function to assign values to the arguments according to the chosen scenario

  • put in the code the scenarios, and consider the arguments only in the "manual" mode
    @sylvainschmitt

futurereserve

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

plots

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

selected

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

treefelling

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

Genericity

I think we need to discuss the generecity of Maria if we want to publish it. I can't do it in code review because it is global to the package. So for the moment I'll stop making remarks about it. And I think it is not an issue for the version 1 that you are planning for the ONF / contract end. But we should discuss it with Geraldine when she come back from holidays.

Issue in `maintrailextract()`

@thomasgaquiere , what is the purpose off the following lines:

preMainTrails <- DTMExtended > -Inf
preMainTrails<- rasterToPolygons(preMainTrails, dissolve=T)

Using a dummy raster of 20m height, this provoke a bug in my last install because of multiple polygons:

dem <- raster::raster(mask, nrow = 200, ncol = 200)
values(dem) <- rep(20, length(values(dem)))
maintrailextract(dem)
# Erreur dans st_cast.sfc(st_geometry(x), to, group_or_split = do_split) : 
# use smaller steps for st_cast; first cast to MULTILINESTRING or POLYGON?

This is because the multiple polygons can't be casted into one linestring here:

MainTrails <- preMainTrails %>% st_as_sf() %>% st_cast(to = 'LINESTRING', warn= FALSE)

harvestablearea

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

loggingparameters

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

harvestable

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

treeselection

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

createcanopy

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

getgeometry

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

Private "broken dataset" location

I created a broken dataset to test my "datacheckformat" function (check & control my inventory dataset.
When I put my script creating this "broken dataset", in data-raw folder (with use_data_raw()),
usethis says me to add this data to the package with usethis::use_data().
For my part, I put this data in inst/extdata because I don't want to give acces to this data at users
What I had to do ? put this data in data folder or in inst/extdata? @sylvainschmitt

Lowlands definition

We need to define lowlands, to define the UPs.

Several possibilities :

  • altitude relative ร  la crique
  • TWI (TopoWetnessIndex)
    - Rsaga : Saga has to be downloaded (external dependence). We cannot force the user to download it, nor can we download it for him. Need to be optional. (possibly not all the TWI formulas)
    - reuse Saga's codes (all the formulas)
    - package "dynatopmodel" : only 1 TWI formule

Computation time (ONF, Guyafor) and necessary precision (SRTM/LIDAR) to be taken into account

secondarytrails

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

landings

ONF's version

  • code
  • test
  • document (V0)
  • Sylvain's check (code)
  • Geraldine check (doc)

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.