Theodore Roosevelt Presidential Library Labs

TRPL Labs  /  Embeddable Widget

Embeddable Widget

Today in the Badlands

One strip with today's park alerts, weather, river, air quality, and things to do.

Screenshot of Today in the Badlands

Try it right here

This loads the live project from its own domain, exactly as a visitor would see it.

What it does

An embeddable strip with what a visitor needs to know this morning: park closures and road events, National Weather Service alerts, current weather, the Little Missouri River against its normal range, modeled air quality with smoke flagged, sunset and moon phase, and the park's activities filtered by how much time the visitor has.

An hourly build pulls every source into one snapshot and keeps the last good value, flagged, when a source fails. In the browser, weather, alerts, river, and air are then refreshed live every fifteen minutes. Activities with no official duration are grouped under "at your own pace" rather than given made-up times.

What it can do

  • NPS alerts and road events plus NWS watches and warnings, with a clear "no closures" state
  • River flow compared with 69 years of daily percentiles for the date
  • Air quality labeled as a modeled estimate, with a link to official readings
  • Things to do filtered by time available and by park unit
  • Optional crowd outlook from five years of NPS monthly visitation
  • Self-sizing iframe with light and dark themes and per-visitor remembered choices
  • Last-good fallback for every source, flagged in the status block

Make it your own

Start by forking the repository into your own organization. Everything below assumes you are working in your fork, not this one.

# clone your fork git clone https://github.com/YOUR-ORG/BadlandsToday.git cd BadlandsToday
  1. Fork the repo and get a free NPS API key. Add it as the Actions secret NPS_API_KEY.
  2. In scripts/build.mjs, set your park code, NWS zones and forecast grid, USGS gauge, and coordinates.
  3. Rebuild data/river-stats.json for your gauge, or turn the river panel off with data-show.
  4. Copy docs/deploy.yml into .github/workflows/, give workflows read and write permission, and set Pages to deploy from GitHub Actions.
  5. Run the workflow once by hand, then add <div data-badlands-today="strip"> and the script tag to your site.

Stuck on a step? Open an issue on the repository. Questions from people adapting these for their own institution are the most useful feedback we get.