Skip to content

Commit

Permalink
fix #62 (see also #61) put dwc terms inside of pkg to avoid breaking …
Browse files Browse the repository at this point in the history
…pkg when file moves on the web
  • Loading branch information
sckott committed Oct 10, 2017
1 parent e732bcc commit cc1a812
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Retrieve, map and summarize data from the 'VertNet.org' archives.
Functions allow searching by many parameters, including 'taxonomic' names,
places, and dates. In addition, there is an interface for conducting spatially
delimited searches, and another for requesting large 'datasets' via email.
Version: 0.6.0.9100
Version: 0.6.2
Author: Scott Chamberlain [aut, cre], Chris Ray [aut], Vijay Barve [aut]
Maintainer: Scott Chamberlain <myrmecocystus@gmail.com>
License: MIT + file LICENSE
Expand Down
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
rvertnet 0.6.2
===============

### BUG FIXES

* A small data source used in one function was on the web, and
was moved - that data source now within the pkg as quite small, and
now pkg won't break when the file is moved again (#61) (#62)


rvertnet 0.6.0
===============

Expand All @@ -24,7 +34,7 @@ allows to optionally only return Darwin Core fields

### BUG FIXES

* Small fix to `vertsummary()` (59)
* Small fix to `vertsummary()` (#59)


rvertnet 0.5.0
Expand Down
13 changes: 10 additions & 3 deletions R/vert_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
#' @return A list, with data frame of search results, and list of metadata
#' @references \url{http://bit.ly/vertnet-wiki}
#' @details VertNet IDs can be a variety of things, some URIs
#' (i.e., with http://...), while others start with \code{urn}.
#' (i.e., with http://...), while others start with \code{urn}.
#'
#' Internally in this function we filter data to darwin core terms only. To
#' see what terms we use, do
#' \code{readLines(
#' system.file("extdata", "simple_dwc_terms.txt", package = "rvertnet"))}.
#' Get in touch with us if these terms need correcting/are out of date. The
#' terms are from
#' https://github.com/tdwg/dwc/blob/master/dist/simple_dwc_horizontal.csv
#'
#' @examples \dontrun{
#' vert_id(ids = "urn:catalog:CM:Herps:116520")
Expand All @@ -21,8 +29,7 @@
#' res <- vert_id(ids)
#' res$data$occurrenceid
#'
#' # Lots
#' out <- vertsearch(taxon = "aves", state = "california", limit = 20)
#' out <- vertsearch(taxon = "aves", state = "california", limit = 5)
#' (ids <- out$data$occurrenceid)
#' res <- vert_id(ids)
#' identical(sort(res$data$occurrenceid), sort(ids))
Expand Down
8 changes: 4 additions & 4 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ vertwrapper <- function(fxn = "", args = NULL, lim = NULL, rfile = NULL,

mssg <- function(v, ...) if (v) message(...)

get_terms <- function(){
url <- "https://raw.githubusercontent.com/tdwg/dwc/master/dist/simple_dwc_horizontal.csv"
res <- crul::HttpClient$new(url)$get()$parse("UTF-8")
tolower(strsplit(res, split = ",")[[1]])
get_terms <- function() {
readLines(
system.file("extdata", "simple_dwc_terms.txt", package = "rvertnet")
)
}

vert_GET <- function(fxn="searchbyterm", args, limit = 1000, messages = TRUE,
Expand Down
7 changes: 3 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Test environments

* local OS X install, R 3.4.1 patched
* ubuntu 12.04 (on travis-ci), R 3.4.1
* local OS X install, R 3.4.2 patched
* ubuntu 12.04 (on travis-ci), R 3.4.2
* win-builder (devel and release)

## R CMD check results
Expand All @@ -22,8 +22,7 @@

--------

This release includes a new function, swaps a dependency, and some minor
changes and bug fixes.
This release includes a bug fix for a data source that moved on the web.

Sincerely,
Scott Chamberlain
169 changes: 169 additions & 0 deletions inst/extdata/simple_dwc_terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
type
modified
language
license
rightsholder
accessrights
bibliographiccitation
references
institutionid
collectionid
datasetid
institutioncode
collectioncode
datasetname
ownerinstitutioncode
basisofrecord
informationwithheld
datageneralizations
dynamicproperties
occurrenceid
catalognumber
recordnumber
recordedby
individualcount
organismquantity
organismquantitytype
sex
lifestage
reproductivecondition
behavior
establishmentmeans
occurrencestatus
preparations
disposition
associatedmedia
associatedreferences
associatedsequences
associatedtaxa
othercatalognumbers
occurrenceremarks
organismid
organismname
organismscope
associatedoccurrences
associatedorganisms
previousidentifications
organismremarks
materialsampleid
eventid
parenteventid
fieldnumber
eventdate
eventtime
startdayofyear
enddayofyear
year
month
day
verbatimeventdate
habitat
samplingprotocol
samplesizevalue
samplesizeunit
samplingeffort
fieldnotes
eventremarks
locationid
highergeographyid
highergeography
continent
waterbody
islandgroup
island
country
countrycode
stateprovince
county
municipality
locality
verbatimlocality
minimumelevationinmeters
maximumelevationinmeters
verbatimelevation
minimumdepthinmeters
maximumdepthinmeters
verbatimdepth
minimumdistanceabovesurfaceinmeters
maximumdistanceabovesurfaceinmeters
locationaccordingto
locationremarks
decimallatitude
decimallongitude
geodeticdatum
coordinateuncertaintyinmeters
coordinateprecision
pointradiusspatialfit
verbatimcoordinates
verbatimlatitude
verbatimlongitude
verbatimcoordinatesystem
verbatimsrs
footprintwkt
footprintsrs
footprintspatialfit
georeferencedby
georeferenceddate
georeferenceprotocol
georeferencesources
georeferenceverificationstatus
georeferenceremarks
geologicalcontextid
earliesteonorlowesteonothem
latesteonorhighesteonothem
earliesteraorlowesterathem
latesteraorhighesterathem
earliestperiodorlowestsystem
latestperiodorhighestsystem
earliestepochorlowestseries
latestepochorhighestseries
earliestageorloweststage
latestageorhigheststage
lowestbiostratigraphiczone
highestbiostratigraphiczone
lithostratigraphicterms
group
formation
member
bed
identificationid
identificationqualifier
typestatus
identifiedby
dateidentified
identificationreferences
identificationverificationstatus
identificationremarks
taxonid
scientificnameid
acceptednameusageid
parentnameusageid
originalnameusageid
nameaccordingtoid
namepublishedinid
taxonconceptid
scientificname
acceptednameusage
parentnameusage
originalnameusage
nameaccordingto
namepublishedin
namepublishedinyear
higherclassification
kingdom
phylum
class
order
family
genus
subgenus
specificepithet
infraspecificepithet
taxonrank
verbatimtaxonrank
scientificnameauthorship
vernacularname
nomenclaturalcode
taxonomicstatus
nomenclaturalstatus
taxonremarks
11 changes: 9 additions & 2 deletions man/vert_id.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc1a812

Please sign in to comment.