usa-npn / rnpn

R client for the National Phenology Network database API
https://rdrr.io/cran/rnpn/
Other
19 stars 9 forks source link

`npn_stations_with_spp()` doesn't work with some species #38

Open Aariq opened 1 week ago

Aariq commented 1 week ago

According to the documentation, npn_stations_with_spp() should return a data frame with lat, lon, names and IDs, but it seems to return a 1x1 data frame:

library(rnpn)
res <- npn_stations_with_spp(3)
dim(res)
#> [1] 1 1
res
#>   x
#> 1

Created on 2024-11-12 with reprex v2.1.1

Aariq commented 1 week ago

btw, this is what the function is pointing to: https://services.usanpn.org/npn_portal/stations/getStationsWithSpecies.json

Aariq commented 6 days ago

Works with species_id = 100, but should also work with species_id = 3 (red maple). Red maple is super common, so maybe something is getting overloaded with too much data?