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

Tonight
A slight chance of rain showers after 4am. Mostly cloudy, with a low around 38. North wind around 0 mph. Chance of precipitation is 20%. New rainfall amounts less than a tenth of an inch possible.

Wednesday Apr 8th
A chance of rain showers before 1pm. Mostly cloudy, with a high near 52. Northeast wind 0 to 5 mph. Chance of precipitation is 30%. New rainfall amounts less than a tenth of an inch possible.

Wednesday Night
A chance of rain showers after 11pm. Mostly cloudy, with a low around 38. Southeast wind around 0 mph. Chance of precipitation is 30%.

Thursday Apr 9th
A chance of rain showers before 8am, then rain. Cloudy, with a high near 46. South wind 5 to 10 mph. Chance of precipitation is 90%.

Thursday Night
A chance of rain before 8pm, then a slight chance of snow. Partly cloudy, with a low around 33. West wind 15 to 20 mph, with gusts as high as 30 mph. Chance of precipitation is 40%.

Friday Apr 10th
A slight chance of snow before 7am, then a chance of rain and snow. Partly sunny, with a high near 44. Chance of precipitation is 30%.

Friday Night
Mostly cloudy, with a low around 33.

Saturday Apr 11th
Mostly sunny, with a high near 49.

Saturday Night
Mostly clear, with a low around 31.

Sunday Apr 12th
A slight chance of rain showers after 2pm. Mostly sunny, with a high near 57.

Sunday Night
Rain showers likely. Mostly cloudy, with a low around 42. Chance of precipitation is 60%.

Monday Apr 13th
Rain showers likely. Mostly cloudy, with a high near 57. Chance of precipitation is 60%.

Monday Night
A chance of rain showers. Mostly cloudy, with a low around 40. Chance of precipitation is 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 *