
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@pondlog/source-npn
Advanced tools
USA National Phenology Network (NPN) Portal API client: typed, Zod-validated, polite-rate-limited. Returns Result<T> instead of throwing.
USA National Phenology Network (NPN) Portal API client. Typed, Zod-validated,
politely rate-limited. Returns Result<T> instead of throwing.
Base URL: https://services.usanpn.org/npn_portal/. No API key required.
Part of pondlog.
npm install @pondlog/source-npn
| Function | Description |
|---|---|
getSpecies() | Full NPN species catalog (~1900 records). |
getStations({ stateCode? }) | All NPN stations, optionally filtered by US state postal code. Recommend a state filter; unfiltered is ≈ 50k stations. |
getStationCountByState() | Station count per US state. |
getStationsWithSpecies({ speciesIds }) | Stations that have observed any of the given species. |
getStationsByLocation({ wkt }) | Stations inside a WKT polygon. Use bboxWkt(coords, radiusKm) to construct one from lat/lng. |
getObservations({ years, ... }) | Status / intensity records. Requires years[] and ≥ 1 narrowing filter (species/station/state/etc). |
getSiteLevelData({ startDate, endDate, ... }) | Site-level phenometric records. Requires a date window (startDate/endDate, YYYY-MM-DD) plus ≥ 1 narrowing filter (species/station). years[] still accepted as a fallback that derives a window. |
getActivePhenologyNearby({ coords, radiusKm, windowDays? }) | Composed helper. Builds a WKT bbox, fetches stations, haversine-filters to true radius, then calls getSiteLevelData over a rolling windowDays window (default 365). |
All functions return Result<T> from @pondlog/core.
bboxWkt(coords, radiusKm): WGS84 bounding-box polygon as WKT, ready for getStationsByLocation.haversineKm(a, b): great-circle distance in km.-9999 across many fields. Normalizers
translate this to undefined so consumers never see the sentinel.getActivePhenologyNearby helper composes the round-trip so callers don't
have to learn WKT.start_date/end_date REQUIRED on
getSiteLevelData (a bare years[] call now returns HTTP 400
start_date and end_date are required), and it silently ignores years[]
and state[] on that endpoint. test:contract is a live smoke that fails
loudly if that request/response contract moves again.MIT.
FAQs
USA National Phenology Network (NPN) Portal API client: typed, Zod-validated, polite-rate-limited. Returns Result<T> instead of throwing.
The npm package @pondlog/source-npn receives a total of 60 weekly downloads. As such, @pondlog/source-npn popularity was classified as not popular.
We found that @pondlog/source-npn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.