Scootercam’s sunset scores

I think this has real value on Scootercam, and I’d had it in mind for a long time before AI came along to help. We have a lot of great sunsets here – but just how great? And can we get a heads-up when conditions tell us “don’t miss tonight’s show?”

The prototype was pretty impressive, I thought; and it seemed reliable – enough to not be a gimmick. But as I’m working on the plugin version of the sunset predictor, I kept wondering… what about the Kenosha factor? Kenosha is due west, across the lake. Kenosha’s weather is factor in our sunsets.

Scootercam-sunset

A WordPress plugin that predicts sunset beauty scores based on real-time weather conditions. Perfect for locations near large bodies of water or anywhere with an unobstructed western horizon.

What This Plugin Does

This plugin analyzes current weather conditions to predict how beautiful tonight’s sunset will be. It scores sunsets on a 0-100 scale and provides a letter grade, making it easy to decide if you should head out with your camera or just watch from the window.

Key Features

  • Sunset Beauty Scores: Get a 0-100 score with letter grade (A+ to F)
  • 3-Day Evening Forecast: See sunset predictions for the next three evenings
  • Horizon Weather Analysis: Compare conditions at your location with a distant “horizon” location (like across a lake)
  • Customizable Scoring: Adjust the weights for different weather factors in the admin panel
  • Multiple Display Options: Four different shortcodes for various uses
  • Smart Caching: Reduces API calls by caching weather data for 30 minutes

How It Works

The plugin fetches real-time weather data from OpenWeatherMap and analyzes several factors:

  • Cloud Coverage (default: 40 points): 25-55% is optimal – creates a “canvas” for colors
  • Visibility (default: 25 points): Clear air allows colors to pop
  • Humidity (default: 20 points): 45-75% enhances color saturation
  • Wind Speed (default: 15 points): 5-15 mph provides ideal clarity
  • Weather Type (default: 15 points): Partly cloudy is best
  • Temperature (default: 5 points): Comfortable viewing temps get a bonus
  • Horizon Contrast (default: 20 points): When enabled, compares your weather with a location across the water

The horizon analysis is what makes this plugin special. For example, if you’re on the eastern shore of Lake Michigan looking west, having clear skies at your location while there are clouds over Wisconsin creates the perfect sunset conditions – you get a clear view while those distant clouds light up dramatically.

Installation

  1. Upload the scootercam-sunset folder to /wp-content/plugins/
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to Settings → Sunset Predictor to configure

Configuration

Getting an API Key

  1. Visit OpenWeatherMap
  2. Sign up for a free account
  3. Generate an API key (the free tier includes 1,000 calls per day)
  4. Enter the key in Settings → Sunset Predictor

Setting Up Locations

Home Location (Viewing Location)

This is where YOU are – where you’ll be watching the sunset from.

  • Location Name: e.g., “South Haven, MI” or “My Beach House”
  • Latitude/Longitude: Your viewing location coordinates
  • Timezone: Your local timezone

To find coordinates: Search your location on Google Maps, right-click the map, and select the coordinates to copy them.

Horizon Location (Across the Water)

This is the location on the opposite side of the water – where the sun sets BEYOND.

  • Enable Horizon Analysis: Check this box to activate the feature
  • Location Name: e.g., “Kenosha, WI”
  • Latitude/Longitude: Coordinates of the distant location
  • Timezone: The horizon location’s timezone (important for time-based forecasts)

Example Setup for Lake Michigan:

  • Home: South Haven, MI (42.4072, -86.2784) – Eastern Time
  • Horizon: Kenosha, WI (42.5847, -87.8212) – Central Time

Why the horizon matters: Clear skies at your location + clouds at the horizon = spectacular sunset. The horizon clouds become the “screen” that lights up while you have perfect viewing conditions.

Adjusting Scoring Weights

In the admin panel, you can customize how much each weather factor contributes to the final score. The default weights work well for most locations, but you might want to adjust based on your local conditions:

  • Increase Cloud Coverage weight if dramatic cloud formations matter most
  • Increase Visibility weight in areas with frequent haze or pollution
  • Increase Horizon Contrast weight if cross-water conditions are highly predictive
  • Decrease any factor that seems less important for your location

The weights can range from 0 (disabled) to the maximum shown for each factor.

Using the Shortcodes

[sunset-score]

Displays just the numerical score and letter grade.

Output example: 85/100 (A-)

Usage: Perfect for sidebars, headers, or anywhere you want a quick sunset rating.

Today's sunset rating: [sunset-score]

[sunset-time]

Displays today’s sunset time in your local timezone.

Output example: 7:42 PM

Usage: Show visitors when to be ready for the sunset.

Sunset tonight at [sunset-time]

[sunset-description]

Provides a brief text description of tonight’s sunset conditions.

Output example: “Tonight’s sunset looks spectacular with a score of 85/100 (A-). Key factors: Optimal clouds (45%), Excellent visibility (12.5km), Perfect contrast: clear viewing with horizon clouds (55% at Kenosha, WI).”

Usage: Great for blog posts or daily weather updates.

[sunset-description]

[sunset-full]

Displays the complete forecast page with tonight’s detailed conditions and a 3-day evening forecast.

Includes:

  • Tonight’s score with all contributing factors
  • Current weather stats (clouds, visibility, humidity, wind)
  • 3-day evening forecast with scores
  • Explanatory guide about what makes great sunsets
  • Information about how scores are calculated

Usage: Create a dedicated sunset forecast page.

[sunset-full]

Styling

The plugin includes its own CSS file (css/sunset-styles.css) with professional styling that works with most WordPress themes. All elements use the .sunset- class prefix to avoid conflicts.

If you want to customize the appearance:

  1. Add custom CSS to your theme’s style.css
  2. Use the .sunset- class names to target specific elements
  3. Override the plugin’s styles as needed

Cache Management

Weather data is cached for 30 minutes to:

  • Reduce API calls to OpenWeatherMap
  • Improve page load speed
  • Stay within free API tier limits

To manually clear the cache:

  1. Go to Settings → Sunset Predictor
  2. Scroll to Cache Management
  3. Click Clear Cache Now

The cache automatically refreshes after 30 minutes.

Frequently Asked Questions

Q: How accurate are the predictions? A: The scoring is based on meteorological factors that affect sunset visibility and color intensity. It’s quite accurate for determining if conditions will be good, but actual beauty is subjective! Use scores of 85+ as “definitely go” and below 50 as “probably skip it.”

Q: Can I use this without a horizon location? A: Yes! Simply uncheck “Enable Horizon Analysis” in the settings. The plugin will still provide excellent predictions based on local conditions.

Q: Will this work for locations other than Lake Michigan? A: Absolutely! This plugin works anywhere. It’s ideal for:

  • Lake shores (any large lake)
  • Ocean coasts
  • Mountain vistas looking west
  • Any location with an unobstructed western horizon

Just configure your home and horizon locations appropriately.

Q: What’s the difference between this and a regular weather forecast? A: Regular forecasts tell you what the weather will be. This plugin tells you if that weather will create a beautiful sunset. Big difference!

Q: How many API calls does this use? A: With caching, typically 4-6 calls per day (refreshing every 30 minutes during peak usage). Well within the free tier limit of 1,000 calls/day.

Q: Can I adjust the optimal cloud coverage range? A: The optimal ranges are built into the scoring algorithm, but you can adjust the overall weight given to clouds. To change the actual ranges, you’d need to modify the predictor class.

Q: What happens if the API is down? A: The plugin will use cached data if available. If no cache exists, it will display an error message: “Unable to fetch forecast.”

Technical Details

  • Minimum WordPress Version: 5.0
  • PHP Version: 7.0 or higher
  • API Used: OpenWeatherMap (free tier)
  • Caching: JSON file in WordPress uploads directory
  • Timezone Handling: Full timezone support for accurate time conversions

Support

For issues, questions, or feature requests, please visit scootercam.com

Credits

Weather data provided by OpenWeatherMap

Developed by Scootercam


Version: 1.0.0
Last Updated: 2025