eBird alerts are great. I have a bunch set up for regions near my home and I often temporarily enable them for places that I'll be travelling to. And yet... they don't quite tell me what I really want to know. Which is this:
**Warning: Extreme nerding ahead** So I wrote some R functions. They rely on the very helpful package rebird, which allows you to query recent eBird sightings via eBird's API. To calculate travel distances, they draw on R's API to Google Maps: mapsapi. Here's what they do:
Here are some examples (corresponding to those in the script file link above): Notable species near a given address: Note that the address can be entered in any format recognisable by Google Maps. Mode can be set to "driving" (the default), "walking", "bicycling" or "transit". Travel times are in the format hours:minutes (or days:hours:minutes if the travel time is longer than 24 hours). Travel times that cannot be calculated by Google Maps appear as NA. Notable species near a given address, excluding birds on your life list: Notable species that are within a specified travel time of a given address: The maximum travel time should be inputted in minutes (the argument 'time = 180' in the example above corresponds to 3 hours). Potential lifers (notable or not) in a given eBird region: You can also enter multiple eBird regions as a list. Note that the function region_lifers() can be slow, because it needs to query each potential lifer individually to the eBird API. In contrast, nearby_notables() is quite fast. Potential lifers in a given eBird region along with travel times from a given address: Potential lifers in a given eBird region that are within a specified travel time of a given address: If anyone else ends up using this: Feedback and bug reports are welcome!
0 Comments
Leave a Reply. |