Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add Historical Weather Data Comparison #148

Closed
AITMAR-TAFE opened this issue Oct 19, 2024 · 5 comments
Closed

Feature: Add Historical Weather Data Comparison #148

AITMAR-TAFE opened this issue Oct 19, 2024 · 5 comments
Assignees

Comments

@AITMAR-TAFE
Copy link
Contributor

AITMAR-TAFE commented Oct 19, 2024

Description

I propose adding a feature that allows users to view weather data from exactly one year ago alongside current weather conditions. Related to PR nr #152 .
This feature will improve user experience by allowing to compare weather data from one year ago.

Use Cases

Users can see how current weather conditions compare to those from the same time last year, helping them understand if this weather is typical for this time of year or abnormal.

Proposed Implementation

  1. Fetch Historical Weather Data from the API: Create a new function in api.py, e.g., get_uv_history and ocean_information_history, to retrieve historical weather data for the same date last year using a weather API.
  2. Integrate Historical Data Retrieval: Within the run function, after obtaining the current weather data, call the new get_uv_history and ocean_information_history, function to get the historical data.
  3. Combine Current and Historical Data: Modify the gather_data function to combine the current and historical data into a single output structure.
  4. Update Output Functions: Adjust the helper.py functions (e.g., print_outputs, print_ocean_data) to include historical data in the output format, allowing users to see both current and last year's weather conditions. Also created a new function print_historical_data.
  5. Testing: Create tests to validate the new functionality
  6. Update documentation

Example

Current Output Example

Location: Perth

      .-``'.
    .`   .`
_.-'     '._

UV index: 6.8
Wave Height: 5.2
Wave Direction: 250.0
Wave Period: 10.8

Proposed Feature Output Example

Location: Perth

      .-``'.
    .`   .`
_.-'     '._

Current Weather:
UV index: 6.8
Wave Height: 5.2
Wave Direction: 250.0
Wave Period: 10.8

Historical Weather (1 Year Ago):
UV index: 5.2
Wave Height: 4.1
Wave Direction: 230.0
Wave Period: 9.5

Additional Notes

I believe this feature will offer users a valuable comparison of weather conditions from the same time last year, helping them assess whether the current weather is typical for this time of year. Incorporating historical weather data for surf conditions is essential as it allows surfers to understand seasonal variability in wave height and ocean temperatures, which can significantly impact their experience. For example, if surfers see that last year’s wave height on the same date was much higher, they can adjust their expectations and plans accordingly. This feature also provides critical context for discussions around climate change, as users can observe trends, such as warming ocean temperatures, that may affect surf conditions over time. Ultimately, this not only enhances decision-making but also fosters community engagement, encouraging surfers to be more aware of environmental changes and their implications for the sport.

Copy link
Contributor

👋 Hi! Thanks for opening your first issue!
• We're excited to see your contribution.
• If you find this project helpful, please consider giving it a star ⭐
• Your support means a lot to us! 😊

@AITMAR-TAFE
Copy link
Contributor Author

Hi, I would like to work on this, could @ryansurf assing this to me? Many thanks 🙏

@AITMAR-TAFE
Copy link
Contributor Author

@all-contributors please add @AITMAR-TAFE for code

Copy link
Contributor

@AITMAR-TAFE

I've put up a pull request to add @AITMAR-TAFE! 🎉

@ryansurf
Copy link
Owner

@AITMAR-TAFE this is super cool, I'd use this myself. Looking forward to reviewing your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants