Is it possible to map the locations of the bird observations?
CordnyNederkoorn opened this issue · comments
Hi,
Is it possible to map (google maps, OpenStreetMap) multiple locations of the bird observations via R rebird or other R package?
For instance the locations (Long. and lat.) of a specific bird in the USA found with ebirdregion function:
Example:
ebirdregion(region = 'US', species = 'Passer domesticus')
Best,
Cordny
the Netherlands
hi @CordnyNederkoorn are you looking for interactive maps, static maps (using base R graphics, or ggplot2)? This package focuses on getting eBird data, but we can help you visualize
The data and Visualization I'm looking for, can you give me some pointers? Thanks!
I'm now in a course learning datascience using R and because birdwatching is my domain I thought I use both.
- One option is to search ebird data via
spocc
package https://cran.rstudio.com/web/packages/spocc/ - & https://cran.rstudio.com/web/packages/spoccutils/ has a bunch of functions to help you visualize that data - If you want to make vizualizations yourself, here's an example making an interactive leaflet map:
library(rebird)
library(leaflet)
res <- ebirdregion(region = 'US', species = 'Passer domesticus')
leaflet(data = res) %>%
addTiles() %>%
addCircleMarkers()
that's an interactive map you can zoom in on, etc, but static here
Thanks, I've tried leaflet already, but only got one marker with data from 1 sighting of Passer domesticus from the ebirdregion-function hardcoded in leaflet:
library(leaflet)
m <- leaflet()
m <- addTiles(m)
m <- addMarkers(m, lng= 3.751218 ,lat=51.98096, popup="Passer domesticus NL")
I'm a newbie to R, so pardon for the code :) , but I'm learning!
leaflet(data = res) would solve the hardcoding problem.
I'll have a look at the spocc package.
Many thanks!
Note that it works just fine specifying data in the addmarkers call too e.g., addCircleMarkers(data = res)
yes it does, thanks !