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
Mostly cloudy, with a low around 17. West wind 5 to 15 mph, with gusts as high as 30 mph.

Tuesday Jan 18th
Sunny. High near 22, with temperatures falling to around 15 in the afternoon. Northwest wind around 15 mph, with gusts as high as 30 mph.

Tuesday Night
Partly cloudy, with a low around 5. Wind chill values as low as -1. West wind 0 to 10 mph, with gusts as high as 25 mph.

Wednesday Jan 19th
A slight chance of snow between 7am and 1pm. Mostly cloudy, with a high near 36. South wind 5 to 10 mph. New snow accumulation of less than half an inch possible.

Wednesday Night
A slight chance of snow showers after 1am. Mostly cloudy, with a low around 25. West wind around 5 mph.

Thursday Jan 20th
A slight chance of snow showers before 7am. Partly sunny, with a high near 31.

Thursday Night
Partly cloudy, with a low around 0.

Friday Jan 21st
Mostly sunny, with a high near 15.

Friday Night
Partly cloudy, with a low around -1.

Saturday Jan 22nd
A chance of snow after 7am. Mostly sunny, with a high near 18. Chance of precipitation is 30%.

Saturday Night
A chance of snow before 7pm, then a slight chance of snow showers. Mostly cloudy, with a low around 9. Chance of precipitation is 30%.

Sunday Jan 23rd
A slight chance of snow showers. Mostly cloudy, with a high near 28.

Sunday Night
A slight chance of snow showers before 7pm. Mostly cloudy, with a low around 12.

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 *