Skip to content

Commit cc1a812

Browse files
committed
fix #62 (see also #61) put dwc terms inside of pkg to avoid breaking pkg when file moves on the web
1 parent e732bcc commit cc1a812

File tree

7 files changed

+207
-15
lines changed

7 files changed

+207
-15
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Retrieve, map and summarize data from the 'VertNet.org' archives.
44
Functions allow searching by many parameters, including 'taxonomic' names,
55
places, and dates. In addition, there is an interface for conducting spatially
66
delimited searches, and another for requesting large 'datasets' via email.
7-
Version: 0.6.0.9100
7+
Version: 0.6.2
88
Author: Scott Chamberlain [aut, cre], Chris Ray [aut], Vijay Barve [aut]
99
Maintainer: Scott Chamberlain <myrmecocystus@gmail.com>
1010
License: MIT + file LICENSE

NEWS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
rvertnet 0.6.2
2+
===============
3+
4+
### BUG FIXES
5+
6+
* A small data source used in one function was on the web, and
7+
was moved - that data source now within the pkg as quite small, and
8+
now pkg won't break when the file is moved again (#61) (#62)
9+
10+
111
rvertnet 0.6.0
212
===============
313

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

2535
### BUG FIXES
2636

27-
* Small fix to `vertsummary()` (59)
37+
* Small fix to `vertsummary()` (#59)
2838

2939

3040
rvertnet 0.5.0

R/vert_id.R

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@
1111
#' @return A list, with data frame of search results, and list of metadata
1212
#' @references \url{http://bit.ly/vertnet-wiki}
1313
#' @details VertNet IDs can be a variety of things, some URIs
14-
#' (i.e., with http://...), while others start with \code{urn}.
14+
#' (i.e., with http://...), while others start with \code{urn}.
15+
#'
16+
#' Internally in this function we filter data to darwin core terms only. To
17+
#' see what terms we use, do
18+
#' \code{readLines(
19+
#' system.file("extdata", "simple_dwc_terms.txt", package = "rvertnet"))}.
20+
#' Get in touch with us if these terms need correcting/are out of date. The
21+
#' terms are from
22+
#' https://github.com/tdwg/dwc/blob/master/dist/simple_dwc_horizontal.csv
1523
#'
1624
#' @examples \dontrun{
1725
#' vert_id(ids = "urn:catalog:CM:Herps:116520")
@@ -21,8 +29,7 @@
2129
#' res <- vert_id(ids)
2230
#' res$data$occurrenceid
2331
#'
24-
#' # Lots
25-
#' out <- vertsearch(taxon = "aves", state = "california", limit = 20)
32+
#' out <- vertsearch(taxon = "aves", state = "california", limit = 5)
2633
#' (ids <- out$data$occurrenceid)
2734
#' res <- vert_id(ids)
2835
#' identical(sort(res$data$occurrenceid), sort(ids))

R/zzz.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ vertwrapper <- function(fxn = "", args = NULL, lim = NULL, rfile = NULL,
3434

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

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

4343
vert_GET <- function(fxn="searchbyterm", args, limit = 1000, messages = TRUE,

cran-comments.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Test environments
22

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

77
## R CMD check results
@@ -22,8 +22,7 @@
2222

2323
--------
2424

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

2827
Sincerely,
2928
Scott Chamberlain

inst/extdata/simple_dwc_terms.txt

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
type
2+
modified
3+
language
4+
license
5+
rightsholder
6+
accessrights
7+
bibliographiccitation
8+
references
9+
institutionid
10+
collectionid
11+
datasetid
12+
institutioncode
13+
collectioncode
14+
datasetname
15+
ownerinstitutioncode
16+
basisofrecord
17+
informationwithheld
18+
datageneralizations
19+
dynamicproperties
20+
occurrenceid
21+
catalognumber
22+
recordnumber
23+
recordedby
24+
individualcount
25+
organismquantity
26+
organismquantitytype
27+
sex
28+
lifestage
29+
reproductivecondition
30+
behavior
31+
establishmentmeans
32+
occurrencestatus
33+
preparations
34+
disposition
35+
associatedmedia
36+
associatedreferences
37+
associatedsequences
38+
associatedtaxa
39+
othercatalognumbers
40+
occurrenceremarks
41+
organismid
42+
organismname
43+
organismscope
44+
associatedoccurrences
45+
associatedorganisms
46+
previousidentifications
47+
organismremarks
48+
materialsampleid
49+
eventid
50+
parenteventid
51+
fieldnumber
52+
eventdate
53+
eventtime
54+
startdayofyear
55+
enddayofyear
56+
year
57+
month
58+
day
59+
verbatimeventdate
60+
habitat
61+
samplingprotocol
62+
samplesizevalue
63+
samplesizeunit
64+
samplingeffort
65+
fieldnotes
66+
eventremarks
67+
locationid
68+
highergeographyid
69+
highergeography
70+
continent
71+
waterbody
72+
islandgroup
73+
island
74+
country
75+
countrycode
76+
stateprovince
77+
county
78+
municipality
79+
locality
80+
verbatimlocality
81+
minimumelevationinmeters
82+
maximumelevationinmeters
83+
verbatimelevation
84+
minimumdepthinmeters
85+
maximumdepthinmeters
86+
verbatimdepth
87+
minimumdistanceabovesurfaceinmeters
88+
maximumdistanceabovesurfaceinmeters
89+
locationaccordingto
90+
locationremarks
91+
decimallatitude
92+
decimallongitude
93+
geodeticdatum
94+
coordinateuncertaintyinmeters
95+
coordinateprecision
96+
pointradiusspatialfit
97+
verbatimcoordinates
98+
verbatimlatitude
99+
verbatimlongitude
100+
verbatimcoordinatesystem
101+
verbatimsrs
102+
footprintwkt
103+
footprintsrs
104+
footprintspatialfit
105+
georeferencedby
106+
georeferenceddate
107+
georeferenceprotocol
108+
georeferencesources
109+
georeferenceverificationstatus
110+
georeferenceremarks
111+
geologicalcontextid
112+
earliesteonorlowesteonothem
113+
latesteonorhighesteonothem
114+
earliesteraorlowesterathem
115+
latesteraorhighesterathem
116+
earliestperiodorlowestsystem
117+
latestperiodorhighestsystem
118+
earliestepochorlowestseries
119+
latestepochorhighestseries
120+
earliestageorloweststage
121+
latestageorhigheststage
122+
lowestbiostratigraphiczone
123+
highestbiostratigraphiczone
124+
lithostratigraphicterms
125+
group
126+
formation
127+
member
128+
bed
129+
identificationid
130+
identificationqualifier
131+
typestatus
132+
identifiedby
133+
dateidentified
134+
identificationreferences
135+
identificationverificationstatus
136+
identificationremarks
137+
taxonid
138+
scientificnameid
139+
acceptednameusageid
140+
parentnameusageid
141+
originalnameusageid
142+
nameaccordingtoid
143+
namepublishedinid
144+
taxonconceptid
145+
scientificname
146+
acceptednameusage
147+
parentnameusage
148+
originalnameusage
149+
nameaccordingto
150+
namepublishedin
151+
namepublishedinyear
152+
higherclassification
153+
kingdom
154+
phylum
155+
class
156+
order
157+
family
158+
genus
159+
subgenus
160+
specificepithet
161+
infraspecificepithet
162+
taxonrank
163+
verbatimtaxonrank
164+
scientificnameauthorship
165+
vernacularname
166+
nomenclaturalcode
167+
taxonomicstatus
168+
nomenclaturalstatus
169+
taxonremarks

man/vert_id.Rd

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)