Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

How do you extract "eventDate" column from the database with bison()? #65

Closed
kpmainali opened this issue Jul 4, 2019 · 3 comments
Closed
Labels
Milestone

Comments

@kpmainali
Copy link

kpmainali commented Jul 4, 2019

Example code:

download <- bison(species = "Strix occidentalis caurina", type = "scientific_name",
   count = 10000000)
bison.pts <- download$points
head(bison.pts)
@sckott
Copy link
Contributor

sckott commented Jul 10, 2019

try bison_solr intead. bison doesn't return date data

z <- bison_solr(scientificName = "Strix occidentalis caurina", rows = 10)
#> z$points$eventDate
#>  [1] "2017-05-17" "2014-06-15" "2014-06-15" "1996-01-01" "1996-01-01" "1992-01-01" "2000-01-01" "1980-11-05"
#>  [9] "2003-01-01" "1991-07-16"

@kpmainali
Copy link
Author

bison_solr() does not allow me to download more than 10k points. Is there a way to not be limited by the number of points and be able to get the date of records?

@sckott
Copy link
Contributor

sckott commented Jul 18, 2019

try using the rows and start parameters. e.g,.

# records from 1 to 10
bison_solr(scientificName = "Strix occidentalis caurina", rows = 10)
# records from 10 to 20
bison_solr(scientificName = "Strix occidentalis caurina", rows = 10, start = 10)

important if you get to big numbers like 10000 to write them like 10000L to make sure they don't get turned into scientific notation which will not work when sent to USGS web service

@sckott sckott added this to the v1.0 milestone May 28, 2020
@sckott sckott closed this as completed May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants