Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various issues with querying #43

Closed
3 tasks done
emhart opened this issue Feb 24, 2014 · 10 comments
Closed
3 tasks done

Various issues with querying #43

emhart opened this issue Feb 24, 2014 · 10 comments

Comments

@emhart
Copy link
Contributor

emhart commented Feb 24, 2014

Just a laundry list of things I'm coming up with as I go over workshop curriculum, with the call and the error.

  • Problem with ebird queries hawks <- occ(query = "Buteo jamaicensis", from = c("ebird"),limit=35)
    Error in list(fmt = "json", r = region, rtype = regtype, sci = species, 'region' is missing
  • Problem with bison queries hawks <- occ(query = "Buteo jamaicensis", from = c("bison"),limit=35)
    Error in (function (species, type = "scientific_name", start = NULL, count = 10, : unused argument (what = "points")
  • lat and lon are swapped for some query results. Note the difference between gbif and ebird e.g.
red_tailed_hawk <- occ(query = "Buteo jamaicensis", from = c("gbif","ebird"),limit=35, ebirdopts = list(region='US'))

rt_hawk <-  occ2df(red_tailed_hawk)

> head(rt_hawk)
               name  longitude latitude prov
1 Buteo jamaicensis  -72.75626 44.33782 gbif
2 Buteo jamaicensis  -72.95540 44.38789 gbif
3 Buteo jamaicensis -122.29619 45.48817 gbif
4 Buteo jamaicensis  -73.07887 43.79315 gbif
5 Buteo jamaicensis  -93.68460 32.46638 gbif
6 Buteo jamaicensis -116.93248 32.61669 gbif
> tail(rt_hawk)
                name longitude   latitude  prov
65 Buteo jamaicensis  28.37477  -98.15052 ebird
66 Buteo jamaicensis  35.86407  -75.86201 ebird
67 Buteo jamaicensis  44.61453 -123.28182 ebird
68 Buteo jamaicensis  31.88652 -110.96856 ebird
69 Buteo jamaicensis  34.12420  -84.94828 ebird
70 Buteo jamaicensis  33.73912  -96.77625 ebird
@emhart
Copy link
Contributor Author

emhart commented Feb 24, 2014

Looks like ebird requires a region, but could probably use a more informative error about what to do if region is omitted. Or just have a default.

@sckott
Copy link
Contributor

sckott commented Feb 24, 2014

For bison update your version of rbison should fix it

@sckott
Copy link
Contributor

sckott commented Feb 24, 2014

lat/lngs were pulled out in the occ2df function in different orders for different sources, made them put in the same order in the data.frame construction

@karthik
Copy link
Member

karthik commented Feb 24, 2014

I've made the same mistake elsewhere too and didn't really detect it till I mapped things out. It would be great if there were a function in rMaps that somehow detected bizarre locations and threw a warning like Warning: Looks like you've swapped lat/long.

@sckott
Copy link
Contributor

sckott commented Feb 24, 2014

Good point about checking weird locations. Would be relatively simple I think - but hopefully is something that won't be slow on large datasets.

@karthik
Copy link
Member

karthik commented Feb 24, 2014

Right but that's easy to get around. We'll just need to check a small subset regardless of how big the actual dataset is.

@sckott
Copy link
Contributor

sckott commented Feb 24, 2014

true

@sckott sckott mentioned this issue Feb 24, 2014
6 tasks
@sckott
Copy link
Contributor

sckott commented Feb 24, 2014

Should this be closed now @emhart ?

@sckott
Copy link
Contributor

sckott commented Mar 16, 2014

@emhart should we close this?

@sckott
Copy link
Contributor

sckott commented Mar 25, 2014

closing then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants