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

This Afternoon Jul 30th
A chance of showers and thunderstorms before 3pm, then a slight chance of showers and thunderstorms between 3pm and 5pm. Partly sunny. High near 75, with temperatures falling to around 69 in the afternoon. Northwest wind around 15 mph, with gusts as high as 30 mph. Chance of precipitation is 30%. New rainfall amounts less than a tenth of an inch possible.

Tonight
Mostly clear, with a low around 52. Northwest wind 5 to 15 mph, with gusts as high as 25 mph. New rainfall amounts less than a tenth of an inch possible.

Saturday Jul 31st
Sunny, with a high near 74. Northwest wind 5 to 10 mph.

Saturday Night
Partly cloudy, with a low around 53. West wind 0 to 5 mph.

Sunday Aug 1st
A chance of showers and thunderstorms after 3pm. Mostly sunny, with a high near 77. Southwest wind 0 to 5 mph. Chance of precipitation is 30%.

Sunday Night
Showers and thunderstorms likely. Mostly cloudy, with a low around 57. Chance of precipitation is 60%.

Monday Aug 2nd
A chance of rain showers. Mostly sunny, with a high near 74. Chance of precipitation is 40%.

Monday Night
A slight chance of rain showers before 8pm. Partly cloudy, with a low around 54.

Tuesday Aug 3rd
Mostly sunny, with a high near 75.

Tuesday Night
Partly cloudy, with a low around 55.

Wednesday Aug 4th
A chance of rain showers after 2pm. Mostly sunny, with a high near 78. Chance of precipitation is 30%.

Wednesday Night
A chance of rain showers. Partly cloudy, with a low around 58. Chance of precipitation is 30%.

Thursday Aug 5th
A chance of rain showers. Partly sunny, with a high near 77. Chance of precipitation is 40%.

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 *