Skip to content

Commit

Permalink
Add nearestobs() to README and vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
sebpardo committed Sep 27, 2018
1 parent 70545f2 commit 8d75c28
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 653 deletions.
8 changes: 8 additions & 0 deletions README.Rmd
Expand Up @@ -102,6 +102,14 @@ Search for bird occurrences by a given hotspot
ebirdregion(loc = 'L99381')
```

## Nearest observations of a species

Search for a species' occurrences near a given latitude and longitude

```{r nearestobs}
nearestobs(species_code('branta canadensis'), 42, -76)
```


## Frequency of observations at hotspots or regions

Expand Down
28 changes: 26 additions & 2 deletions README.md
Expand Up @@ -110,7 +110,7 @@ Search for bird occurrences by region and species name

``` r
ebirdregion(loc = 'US', species = 'btbwar')
#> # A tibble: 1,042 x 12
#> # A tibble: 1,041 x 12
#> speciesCode comName sciName locId locName obsDt howMany lat lng
#> <chr> <chr> <chr> <chr> <chr> <chr> <int> <dbl> <dbl>
#> 1 btbwar Black-t… Setopha… L3572… Cornell… 2018… 2 42.4 -76.5
Expand All @@ -123,7 +123,7 @@ ebirdregion(loc = 'US', species = 'btbwar')
#> 8 btbwar Black-t… Setopha… L5862… Indrio … 2018… 1 27.5 -80.4
#> 9 btbwar Black-t… Setopha… L1301… Ashland… 2018… 2 39.8 -75.7
#> 10 btbwar Black-t… Setopha… L1877… Pinecra… 2018… 1 27.3 -82.5
#> # ... with 1,032 more rows, and 3 more variables: obsValid <lgl>,
#> # ... with 1,031 more rows, and 3 more variables: obsValid <lgl>,
#> # obsReviewed <lgl>, locationPrivate <lgl>
```

Expand All @@ -150,6 +150,30 @@ ebirdregion(loc = 'L99381')
#> # obsReviewed <lgl>, locationPrivate <lgl>
```

## Nearest observations of a species

Search for a species’ occurrences near a given latitude and longitude

``` r
nearestobs(species_code('branta canadensis'), 42, -76)
#> Canada Goose (Branta canadensis): cangoo
#> # A tibble: 27 x 12
#> speciesCode comName sciName locId locName obsDt howMany lat lng
#> <chr> <chr> <chr> <chr> <chr> <chr> <int> <dbl> <dbl>
#> 1 cangoo Canada … Branta … L186… Cheri A.… 2018… 4 42.1 -75.9
#> 2 cangoo Canada … Branta … L207… Workwalk 2018… 26 42.1 -75.9
#> 3 cangoo Canada … Branta … L287… Vestal R… 2018… 49 42.1 -76.0
#> 4 cangoo Canada … Branta … L527… R Tee Go… 2018… 53 42.2 -75.9
#> 5 cangoo Canada … Branta … L728… State Ga… 2018… 23 41.9 -75.7
#> 6 cangoo Canada … Branta … L504… Rt. 12A … 2018… 65 42.2 -75.9
#> 7 cangoo Canada … Branta … L468… "Boland … 2018… 12 42.2 -75.9
#> 8 cangoo Canada … Branta … L285… Camp Sus… 2018… 2 42.0 -75.9
#> 9 cangoo Canada … Branta … L447… Binghamt… 2018… 2 42.1 -76.0
#> 10 cangoo Canada … Branta … L501… William … 2018… 50 42.1 -76.0
#> # ... with 17 more rows, and 3 more variables: obsValid <lgl>,
#> # obsReviewed <lgl>, locationPrivate <lgl>
```

## Frequency of observations at hotspots or regions

Obtain historical frequencies of bird occurrences by hotspot or region
Expand Down
9 changes: 9 additions & 0 deletions inst/vign/rebird_vignette.Rmd
Expand Up @@ -86,6 +86,15 @@ ebirdregion(loc = 'L99381', species = species_code('larus delawarensis'),
```


## Nearest observations of a species

Search for a species' occurrences near a given latitude and longitude

```{r nearestobs}
nearestobs(species_code('branta canadensis'), 42, -76)
```


### Recent observations at a region

Search for bird occurrences by region and species name
Expand Down

0 comments on commit 8d75c28

Please sign in to comment.