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 Feb 23rd
Sunny. High near 50, with temperatures falling to around 44 in the afternoon. Southwest wind around 5 mph.

Tonight
Mostly clear, with a low around 26. Southwest wind 0 to 5 mph.

Monday Feb 24th
Sunny, with a high near 51. Southwest wind 0 to 10 mph.

Monday Night
A slight chance of rain and snow after 3am. Mostly cloudy, with a low around 33. West wind 0 to 5 mph.

Tuesday Feb 25th
A chance of rain and snow. Mostly cloudy, with a high near 41. North wind 0 to 5 mph. Chance of precipitation is 30%.

Tuesday Night
A chance of rain before 8pm, then a chance of rain and snow between 8pm and 5am, then a chance of snow and a chance of sleet. Mostly cloudy, with a low around 32. Chance of precipitation is 40%.

Wednesday Feb 26th
A chance of snow before 8am, then a chance of rain and snow. Mostly cloudy, with a high near 41. Chance of precipitation is 50%.

Wednesday Night
Rain. Cloudy, with a low around 34. Chance of precipitation is 80%.

Thursday Feb 27th
Rain and snow before 1pm, then a chance of rain showers. Mostly cloudy, with a high near 43. Chance of precipitation is 80%.

Thursday Night
A chance of rain and snow showers before 7pm. Mostly cloudy, with a low around 25. Chance of precipitation is 40%.

Friday Feb 28th
Partly sunny, with a high near 33.

Friday Night
Mostly cloudy, with a low around 17.

Saturday Feb 29th
Mostly sunny, with a high near 30.

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 *