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

[Iss298] momm seasonal adjusted #384

Merged
merged 16 commits into from
May 16, 2023
Merged

Conversation

BiancaMorandi
Copy link
Contributor

  1. Added option to momm function to derive the seasonal adjusted mean of monthly mean speed if input seasonal_adjustment is True.
  2. added tests for momm

The seasonal adjusted mean of monthly mean is derived as for method below:
1) calculate monthly coverage
2) filter out any months with coverage lower than the input 'coverage_threshold'
3) derive the monthly mean for each calendar month (i.e. all January)
4) weighted average each monthly mean value based on the number of days in each month
(i.e. 31 days for January) - number of days for February are derived as average of actual days for the year
of the dataset. This to take into account leap years.

@BiancaMorandi BiancaMorandi added the enhancement New feature or request label Mar 21, 2023
@BiancaMorandi BiancaMorandi self-assigned this Mar 21, 2023
@BiancaMorandi BiancaMorandi added function improvement Add improvements to an existing function or feature and removed enhancement New feature or request labels Mar 21, 2023
@@ -255,6 +256,9 @@ def _filter_out_months_based_on_coverage_threshold(var_series, monthly_coverage,
:param analysis_type: Text reporting the type of analysis to report in the warning messages
e.g 'mean of monthly mean' .
:type analysis_type: str
:param seasonal_adjustment: Optional, False by default. If True, returns text messages for seasonal adjusted
Copy link
Collaborator

@stephenholleran stephenholleran May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BiancaMorandi seasonal_adjustment is not set to anything in the 'def'? But in the doc string you say it is default to false.

@stephenholleran stephenholleran merged commit 7f5ba26 into dev May 16, 2023
@stephenholleran stephenholleran deleted the iss298_momm_seasonal_adj branch May 16, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
function improvement Add improvements to an existing function or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants