Goffstown NH Weather Forecast

I built a WordPress plugin for displaying the weather forecast. The forecast data is pulled from the NOAA NWS Forecast API. The plugin has a shortcode that can be placed on a post, page, or in a widget, anywhere you want to show the forecast.

The shortcode takes two perimeters:
1) the location (as latitude, longitude), and
2) the number of days to show. Something like this
[ weather location="43.0237,-71.6023" days="4" ]

The plug has a separate template file that can be customized to change the look of the forecast.

The plugin has built-in cache management. Caching prevents it from hit NOAA’s API every time the forecast is requested. If you hit the API too often NOAA may kick you off. The cache duration is configurable. A 6 hour cache works well for general use.

So here is the shortcode in action. It will grab NOAA’s 7 day forecast for my neighborhood (43.0237, -71.6023)

Goffstown, NH

Today Oct 26th
A chance of rain showers. Cloudy, with a high near 46. East wind 0 to 5 mph. Chance of precipitation is 40%. New rainfall amounts less than a tenth of an inch possible.

Tonight
A chance of rain showers before 2am. Mostly cloudy, with a low around 42. West wind 0 to 10 mph. Chance of precipitation is 40%. New rainfall amounts less than a tenth of an inch possible.

Tuesday Oct 27th
Partly sunny, with a high near 52. Northwest wind 5 to 10 mph.

Tuesday Night
Isolated rain showers between 10pm and midnight. Mostly cloudy, with a low around 32. Northwest wind 0 to 5 mph.

Wednesday Oct 28th
Mostly sunny, with a high near 51. West wind 0 to 5 mph.

Wednesday Night
Partly cloudy, with a low around 37.

Thursday Oct 29th
Rain likely after 2pm. Mostly cloudy, with a high near 52. Chance of precipitation is 60%.

Thursday Night
Rain likely before midnight, then rain and snow. Mostly cloudy, with a low around 31. Chance of precipitation is 80%.

Friday Oct 30th
Snow before 10am, then a chance of rain and snow. Partly sunny, with a high near 39. Chance of precipitation is 80%.

Friday Night
A chance of rain and snow before 8pm. Partly cloudy, with a low around 22. Chance of precipitation is 30%.

Saturday Oct 31st
Sunny, with a high near 44.

Saturday Night
Mostly clear, with a low around 26.

Sunday Nov 1st
Mostly sunny, with a high near 50.

Published by

Kimball

Kimball is a website designer and developer in Goffstown, NH.

One comment on:
“Goffstown NH Weather Forecast”

Leave a Reply

Your email address will not be published. Required fields are marked *