npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@juliapupu/sensor-nyc-weather

v0.1.0

Published

W2A sensor — daily NYC weather plus celestial moments a New Yorker would actually want to know about (sunset glow, moon phase, meteor showers, severe weather alerts)

Downloads

59

Readme

@juliapupu/sensor-nyc-weather

A World2Agent sensor that delivers NYC weather plus the celestial moments a New Yorker would actually want to know about — sunset glow likelihood, moon phase, stargazing quality, and active meteor showers.

Built for the resident who wants more than "high 18, low 9, chance of rain" — when the sky over Brooklyn is going to be magenta at 7:42pm, or when the Perseids are peaking on a moonless Tuesday, this sensor calls it.

What it does

  • Polls the National Weather Service public API once a day at a time you choose (default 08:00 ET).
  • Computes sunrise / sunset / civil dusk / moon phase locally (no external API for astronomy).
  • Heuristically scores tonight's sunset glow likelihood from the cloud-cover forecast at sunset hour.
  • Heuristically scores tonight's star visibility from cloud cover and moon brightness.
  • Looks up active major meteor showers (Perseids, Geminids, Quadrantids, Lyrids, Eta Aquarids, Orionids, Leonids, Ursids) against today's date.
  • Emits one weather.forecast.daily signal per day with all of the above bundled into one human-readable summary plus structured fields.
  • Polls NWS active alerts every 15 min; emits weather.alert.severe when NYC enters a Severe or Extreme warning.

Signals

weather.forecast.daily

| Field | What's in it | |---|---| | event.summary | One line — high/low, conditions, wind, sunrise/sunset, plus celestial blurb (🌅 sunset glow / 🌙 moon / 🌌 stars / ☄️ meteor) when notable | | source_event.data | high_c, low_c, short_summary, precipitation_chance, wind, sunrise_iso, sunset_iso, civil_dusk_iso, moon_phase, moon_illumination_pct, sunset_glow_likely, star_visibility, optional meteor_shower_name / meteor_shower_zhr | | attachments[0] | NWS detailed forecast text + computed sun/moon/celestial detail (inline) |

Example summaries:

NYC Mon, Apr 27: 17°C / 9°C, Sunny; wind 6 to 10 mph NE; sunrise 06:01 / sunset 19:48; 🌙 Waxing Gibbous 84%; 🌌 good star visibility
NYC Wed, Aug 12: 28°C / 21°C, Mostly Clear; wind 5 mph S; sunrise 06:04 / sunset 20:00; 🌑 New Moon — darkest sky tonight; 🌌 excellent star visibility; ☄️ Perseids peak (100 ZHR, 23:00–04:30 ET)

weather.alert.severe

Emitted when NWS publishes a Severe or Extreme alert for the NYC point.

⚠️ NYC Coastal Flood Warning (Severe/Expected): Significant coastal flooding expected this afternoon...

Configuration

| Parameter | Type | Default | What it does | |---|---|---|---| | daily_time | string HH:MM | 08:00 | When the daily forecast fires (NYC local) | | include_alerts | boolean | true | Emit Severe/Extreme NWS alerts when issued | | include_celestial | boolean | true | Add celestial blurb to daily summary |

Install

In Claude Code:

/world2agent:sensor-add @juliapupu/sensor-nyc-weather

The install flow walks you through 6 questions (3 config, 3 semantic preferences) and writes a handler skill tailored to how you live in NYC.

Standalone (no Claude Code)

npm install @juliapupu/sensor-nyc-weather
w2a-sensor-nyc-weather | your-agent

Heuristics — how the celestial signals are scored

Sunset glow (sunset_glow_likely):

  • 30–70 % cloud cover at sunset hour AND <60 % precipitation chance → likely.
  • <20 % cover → "clear, beautiful but no glow."
  • 70 % cover → "overcast, sun blocked."

  • Reason string is included so the AI agent (and you) can sanity-check.

Star visibility (star_visibility = excellent | good | fair | poor):

  • Score = 100 − cloud_cover − moon_noise (moon_noise = 25 if illumination ≥ 80%, 15 if ≥ 50%, 0 otherwise).
  • ≥75 → excellent · ≥55 → good · ≥30 → fair · else poor.

Meteor showers: hardcoded peak-date table for the eight major annual showers; ±1–2 day window around peak.

These are heuristics, not science. PRs to improve them welcome.

Source

NWS public API: https://api.weather.gov · NYC point: 40.7128, -74.0060

License

MIT