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

How to obtain the latitude and longitude information of species? #107

Open
luozhisen opened this issue Dec 5, 2023 · 1 comment
Open

Comments

@luozhisen
Copy link

I want to get the latitude and longitude of a species record in an area. How? I used areas for species and found none of this information

@pieterprovoost
Copy link
Member

pieterprovoost commented Dec 5, 2023

@luozhisen If you use the occurrence() function you will get georeferenced occurrence records. The coordinates are in columns decimalLongitude and decimalLatitude as decimal degrees. To apply a spatial filter either use the areaid or the geometry filter.

> library(robis)
> occ <- occurrence("Abra sibogai")
Retrieved 12 records of approximately 12 (100%)
> occ[,c("decimalLongitude", "decimalLatitude")]
# A tibble: 12 × 2
   decimalLongitude decimalLatitude
              <dbl>           <dbl>
 1             120.           14.0 
 2             120.           14.0 
 3             120.           14.0 
 4             120.           14   
 5             120.           13.8 
 6             120.           -6.31
 7             119.           -5.92
 8             120.           14   
 9             120.           -6.59
10             120.           13.9 
11             119.           -5.93
12             120.           13.7 

There are more examples in the vignette. If you are interested in gridded data then you can use the API directly as explained here.

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

2 participants