Comments (21)
Not sure what's going on with your call but here's what I get.
ecoengine_data <- occ(query = "Lynx rufus californicus", from = "ecoengine")
> ecoengine_data$ecoengine
$meta
$meta$source
[1] "ecoengine"
$meta$time
[1] "2014-01-28 23:35:51.092 PST"
$meta$query
[1] "Lynx rufus californicus"
$meta$type
[1] "sci"
$meta$opts
list()
$data
$data$Lynx_rufus_californicus
url
1 http://ecoengine.berkeley.edu/api/observations/LACM%3AMammals
...
Now when I plot it:
> mapggplot(ecoengine_data)
Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=36.962747,-118.986366&zoom=5&size=%20640x640&scale=%202&maptype=terrain&sensor=false
Google Maps API Terms of Service : http://developers.google.com/maps/terms
Can you post a screenshot of the map?
from spocc.
Maybe @sckott can verify so it's not something that just works for me.
from spocc.
Hmm, I get
from spocc.
That's what I was getting last night @sckott
from spocc.
Really bizarre. The call that goes to ecoengine is this:
x <- ee_observations(scientific_name = "Lynx rufus californicus", georeferenced= TRUE)
# The data are in x$data
and when I drag that csv onto MapBox returns the same thing (in case something is off in this package).
So I'm confused. When you look at ecoengine_data$ecoengine
, what does it look like?
from spocc.
PS: You might want to update ecoengine.
install_github("ropensci/ecoengine")
from spocc.
Yep, I did update before trying. I'm getting 1-n integers for each record:
<r> ecoengine_data$ecoengine$data[[1]][,c('longitude','latitude')]
longitude latitude
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
10 10 10
11 11 11
12 12 12
13 13 13
14 10 10
15 14 14
16 15 15
17 16 16
18 17 17
19 18 18
20 19 19
21 20 20
22 21 21
23 22 22
24 23 23
25 24 24
from spocc.
and mine just returned:
> ecoengine_data$ecoengine$data[[1]][,c('longitude','latitude')]
longitude latitude
1 -120.4864 35.90087
2 -120.8068 38.72881
3 -122.5522 37.84149
4 -122.8971 38.79410
5 -121.9210 37.59783
6 -120.3390 34.47304
7 -121.8948 37.63383
8 -123.1208 40.75250
9 -122.1949 41.40901
10 -123.2625 38.79764
11 -122.1845 37.90764
12 -123.1780 38.52665
13 -122.2845 38.63194
14 -123.2625 38.79764
15 -122.9462 38.92621
16 -119.5992 37.73661
17 -121.6211 36.80715
18 -121.6428 37.34154
19 -121.7413 36.48891
20 -121.9619 40.31870
21 -123.1181 39.22075
22 -121.1248 35.92967
23 -122.7584 37.94777
24 -116.4701 32.60522
25 -122.4222 37.55764
from spocc.
for the record I reinstalled both packages from GitHub.
from spocc.
I can confirm the same behavior as @sckott on our rstudio.ropensci.org. Totally confused.
from spocc.
I think this is the offending code
suppressWarnings(as.numeric(obs_data_all$latitude))
In that obs_data_all$latitude
is a factor, so then when you do as.numeric
it doesn't do the right thing, so doing
suppressWarnings(as.numeric(as.character(obs_data_all$latitude)))
should work
from spocc.
Maybe you have an options setting that does factor to numeric correctly for you?
from spocc.
Right, I'm checking the same bits. I wonder if my .rprofile
options strings as factors set to FALSE
is causing the issue.
from spocc.
It works fine for me though.
from spocc.
Yup, that was it! I can replicate the bug in R --vanilla
from spocc.
Wondering if CRAN will hate me for pushing an emergency bug fix.
from spocc.
Give it a try now, should work.
from spocc.
Can you guys do a quick check before I release to CRAN? TIA
from spocc.
Works for me with the new version of ecoengine that I installed off github.
from spocc.
Works now, cool cool
from spocc.
Sweet! Thanks for the bug report, @emhart.
This is why we need code review.
from spocc.
Related Issues (20)
- occ "gbif" search is not working HOT 2
- Add option to use GBIF downloads in addition to search HOT 2
- Add option to use auk for bulk ebird data
- drop ecoengine as an option: pkg archived on cran
- failing cran checks - due to vcr change most likely
- has_coords not functioning as expected HOT 1
- error with occ2df HOT 2
- occ2df with coordinate uncertainty and occurrence status HOT 4
- error with the limitation extractign data from OBIS HOT 4
- Add Cogent Server Status Messages
- always return latitude and longitude as numeric values HOT 1
- Resolving "non-zero exit status" HOT 1
- Citing GBIF data properly
- Search with occ does not match the inatopts HOT 2
- Remove rbison
- Change to new cran checks badge URL HOT 1
- submit new version to CRAN? HOT 8
- occ() reports more records returned than found
- how can I save my search results in csv, can anyone help me ?
- Pending update to ridigbio will break spocc! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spocc.