Giter Site home page Giter Site logo

ropensci-archive / rbison Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 4.0 12.44 MB

:no_entry: ARCHIVED :no_entry: Interface to the 'USGS' 'BISON' API

License: Other

Makefile 1.64% R 98.36%
usgs data api biodiversity rstats occurrences biology r spocc r-package

rbison's Introduction

rbison

Project Status: Abandoned

This repository has been archived. The former README is now in README-NOT.md.

rbison's People

Contributors

adamdsmith avatar cboettig avatar chrisfan24 avatar esellers-usgs avatar karthik avatar maelle avatar sckott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rbison's Issues

data not being retrieved by bison_data?

out <- bison(species = "Phocoenoides dalli dalli", type = "scientific_name",
count = 10)

str(out)
List of 11
$ total : num 7
$ georeferenced: num 6
$ species : chr "Phocoenoides dalli dalli"
...
$ data :List of 7
..$ :List of 8
.. ..$ id : chr "735691889"
.. ..$ geo : chr "Yes"
.. ..$ basis : chr "Specimen"
.. ..$ name : chr "Phocoenoides dalli dalli"
.. ..$ common_name: chr "Dall\u0092s Porpoise, Dall's Porpoise"
...

geo <- bison_data(out, "data")
str(geo)
data.frame': 0 obs. of 5 variables:

BTW I am actually planning to use this package it's not just idle interest

gridExtra check

tell baptiste what fxns used, and see if pkg actually needed

Following a number of user requests for an update on CRAN, I would like to reassess the package with a quality check, clean up the core functions that are actually being used, and get rid off others to facilitate future maintenance (*).
Several functions were included as toy experiments, not always successful (patternGrob springs to mind), and should be removed. Most were poorly written/designed, and I would like to change the name of some parameters (e.g. 'main', 'sub', 'left', 'legend' in grid.arrange might become 'left/right/top/bottom for consistency). As far as I can tell the two functions that are most widely used are grid.table and grid.arrange, both of which I would like to base on the gtable package for greater flexibility and cleaner code [1].

Could you please take a quick look and tell me what gridExtra function(s) your package is using? I have set up a google form to avoid email overflow: http://goo.gl/forms/4YHzqxp31y and produce a nice pie chart as a bonus.

Plotting Individual Locations for all species data

Couple of points on the location map
The number of points appears to be the bison( ... count) value less 1
In your examples the count is 200 and points mapped 199
Why is that. Might be meaningful for small numbers

If I want to plot all the individual points for a species I tried
df.init <- bison(species = "Ursus americanus", type = "scientific_name", start = 0, count = 10)
bisonmap(df.init)

Rendering map...plotting 9 points

df <- bison(species = "Ursus americanus", type = "scientific_name", start = 0, count = df.init$total)
bison_data(df)
total observation fossil specimen literature unknown centroid
1 3792 59 125 3522 47 39 78

but then
bisonmap(df)
Error in data.frame(id = "699511081", name = "Ursus americanus", NA = NULL, :
arguments imply differing number of rows: 1, 0

I get the same error if I try to extract the data for further manipulation
geo <- bison_data(df, "data")

points map not working

<r> bisonmap(out, tomap = "points")
Error in grid.Call.graphics(L_upviewport, as.integer(n)) : 
  cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)

County centroids changes

Make changes if needed

It will also have county centroids generated for all records that come from GBIF with only a state and county.

fix readme images

It was recently pointed out to us that some README.html files (generated
from the corresponding README.md ones) on the CRAN package web pages are
incomplete, missing 'local' images not available from the web page and
in most cases actually not even shipped with the package. This clearly
should be changed, so we will move to using '--self-contained' for the
pandoc conversion to ensure that the README.html files are "complete".

Of course, this implies that all 'local' images used in README.md are
needed in the package sources.

If the images are also used for vignettes or Rd files, you can put them
in the 'vignettes' or 'man/figures' directories. Otherwise, please put
them in the top-level 'tools' directory, or a subdirectory of it.

The CRAN incoming checks in r-devel were changed to perform the pandoc
conversion checks with '--self-contained', and hence will warn about
missing images.

Pls ensure completeness in the next regular update of your package.


$`/data/rsync/PKGS/rbison/README.md`
[1] "inst/readmeimg/unnamed-chunk-7-1.png"
[2] "inst/readmeimg/unnamed-chunk-10-1.png"
[3] "inst/readmeimg/unnamed-chunk-13-1.png"
[4] "inst/readmeimg/unnamed-chunk-14-1.png"
[5] "inst/readmeimg/unnamed-chunk-15-1.png"
[6] "inst/readmeimg/unnamed-chunk-19-1.png"

rbison Timeout-URLs May have changed

Hi,

When I try to run rbison I receive the following error:

Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached

My proxy settings are in place and I am able to communicate with the gbif API through rgbif without issue.

donttest examples

This concerns packages using \donttest in their examples. Such code
will be run by example() and hence should be runnable ... yours is
not. One issue showing is that the examples use undeclared packages: this
is showing on the CRAN check pages for packages ... rbison

Please submit an update to CRAN (using the webform, and following the
CRAN policies at http://cran.r-project.org/web/packages/policies.html).
Do NOT reply to this email to submit an update! There may be other issues that need fixing shown on the package's results page.

Search by Common Name

Is it possible to do some sort of search by name e.g. bear - looks like they have something on USGS web site but does not work that well - that would link to common and scientific names that could then be used in the 'bison' function

For example
bison(species = "bear", type = "common_name", start = 0, count = 200) does return values but the total is only 31

"black bear" totals 3792 - the same as "Ursus americanus"
"american black bear" gives 4141 so presumably includes another species

Solr changes...

Updated their Solr version so....look out for breaking changes in results

The new version is also running Solr 4.4 so things like pivot facets, full wildcard "contains" and regular expression searches, and some more advanced geographic searches are possible from the direct Solr calls now.

ITIS integration

ITIS data will now be integrated in results, change accordingly

On Monday we'll be staging a final development version of BISON that has ITIS hierarchy, Accepted/Valid TSNs and synonomy integrated. We are targeting Jan. 13th for that to go to production. You will be able to return all of a single higher taxon at any level (e.g. Animalia) and if you search on any taxon, you can get records with that name, all synonyms, all children, and all synonyms of children (e.g. Rubus flagellaris now yields 3,096 matches instead of 1,649) - you can also search specific strings only as before. The common names will also now be coming from ITIS, not GBIF and the new disambiguation will actually match a common name directly with a scientific name so you won't get both Asclepias and Euphorbia in the results for "milkweed".

URL correct endpoint

http://bison.usgs.ornl.gov/api/search.json?species=poa%20cusickii&type=scientific_name

instead of http://bison.usgs.ornl.gov/api/scientificName/poa cusickii

R CMD check failure

checking tests ... ERROR
Running the tests in ‘tests/test-all.R’ failed.
Last 13 lines of output:
  bison_datause() for data use and bison_citation() for how to cite data from BISON
  Use suppressPackageStartupMessages() to suppress these startup messages in the future

  bison : .............
  bison_solr : ........
  bison_tax : ........
  bisonmap : 12..
  is.bison : ....
  Error in vapply(failures, "[[", "failure_msg", FUN.VALUE = character(1)) : 
    values must be length 1,
   but FUN(X[[2]]) result is length 2
  Calls: test_check ... <Anonymous> -> .oapply -> eval -> eval -> <Anonymous> -> vapply
  Execution halted

Loading required package: rjson

FYI - When I tried to use the bison function I received an error that it could not find the 'rjson' package (see below). I was able to install 'rjson' via install.packages without any problem, then reran the code below and it worked without a problem.

library(rbison)
PCIN <- bison(species = "Plethodon cinereus", type = "scientific_name")
Loading required package: rjson
Error in parser(content, ...) : could not find function "fromJSON"
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘rjson’

sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rjson_0.2.12 rbison_0.1 devtools_1.2

loaded via a namespace (and not attached):
[1] colorspace_1.2-2 dichromat_2.0-0 digest_0.6.3 evaluate_0.4.3 ggplot2_0.9.3.1
[6] grid_3.0.1 gtable_0.1.2 httr_0.2 labeling_0.1 mapproj_1.2-1
[11] maps_2.3-2 MASS_7.3-26 memoise_0.1 munsell_0.4 parallel_3.0.1
[16] plyr_1.8 proto_0.3-10 RColorBrewer_1.0-5 RCurl_1.95-4.1 reshape2_1.2.2
[21] scales_0.2.3 stringr_0.6.2 tools_3.0.1 whisker_0.3-2

URLs

apparnently httr follows redirects automatically, but i don't think this is true, or at least it doesn't work with the bison APIs. so right now changed url to the new staging one for SOLR - change back as needed, or just use Rcurl to follow redirects

readme xhtml

From kurt hornik

These have README.md files which when converted to (X)HTML using a
current version of pandoc show problems when validated using W3C Markup
Validator, see below.

Most of these problems are caused by using images without giving a name
(so the required alt attribute for <img> is not provided), or using <br>
instead of <br/>.

Pls fix these problems in your README.md files for your next release: in
all cases I inspected, the fixes were obvious and confirmation using
pandoc and W3C markup validator seemed unnecessary.

Please also visit your package check web page at http://cran.r-project.org/web/checks/check_results_PACKAGENAME.html to see if other problems need to be addressed as well.

Another bison_data issue

either that or it's a middle of night thing

df.init <- bison(species = "Canis latrans", type = "scientific_name", count = 20)
df <- bison(species = "Canis latrans", type = "scientific_name", count = df.init$georeferenced)
geo <- bison_data(df, "data")
Error in data.frame(id = "730578417", name = "Canis latrans", longitude = "0.0", :
arguments imply differing number of rows: 1, 0

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.