Weather Criteria for Evaluation
Below are all the criteria that need to be implemented for the fishing weather mobile app, based on the client’s document. Each criterion includes the Weatherbit API field, evaluation logic, and considerations for scoring and safety.
1. Time of Day
Description: User selects specific periods (morning, mid-day, evening).
API Field:
timestamp_local
(Current Weather API for current period, Hourly Forecast API for future periods).Logic:
For current period, convert
timestamp_local
to local hour and map to the nearest period: morning (08:00), mid-day (13:00), evening (18:00).For future periods, use the specified hour (08:00, 13:00, 18:00).
Match if the period equals the user-selected option (e.g., "morning").
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., avoid fishing in evening due to safety concerns).
2. Temperature Range
Description: User specifies a temperature range in Fahrenheit via slider.
API Field:
temp
(Current Weather API for current, Hourly Forecast API for future).Logic:
Convert
temp
from Celsius to Fahrenheit (°F = °C × 9/5 + 32).Match if
temp
is within the user-defined range (e.g., 65–80°F).
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., extreme temperatures).
3. Temperature Trend
Description: User selects warming, cooling, or steady via radio button.
API Fields:
temp
(Current Weather API for current, Hourly Forecast API for future, Historical Hourly API for previous day).Logic:
Compare
temp
to the same period’stemp
from the previous day (e.g., today’s 08:00 vs. yesterday’s 08:00).Warming: ≥10°F warmer than previous day.
Cooling: ≥10°F cooler than previous day.
Steady: Within ±3°F of previous day.
Match if the trend matches the user-selected option.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., rapid cooling indicating a storm).
4. Barometric Pressure
Description: User selects high, normal, or low via radio button.
API Field:
slp
(sea-level pressure, Current Weather API for current, Hourly Forecast API for future).Logic:
Convert
slp
from mb to inHg (inHg = mb / 33.8639).High: ≥30.2 inHg.
Normal: 29.8–30.15 inHg.
Low: ≤29.7 inHg.
Match if the pressure level matches the user-selected option.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., low pressure indicating storms).
5. Barometric Pressure Trend
Description: User selects rising, falling, or steady via radio button.
API Fields:
slp
(Current Weather API for current, Hourly Forecast API for future, Historical Hourly API for previous day).Logic:
Compare
slp
to the same period’sslp
from the previous day.Rising: ≥0.15 inHg increase.
Falling: ≥0.15 inHg decrease.
Steady: Within ±0.05 inHg.
Match if the trend matches the user-selected option.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., falling pressure indicating storms).
6. Cloud Cover
Description: User selects a percentage range via slider.
API Field:
clouds
(Current Weather API for current, Hourly Forecast API for future).Logic: Match if
clouds
(%) is within the user-defined range (e.g., 40–60%).Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., high cloud cover indicating poor visibility).
7. Wind Speed
Description: User selects a speed range in mph via slider.
API Field:
wind_spd
(Current Weather API for current, Hourly Forecast API for future).Logic:
Convert
wind_spd
from m/s to mph (mph = m/s × 2.23694).Match if
wind_spd
is within the user-defined range (e.g., 0–10 mph).
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., high winds >20 mph).
8. Wind Direction
Description: User selects preferred directions (north, northeast, etc.) via checkboxes.
API Field:
wind_dir
(Current Weather API for current, Hourly Forecast API for future).Logic:
Convert
wind_dir
(degrees) to direction:North: 0–23° or 337–360°
Northeast: 24–68°
East: 69–113°
Southeast: 114–158°
South: 159–203°
Southwest: 204–248°
West: 249–293°
Northwest: 294–336°
Match if
wind_dir
falls within any selected direction range.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., specific directions indicating unsafe conditions).
9. Wind Speed and Direction Combo
Description: User selects a wind speed range and preferred directions.
API Fields:
wind_spd
,wind_dir
(Current Weather API for current, Hourly Forecast API for future).Logic:
Convert
wind_spd
to mph andwind_dir
to direction (as above).Match if both
wind_spd
is within the user-defined range andwind_dir
is in a selected direction.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag.
10. Chance of Precipitation
Description: User selects a percentage range via slider.
API Field:
pop
(probability of precipitation, Current Weather API for current, Hourly Forecast API for future).Logic: Match if
pop
(%) is within the user-defined range (e.g., 0–20%).Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., high precipitation chance).
11. Increasing Chance of Precipitation in the Future
Description: User checks if precipitation chance is increasing.
API Fields:
pop
(Current Weather API for current, Hourly Forecast API for current and next day).Logic:
Compare
pop
for the current period topop
for the same period the next day (e.g., today’s 08:00 vs. tomorrow’s 08:00).Match if
pop
(next day) –pop
(current) ≥ 50%.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag.
12. Thunderstorms Forecasted
Description: User checks if thunderstorms are forecasted.
API Field:
weather.code
(Current Weather API for current, Hourly Forecast API for future).Logic:
Match if
weather.code
is in [200, 201, 202, 230, 231, 232, 233].
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Typically set as auto red flag due to safety concerns.
13. Future Increase in Thunderstorms
Description: User checks if thunderstorms are expected tomorrow but not today.
API Fields:
weather.code
(Current Weather API for current, Hourly Forecast API for next day).Logic:
Check if current period’s
weather.code
is not in [200, 201, 202, 230, 231, 232, 233] but the same period next day’sweather.code
is.Match if the condition is met.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag.
14. UV Index
Description: User selects a UV index range via slider.
API Field:
uv
(Current Weather API for current, Hourly Forecast API for future).Logic: Match if
uv
is within the user-defined range (e.g., 0–8).Points: User-defined (1, 2, 3, or auto red flag).
Safety: Can be set as auto red flag (e.g., high UV for safety).
15. Feeding Periods Based on Moon
Description: User checks if moonrise or moonset is within ±2 hours of the period’s time.
API Fields:
moonrise_ts
,moonset_ts
(Daily Forecast API).Logic:
Convert
moonrise_ts
andmoonset_ts
to local time.Check if either is within ±2 hours of the period’s time (08:00 for morning, 13:00 for mid-day, 18:00 for evening).
Match if the condition is met.
Points: User-defined (1, 2, 3, or auto red flag).
Safety: Unlikely to be auto red flag.
16. New Moon
Description: User checks if the moon phase is new moon.
API Field:
moon_phase
(Daily Forecast API).Logic: Match if
moon_phase
is 0–0.2.Points: User-defined (1, 2, 3, or auto red flag).
Safety: Unlikely to be auto red flag.
17. Full Moon
Description: User checks if the moon phase is full moon.
API Field:
moon_phase
(Daily Forecast API).Logic: Match if
moon_phase
is 0.8–1.0.Points: User-defined (1, 2, 3, or auto red flag).
Safety: Unlikely to be auto red flag.
Hot Fishing Criteria
When the user clicks the “Hot Fishing” button, the app saves the current weather conditions as a new criteria set, named by default as “[date/time] Hot fishing” (e.g., “7/6/25 01:40 Hot fishing”). These criteria are evaluated similarly to user-defined criteria but are based on current conditions with specific ranges or conditions.
Time of Day:
API Field:
timestamp_local
(Current Weather API).Logic: Determine the closest period (morning: 08:00, mid-day: 13:00, evening: 18:00) and store it. Match if the evaluated period matches the stored period.
Points: 1 (only included if met during hot fishing).
Temperature:
API Field:
temp
(Current Weather API).Logic: Store a ±10°F range around the current
temp
(converted to °F). Match if the evaluatedtemp
is within this range.Points: 1 (only included if met during hot fishing).
Steady Temperature:
API Fields:
temp
(Current Weather API, Historical Hourly API).Logic: Check if current
temp
is within ±3°F of the previous day’s same period. Store whether met. Match if the evaluated period’stemp
also meets this condition.Points: 1 (only included if met during hot fishing).
Warming Temperature:
API Fields:
temp
(Current Weather API, Historical Hourly API).Logic: Check if current
temp
is ≥10°F warmer than the previous day’s same period. Store whether met. Match if the evaluated period’stemp
also meets this condition.Points: 1 (only included if met during hot fishing).
Cooling Temperature:
API Fields:
temp
(Current Weather API, Historical Hourly API).Logic: Check if current
temp
is ≥10°F cooler than the previous day’s same period. Store whether met. Match if the evaluated period’stemp
also meets this condition.Points: 1 (only included if met during hot fishing).
Barometric Pressure:
API Field:
slp
(Current Weather API).Logic: Store a ±0.05 inHg range around the current
slp
(converted to inHg). Match if the evaluatedslp
is within this range.Points: 1 (only included if met during hot fishing).
Steady Barometric Pressure:
API Fields:
slp
(Current Weather API, Historical Hourly API).Logic: Check if current
slp
is within ±0.05 inHg of the previous day’s same period. Store whether met. Match if the evaluated period’sslp
also meets this condition.Points: 1 (only included if met during hot fishing).
Drop in Barometric Pressure:
API Fields:
slp
(Current Weather API, Historical Hourly API).Logic: Check if current
slp
is ≥0.15 inHg lower than the previous day’s same period. Store whether met. Match if the evaluated period’sslp
also meets this condition.Points: 1 (only included if met during hot fishing).
Rise in Barometric Pressure:
API Fields:
slp
(Current Weather API, Historical Hourly API).Logic: Check if current
slp
is ≥0.15 inHg higher than the previous day’s same period. Store whether met. Match if the evaluated period’sslp
also meets this condition.Points: 1 (only included if met during hot fishing).
Cloud Cover:
API Field:
clouds
(Current Weather API).Logic: Store a ±10% range around the current
clouds
. Match if the evaluatedclouds
is within this range.Points: 1 (only included if met during hot fishing).
Wind Speed:
API Field:
wind_spd
(Current Weather API).Logic: Store a ±3 mph range around the current
wind_spd
(converted to mph). Match if the evaluatedwind_spd
is within this range.Points: 1 (only included if met during hot fishing).
Wind Direction:
API Field:
wind_dir
(Current Weather API).Logic: Store a ±40° range around the current
wind_dir
. Ifwind_dir
< 40°, add 360° to handle negative ranges (e.g., 30° → 350–430°). Match if the evaluatedwind_dir
(adjusted if needed) is within this range.Points: 1 (only included if met during hot fishing).
Chance of Precipitation:
API Field:
pop
(Current Weather API).Logic: Store a ±10% range around the current
pop
. Match if the evaluatedpop
is within this range.Points: 1 (only included if met during hot fishing).
Increasing Chance of Precipitation in Future:
API Fields:
pop
(Current Weather API, Hourly Forecast API for next day).Logic: Check if current
pop
is ≥50% lower than the same period next day. Store whether met. Match if the evaluated period’spop
also meets this condition.Points: 1 (only included if met during hot fishing).
Thunderstorms:
API Field:
weather.code
(Current Weather API).Logic: Check if
weather.code
is in [200, 201, 202, 230, 231, 232, 233]. Store whether met. Match if the evaluated period’sweather.code
matches the stored condition.Points: 1 (only included if met during hot fishing).
Increasing Chance of Thunderstorms in Future:
API Fields:
weather.code
(Current Weather API, Hourly Forecast API for next day).Logic: Check if current
weather.code
is not in [200, 201, 202, 230, 231, 232, 233] but next day’s same period is. Store whether met. Match if the evaluated period matches this condition.Points: 1 (only included if met during hot fishing).
Moonrise or Moonset:
API Fields:
moonrise_ts
,moonset_ts
(Daily Forecast API).Logic: Check if
moonrise_ts
ormoonset_ts
is within ±2 hours of the current period’s time. Store whether met. Match if the evaluated period meets this condition.Points: 1 (only included if met during hot fishing).
Moon Phase:
API Field:
moon_phase
(Daily Forecast API).Logic: Store a ±0.15 range around the current
moon_phase
. Match if the evaluatedmoon_phase
is within this range.Points: 1 (only included if met during hot fishing).
Built-In Criteria Sets
The document references two built-in criteria sets: “Best fishing” and “Comfort and safety”. the logic can reuse the above criteria with predefined parameters and points (some variables may have 2+ points). Ensure:
Variables, Weatherbit fields, and calculations align with the above.
Some variables may have higher points (e.g., 2 or more) based on fishing success importance.
Automatic red periods (e.g., lightning, high winds) override scores to red with a “!” symbol.
Scoring and Display
Score Calculation: Sum points for matched criteria (numerator) and divide by total points (denominator). Convert to percentage: (matchedPoints / maxPoints) × 100.
Color Coding:
≥70%: Green
30–69%: Yellow
<30%: Red
Automatic Red Periods: If any criterion with
autoRedFlag: true
is met (e.g., thunderstorms, high winds), mark the period as red with a “!” symbol, regardless of score.Detailed View: When a period cell is selected, display a table with:
Weather variable name
Selected criteria (e.g., 65–80°F)
Actual Weatherbit data (e.g., 75°F)
Text color: Green if criteria met, red if not
Red exclamation mark for auto red flag variables if met
Additional Considerations
Hot Fishing Naming: Default name as “[date/time] Hot fishing” (e.g., “7/6/25 01:40 Hot fishing”). Allow user to edit.
Criteria Management: Users can create, edit, delete custom criteria sets (except “Hot Fishing” can only be deleted).
API Call Limits: Cache data for 1 hour per location. Only fetch if data is stale, location changes, or “update” is clicked.
Time Zone: Convert all times to local time using
timestamp_local
or manual UTC conversion.Internationalization: Allow user to select units (e.g., °C vs. °F) if feasible, defaulting to °F, mph, inHg.
Last updated