File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 6
6
"""
7
7
from datetime import datetime
8
8
from itertools import product
9
- from functools import partial
10
9
from os .path import join
11
10
12
11
import numpy as np
13
12
import pandas as pd
14
- from delphi_utils import read_params , create_export_csv
13
+ from delphi_utils import read_params , create_export_csv , Smoother
15
14
16
15
from .geo import geo_map
17
16
from .pull import pull_jhu_data
18
- from .smooth import (
19
- identity ,
20
- kday_moving_average ,
21
- )
22
17
23
18
24
19
# global constants
25
- seven_day_moving_average = partial (kday_moving_average , k = 7 )
26
20
METRICS = [
27
21
"confirmed" ,
28
22
"deaths" ,
44
38
"cumulative_prop" : ("cumulative_prop" , False ),
45
39
}
46
40
SMOOTHERS_MAP = {
47
- "unsmoothed" : (identity , '' ),
48
- "seven_day_average" : (seven_day_moving_average , '7dav_' ),
41
+ "unsmoothed" : (Smoother ( " identity" ). smooth , '' ),
42
+ "seven_day_average" : (Smoother ( "moving_average" , window_length = 7 ). smooth , '7dav_' ),
49
43
}
50
44
GEO_RESOLUTIONS = [
51
45
"county" ,
You can’t perform that action at this time.
0 commit comments