Goffstown NH Weather Forecast

I built a WordPress plugin and shortcode that grabs weather forecast from the NWS’ new Forecast API. Using the shortcode I can place the forecast anywhere on a post, page, or in a widget. The short code take 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 for the look of the forecast. The plugin also manages it’s own cache, as to not hit NOAA’s API every time the forecast is requested. The cache duration is customization.

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 Sep 19th
Sunny, with a high near 69. Northwest wind 0 to 5 mph.

Tonight
Clear, with a low around 41. West wind 0 to 5 mph.

Friday Sep 20th
Sunny, with a high near 77. Northwest wind 0 to 5 mph.

Friday Night
Mostly clear, with a low around 55. Northwest wind around 5 mph.

Saturday Sep 21st
Sunny, with a high near 80. Northwest wind around 5 mph.

Saturday Night
Mostly clear, with a low around 56.

Sunday Sep 22nd
Sunny, with a high near 83.

Sunday Night
Partly cloudy, with a low around 62.

Monday Sep 23rd
A chance of rain showers after 8am. Partly sunny, with a high near 80. Chance of precipitation is 40%.

Monday Night
A chance of rain showers. Mostly cloudy, with a low around 57. Chance of precipitation is 40%.

Tuesday Sep 24th
A chance of rain showers. Mostly sunny, with a high near 72. Chance of precipitation is 30%.

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

Wednesday Sep 25th
Mostly sunny, with a high near 71.

Published by

Kimball

Kimball is a website designer and developer in Goffstown, NH.

Leave a Reply

Your email address will not be published. Required fields are marked *