GithubHelp home page GithubHelp logo

obistools's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obistools's Issues

Error in completing the function in R Studio

Just writing the function in the RStudio console and after the underscore (autocompletion is trying to guess the command) a small window appears with the message "R code Execution Error". None of the functions of the obistools are working after a fresh install

tree structure issue

This dataset should have 18 occurrences and thousands of Location events.

require(finch)
require(obistools)

archive <- dwca_read("http://arobis.cenpat-conicet.gob.ar:8081/archive.do?r=mleonina_adufem&v=1.0", read = TRUE, na.strings = "")
event <- archive$data$event.txt
occurrence <- archive$data$occurrence.txt
emof <- archive$data$extendedmeasurementorfact.txt
emof$eventID <- emof$id

flat <- flatten_occurrence(event, occurrence)
plot_map_leaflet(flat)

tree <- treeStructure(event, occurrence, emof)
exportTree(tree, "tree.html")

screen shot 2017-10-03 at 12 37 26

check_depth() problem

aa <- robis::occurrence("Abra alba")
check_depth(aa)
Retrieved 39657 records of 39657 (100%)
 Error in lookup_xy(data, shoredistance = TRUE, areas = FALSE) : 
  7b227469746c65223a20224572726f72206c6f6f6b696e67207570206461746120666f722070726f766964656420706f696e7473222c20226465736372697074696f6e223a2022696e6465782039343830206973206f7574206f6620626f756e647320666f722061786973203120776974682073697a652039343830227d 

incorrect hyperbenthos tree

See number of cruise records.

 ### Level 1 ###
     event type:  ###
     example: 
     measurement types: 
     records: 
   ### Level 2 ###
       event type:  ###
       example: Cruise68
       measurement types: Platform Name
       records: 1
     ### Level 3 ###
         event type:  ###
         example: Cruise6:Station19:EventSorbeSledge910:Subsample69
         measurement types:  
         records: 124
       ### Level 4 ###
           event type:  ###
           example: Cruise6:Station19:EventSorbeSledge910
           measurement types: Sampling device, Sieve mesh size
           records: 112
         ### Level 5 ###
             event type:  ###
             example: Cruise6:Station19:EventSorbeSledge910:Subsample69
             measurement types:  
             records: 242
       ### Level 4 ###
           event type:  ###
           example: Cruise68:Station622:EventBowers-Connell10020
           measurement types: Grain-size mean in sediment by particle sizer, Grain-size median in sediment by particle sizer, Percentage of the volume of the sediment with a grainsize between 0 µm and 63 µm, Percentage of the volume of the sediment with a grainsize between 125 µm and 250 µm, Percentage of the volume of the sediment with a grainsize between 250 µm and 500 µm, Percentage of the volume of the sediment with a grainsize between 500 µm and 900 µm, Percentage of the volume of the sediment with a grainsize between 63 µm and 125 µm, Sampling device
           records: 86
       ### Level 4 ###
           event type:  ###
           example: Cruise68:Station622:EventSea-Bird SBE21_10019
           measurement types: Salinity, Sampling device, water temperature
           records: 93
       ### Level 4 ###
           event type:  ###
           example: Cruise65:Station560:EventSea-Bird SBE09_9767
           measurement types: Dissolved oxygen, Salinity, Sampling device, water temperature
           records: 5
       ### Level 4 ###
           event type:  ###
           example: Cruise68:Station622:EventSecchi disc_10021
           measurement types: Sampling device, Secchi depth
           records: 62

depth check issue

What's up with point 5? Should be ok?

library(obistools)
library(robis)

pol <- occurrence("Polychaeta", geometry = "POLYGON ((6.50391 54.59753, 6.45996 53.14677, 8.26172 53.17312, 8.08594 54.54658, 6.50391 54.59753))")
problems <- check_depth(pol[1:1500,], depthmargin = 10)
bathymetry <- lookup_xy(problems, shoredistance = FALSE, grids = TRUE, areas = FALSE)$bathymetry

rbind(
  problems$minimumDepthInMeters,
  problems$maximumDepthInMeters,
  problems$depth,
  bathymetry
)
            [,1] [,2] [,3] [,4] [,5] [,6]
           448.0   51   73  159 18.1 19.0
           448.0   51   73  159 15.1 19.0
           448.0   51   73  159 16.6 19.0
bathymetry  12.2    5   11   17 18.4  1.4

Better check_depth/check_onland output

Related to the output from check_depth/check_onland I would propose two changes:

  1. remove the report=true parameter and always return both the dataframe and the report in a list with two elements: "problems" and "report"
  2. in the report add 4 additional columns: lon, lat, value, comparison_value (= name to be discussed)

These changes would allow two things:

  1. prevent running the xylookup twice with the same data
  2. new inspection functions and plotting functions e.g. plot the difference between bathymetry and the depth values on a map

typo in check_depth documentation

Hey,

When I ?check_depth (obistools v 0.0.4), the documentation says


Check which points are located on land.

Description

Check which points are located on land.

Usage

check_depth(data, depthmargin = 0, shoremargin = NA, report = FALSE)


flatten out measurements or facts

Add an function to create a single flat table with measurementsorfacts present as columns pasted to the event/occurrence.
Column header should be measurementtype or preferable concatenation of measurementtype and measurementunit.

Reason: scientist are likely to need data in a single matrix form for their analyses.

depth check issue

library(robis)
library(obistools)

pol <- occurrence("Polychaeta", geometry = "POLYGON ((6.50391 54.59753, 6.45996 53.14677, 8.26172 53.17312, 8.08594 54.54658, 6.50391 54.59753))")
problems <- check_depth(pol)
Error in data.frame(field = column, level = "error", row = i, message = message,  : 
  arguments imply differing number of rows: 2, 1, 3

xylookup fails

library(robis)
library(obistools)

calfin <- occurrence("Calanus finmarchicus", fields = c("decimalLongitude", "decimalLatitude"))
lookup_xy(calfin, shoredistance = FALSE, grids = TRUE, areas = FALSE)
Error in lookup_xy(calfin[1:2e+05, ], shoredistance = FALSE, grids = TRUE,  : 
  3c68746d6c3e0d0a3c686561643e3c7469746c653e343133205265717565737420456e7469747920546f6f204c617267653c2f7469746c653e3c2f686561643e0d0a3c626f6479206267636f6c6f723d227768697465223e0d0a3c63656e7465723e3c68313e343133205265717565737420456e7469747920546f6f204c617267653c2f68313e3c2f63656e7465723e0d0a3c68723e3c63656e7465723e6e67696e782f312e31302e3320285562756e7475293c2f63656e7465723e0d0a3c2f626f64793e0d0a3c2f68746d6c3e0d0a

fix crosstalk warnings

Warning: replacing previous import by ‘stringr::%>%’ when loading ‘data.tree’
Warning: replacing previous import by ‘tidyr::%>%’ when loading ‘obistools’
Warning: replacing previous import by ‘shiny::validateCssUnit’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::br’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tags’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::div’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h1’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h2’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h3’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h4’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h5’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::h6’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::knit_print.html’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tagSetChildren’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::includeScript’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::em’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tagAppendChild’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::is.singleton’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::includeHTML’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::includeMarkdown’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::code’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tagList’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::a’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tagAppendAttributes’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::singleton’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::hr’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::p’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::suppressDependencies’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tagAppendChildren’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::includeText’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::pre’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::span’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::withTags’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::htmlTemplate’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::img’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::tag’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::includeCSS’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::knit_print.shiny.tag’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::knit_print.shiny.tag.list’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::strong’ when loading ‘crosstalk’
Warning: replacing previous import by ‘shiny::HTML’ when loading ‘crosstalk’

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.