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 May 28th
Partly sunny, with a high near 83. Southwest wind around 10 mph.

Tonight
A slight chance of rain showers after midnight. Mostly cloudy, with a low around 66. South wind around 10 mph.

Friday May 29th
A slight chance of rain showers before noon, then a chance of showers and thunderstorms. Some of the storms could produce small hail and heavy rain. Mostly cloudy, with a high near 82. Southwest wind around 10 mph. Chance of precipitation is 30%.

Friday Night
A chance of showers and thunderstorms before midnight, then a chance of showers and thunderstorms. Some of the storms could produce small hail and heavy rain. Mostly cloudy, with a low around 67. Southwest wind 5 to 10 mph. Chance of precipitation is 50%.

Saturday May 30th
A chance of rain showers before 2pm, then a chance of showers and thunderstorms. Mostly cloudy, with a high near 82. Southwest wind around 5 mph. Chance of precipitation is 50%.

Saturday Night
A chance of showers and thunderstorms before 8pm. Mostly cloudy, with a low around 55. Chance of precipitation is 40%.

Sunday May 31st
Mostly sunny, with a high near 70.

Sunday Night
Mostly clear, with a low around 45.

Monday Jun 1st
Mostly sunny, with a high near 66.

Monday Night
Partly cloudy, with a low around 44.

Tuesday Jun 2nd
Mostly sunny, with a high near 68.

Tuesday Night
A slight chance of rain showers after 8pm. Partly cloudy, with a low around 48.

Wednesday Jun 3rd
A chance of rain showers. Partly sunny, with a high near 71. Chance of precipitation is 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 *