AeroViz 0.1.2__py3-none-any.whl → 0.1.3b0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of AeroViz might be problematic. Click here for more details.
- AeroViz/__init__.py +4 -4
- AeroViz/config/DEFAULT_DATA.csv +1417 -0
- AeroViz/config/DEFAULT_PNSD_DATA.csv +1417 -0
- AeroViz/dataProcess/Chemistry/__init__.py +38 -38
- AeroViz/dataProcess/Chemistry/_calculate.py +15 -15
- AeroViz/dataProcess/Chemistry/_isoropia.py +69 -68
- AeroViz/dataProcess/Chemistry/_mass_volume.py +158 -158
- AeroViz/dataProcess/Chemistry/_ocec.py +109 -109
- AeroViz/dataProcess/Chemistry/_partition.py +19 -18
- AeroViz/dataProcess/Chemistry/_teom.py +8 -11
- AeroViz/dataProcess/Optical/_IMPROVE.py +40 -39
- AeroViz/dataProcess/Optical/__init__.py +35 -35
- AeroViz/dataProcess/Optical/_absorption.py +35 -35
- AeroViz/dataProcess/Optical/_extinction.py +25 -24
- AeroViz/dataProcess/Optical/_mie.py +5 -6
- AeroViz/dataProcess/Optical/_mie_sd.py +89 -90
- AeroViz/dataProcess/Optical/_scattering.py +16 -16
- AeroViz/dataProcess/SizeDistr/__init__.py +37 -37
- AeroViz/dataProcess/SizeDistr/__merge.py +159 -158
- AeroViz/dataProcess/SizeDistr/_merge.py +155 -154
- AeroViz/dataProcess/SizeDistr/_merge_v1.py +162 -161
- AeroViz/dataProcess/SizeDistr/_merge_v2.py +153 -152
- AeroViz/dataProcess/SizeDistr/_merge_v3.py +326 -326
- AeroViz/dataProcess/SizeDistr/_merge_v4.py +272 -274
- AeroViz/dataProcess/SizeDistr/_size_distr.py +51 -51
- AeroViz/dataProcess/VOC/__init__.py +7 -7
- AeroViz/dataProcess/VOC/_potential_par.py +53 -55
- AeroViz/dataProcess/VOC/voc_par.json +464 -0
- AeroViz/dataProcess/__init__.py +4 -4
- AeroViz/dataProcess/core/__init__.py +59 -58
- AeroViz/plot/__init__.py +6 -1
- AeroViz/plot/bar.py +126 -0
- AeroViz/plot/box.py +68 -0
- AeroViz/plot/distribution/distribution.py +421 -427
- AeroViz/plot/meteorology/meteorology.py +240 -292
- AeroViz/plot/optical/__init__.py +0 -1
- AeroViz/plot/optical/optical.py +230 -230
- AeroViz/plot/pie.py +198 -0
- AeroViz/plot/regression.py +210 -0
- AeroViz/plot/scatter.py +99 -0
- AeroViz/plot/templates/__init__.py +0 -3
- AeroViz/plot/templates/contour.py +25 -25
- AeroViz/plot/templates/corr_matrix.py +86 -93
- AeroViz/plot/templates/diurnal_pattern.py +24 -24
- AeroViz/plot/templates/koschmieder.py +106 -106
- AeroViz/plot/templates/metal_heatmap.py +34 -34
- AeroViz/plot/timeseries/timeseries.py +53 -60
- AeroViz/plot/utils/__init__.py +2 -1
- AeroViz/plot/utils/_color.py +57 -57
- AeroViz/plot/utils/_unit.py +48 -48
- AeroViz/plot/utils/fRH.json +390 -0
- AeroViz/plot/utils/plt_utils.py +92 -0
- AeroViz/plot/utils/sklearn_utils.py +49 -0
- AeroViz/plot/utils/units.json +84 -0
- AeroViz/plot/violin.py +79 -0
- AeroViz/process/__init__.py +15 -15
- AeroViz/process/core/DataProc.py +9 -9
- AeroViz/process/core/SizeDist.py +81 -81
- AeroViz/process/method/PyMieScatt_update.py +488 -488
- AeroViz/process/method/mie_theory.py +231 -229
- AeroViz/process/method/prop.py +40 -40
- AeroViz/process/script/AbstractDistCalc.py +103 -103
- AeroViz/process/script/Chemical.py +166 -166
- AeroViz/process/script/IMPACT.py +40 -40
- AeroViz/process/script/IMPROVE.py +152 -152
- AeroViz/process/script/Others.py +45 -45
- AeroViz/process/script/PSD.py +26 -26
- AeroViz/process/script/PSD_dry.py +69 -70
- AeroViz/process/script/retrieve_RI.py +50 -51
- AeroViz/rawDataReader/__init__.py +57 -57
- AeroViz/rawDataReader/core/__init__.py +328 -326
- AeroViz/rawDataReader/script/AE33.py +18 -18
- AeroViz/rawDataReader/script/AE43.py +20 -20
- AeroViz/rawDataReader/script/APS_3321.py +30 -30
- AeroViz/rawDataReader/script/Aurora.py +23 -23
- AeroViz/rawDataReader/script/BC1054.py +40 -40
- AeroViz/rawDataReader/script/EPA_vertical.py +9 -9
- AeroViz/rawDataReader/script/GRIMM.py +21 -21
- AeroViz/rawDataReader/script/IGAC_TH.py +67 -67
- AeroViz/rawDataReader/script/IGAC_ZM.py +59 -59
- AeroViz/rawDataReader/script/MA350.py +39 -39
- AeroViz/rawDataReader/script/NEPH.py +74 -74
- AeroViz/rawDataReader/script/OCEC_LCRES.py +21 -21
- AeroViz/rawDataReader/script/OCEC_RES.py +16 -16
- AeroViz/rawDataReader/script/SMPS_TH.py +25 -25
- AeroViz/rawDataReader/script/SMPS_aim11.py +32 -32
- AeroViz/rawDataReader/script/SMPS_genr.py +31 -31
- AeroViz/rawDataReader/script/TEOM.py +28 -28
- AeroViz/rawDataReader/script/Table.py +12 -12
- AeroViz/rawDataReader/script/VOC_TH.py +16 -16
- AeroViz/rawDataReader/script/VOC_ZM.py +28 -28
- AeroViz/rawDataReader/script/__init__.py +20 -20
- AeroViz/rawDataReader/utils/config.py +161 -161
- AeroViz/tools/database.py +65 -65
- AeroViz/tools/dataclassifier.py +106 -106
- AeroViz/tools/dataprinter.py +51 -51
- AeroViz/tools/datareader.py +38 -38
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/METADATA +5 -4
- AeroViz-0.1.3b0.dist-info/RECORD +110 -0
- AeroViz/config/__init__.py +0 -0
- AeroViz/plot/improve/__init__.py +0 -1
- AeroViz/plot/improve/improve.py +0 -240
- AeroViz/plot/optical/aethalometer.py +0 -77
- AeroViz/plot/templates/event_evolution.py +0 -65
- AeroViz/plot/templates/regression.py +0 -256
- AeroViz/plot/templates/scatter.py +0 -130
- AeroViz/plot/templates/templates.py +0 -398
- AeroViz/plot/utils/_decorator.py +0 -74
- AeroViz-0.1.2.dist-info/RECORD +0 -106
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/top_level.txt +0 -0
AeroViz/tools/dataclassifier.py
CHANGED
|
@@ -6,112 +6,112 @@ from pandas import concat, DataFrame, Series
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Classifier:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
9
|
+
Seasons = {'2020-Summer': (datetime(2020, 9, 4), datetime(2020, 9, 21, 23)),
|
|
10
|
+
'2020-Autumn': (datetime(2020, 9, 22), datetime(2020, 12, 29, 23)),
|
|
11
|
+
'2020-Winter': (datetime(2020, 12, 30), datetime(2021, 3, 25, 23)),
|
|
12
|
+
'2021-Spring': (datetime(2021, 3, 26), datetime(2021, 5, 6, 23))}
|
|
13
|
+
|
|
14
|
+
# '2021-Summer': (datetime(2021, 5, 7), datetime(2021, 10, 16, 23))
|
|
15
|
+
# '2021-Autumn': (datetime(2021, 10, 17), datetime(2021, 12, 31, 23))
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
def classify(cls, df) -> DataFrame:
|
|
19
|
+
df = cls.classify_by_diurnal(df)
|
|
20
|
+
df = cls.classify_by_state(df)
|
|
21
|
+
df = cls.classify_by_season(df)
|
|
22
|
+
df = cls.classify_by_season_state(df)
|
|
23
|
+
|
|
24
|
+
return df
|
|
25
|
+
|
|
26
|
+
@classmethod
|
|
27
|
+
def classify_by_diurnal(cls, df):
|
|
28
|
+
df['Hour'] = df.index.hour
|
|
29
|
+
df['Diurnal'] = df['Hour'].apply(cls.map_diurnal)
|
|
30
|
+
return df
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def classify_by_state(cls, df):
|
|
34
|
+
df['State'] = df.apply(cls.map_state, axis=1, clean_bound=df.Extinction.quantile(0.2),
|
|
35
|
+
event_bound=df.Extinction.quantile(0.8))
|
|
36
|
+
return df
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def classify_by_season(cls, df):
|
|
40
|
+
for season, (season_start, season_end) in cls.Seasons.items():
|
|
41
|
+
df.loc[season_start:season_end, 'Season'] = season
|
|
42
|
+
return df
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def classify_by_season_state(cls, df):
|
|
46
|
+
for _grp, _df in df.groupby('Season'):
|
|
47
|
+
df['Season_State'] = df.apply(cls.map_state, axis=1, clean_bound=_df.Extinction.quantile(0.2),
|
|
48
|
+
event_bound=_df.Extinction.quantile(0.8))
|
|
49
|
+
return df
|
|
50
|
+
|
|
51
|
+
@staticmethod
|
|
52
|
+
def map_diurnal(hour):
|
|
53
|
+
return 'Day' if 7 <= hour <= 18 else 'Night'
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def map_state(row, clean_bound, event_bound):
|
|
57
|
+
return 'Event' if row['Extinction'] >= event_bound else 'Clean' if row[
|
|
58
|
+
'Extinction'] < clean_bound else 'Transition'
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
class DataClassifier(Classifier):
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
62
|
+
"""
|
|
63
|
+
Notes
|
|
64
|
+
-----
|
|
65
|
+
First, create group then return the selected statistic method.
|
|
66
|
+
If the 'by' does not exist in DataFrame, import the default DataFrame to help to sign the different group.
|
|
67
|
+
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
def __new__(cls,
|
|
71
|
+
df: DataFrame,
|
|
72
|
+
by: Literal["Hour", "State", "Season", "Season_state"] | str,
|
|
73
|
+
df_support: DataFrame | Series = None,
|
|
74
|
+
cut_bins: Sequence = None,
|
|
75
|
+
qcut: int = None,
|
|
76
|
+
labels: list[str] = None
|
|
77
|
+
) -> tuple[DataFrame, DataFrame]:
|
|
78
|
+
group = cls._group_data(df, by, df_support, cut_bins, qcut, labels)
|
|
79
|
+
return cls._compute_statistics(df, group)
|
|
80
|
+
|
|
81
|
+
@staticmethod
|
|
82
|
+
def _group_data(df, by, df_support, cut_bins, qcut, labels):
|
|
83
|
+
if by not in df.columns:
|
|
84
|
+
if df_support is None:
|
|
85
|
+
raise KeyError(f"Column '{by}' does not exist in DataFrame."
|
|
86
|
+
f"Please provide a support DataFrame or Series to help classify.")
|
|
87
|
+
else:
|
|
88
|
+
df = concat([df, Classifier.classify(df_support.copy())[by]], axis=1)
|
|
89
|
+
|
|
90
|
+
if cut_bins is not None:
|
|
91
|
+
df[f'{by}_cut'] = pd.cut(df.loc[:, f'{by}'], cut_bins,
|
|
92
|
+
labels=labels or (cut_bins + (cut_bins[1] - cut_bins[0]) / 2)[:-1])
|
|
93
|
+
return df.groupby(f'{by}_cut', observed=False)
|
|
94
|
+
|
|
95
|
+
elif qcut is not None:
|
|
96
|
+
df[f'{by}_qcut'] = pd.qcut(df.loc[:, f'{by}'], q=qcut, labels=labels)
|
|
97
|
+
return df.groupby(f'{by}_qcut', observed=False)
|
|
98
|
+
|
|
99
|
+
else:
|
|
100
|
+
if by == 'State':
|
|
101
|
+
return df.groupby(by)
|
|
102
|
+
|
|
103
|
+
elif by == 'Season':
|
|
104
|
+
return df.groupby(pd.Categorical(df['Season'], categories=['2020-Summer', '2020-Autumn', '2020-Winter',
|
|
105
|
+
'2021-Spring']), observed=False)
|
|
106
|
+
else:
|
|
107
|
+
return df.groupby(by, observed=False)
|
|
108
|
+
|
|
109
|
+
@staticmethod
|
|
110
|
+
def _compute_statistics(df, group):
|
|
111
|
+
mean_df = group.mean(numeric_only=True)
|
|
112
|
+
mean_df.loc['Total'] = df.mean(numeric_only=True)
|
|
113
|
+
|
|
114
|
+
std_df = group.std(numeric_only=True)
|
|
115
|
+
std_df.loc['Total'] = df.std(numeric_only=True)
|
|
116
|
+
|
|
117
|
+
return mean_df, std_df
|
AeroViz/tools/dataprinter.py
CHANGED
|
@@ -5,54 +5,54 @@ from tabulate import tabulate
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def data_table(df: DataFrame,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
8
|
+
items: list[str] | str = None,
|
|
9
|
+
times: list[datetime | Timestamp | str] = None,
|
|
10
|
+
):
|
|
11
|
+
"""
|
|
12
|
+
This function cuts the DataFrame based on the given time periods and calculates the mean and standard deviation
|
|
13
|
+
of the specified items for each period.
|
|
14
|
+
|
|
15
|
+
Parameters
|
|
16
|
+
----------
|
|
17
|
+
df : pd.DataFrame
|
|
18
|
+
The DataFrame to be processed. It should have a DateTime index.
|
|
19
|
+
items : list[str] | str, optional
|
|
20
|
+
The columns of the DataFrame to be processed. It can be a list of column names or a single column name.
|
|
21
|
+
By default, it is ['NO', 'NO2', 'NOx'].
|
|
22
|
+
times : list[str] | str, optional
|
|
23
|
+
The time periods to cut the DataFrame. It can be a list of time strings or a single time string.
|
|
24
|
+
Each time string should be in the format of 'YYYY-MM-DD'. By default, it is ['2024-03-21', '2024-04-30'].
|
|
25
|
+
|
|
26
|
+
Returns
|
|
27
|
+
-------
|
|
28
|
+
None
|
|
29
|
+
This function doesn't return any value. It prints out a table showing the mean and standard deviation
|
|
30
|
+
of the specified items for each time period.
|
|
31
|
+
"""
|
|
32
|
+
items = [items] if isinstance(items, str) else items
|
|
33
|
+
times = [times] if isinstance(times, str) else times
|
|
34
|
+
times = list(map(Timestamp, times))
|
|
35
|
+
|
|
36
|
+
times.sort()
|
|
37
|
+
|
|
38
|
+
results = []
|
|
39
|
+
periods = []
|
|
40
|
+
for i in range(len(times) + 1):
|
|
41
|
+
if i == 0:
|
|
42
|
+
df_period = df.loc[df.index <= times[i], items]
|
|
43
|
+
period_label = f'Before {times[i].date()}'
|
|
44
|
+
elif i == len(times):
|
|
45
|
+
df_period = df.loc[df.index > times[i - 1], items]
|
|
46
|
+
period_label = f'After {times[i - 1].date()}'
|
|
47
|
+
else:
|
|
48
|
+
df_period = df.loc[(df.index > times[i - 1]) & (df.index <= times[i]), items]
|
|
49
|
+
period_label = f'{times[i - 1].date()} to {times[i].date()}'
|
|
50
|
+
|
|
51
|
+
mean, std = df_period.mean().round(2).to_numpy(), df_period.std().round(2).to_numpy()
|
|
52
|
+
|
|
53
|
+
results.append([f'{m} ± {s}' for m, s in zip(mean, std)])
|
|
54
|
+
periods.append(period_label)
|
|
55
|
+
|
|
56
|
+
result = DataFrame(results, columns=items, index=periods)
|
|
57
|
+
|
|
58
|
+
print(tabulate(result, headers='keys', tablefmt='fancy_grid'))
|
AeroViz/tools/datareader.py
CHANGED
|
@@ -5,62 +5,62 @@ from pandas import read_csv, read_json, read_excel, DataFrame
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class FileHandler(ABC):
|
|
8
|
-
|
|
8
|
+
""" An abstract base class for reading data files with different extensions (.csv, .json, .xls, .xlsx). """
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
@abstractmethod
|
|
11
|
+
def read_data(self, file_path: Path) -> DataFrame:
|
|
12
|
+
pass
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class CsvFileHandler(FileHandler):
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
def read_data(self, file_path: Path) -> DataFrame:
|
|
17
|
+
return read_csv(file_path, na_values=('-', 'E', 'F', '#', '*'),
|
|
18
|
+
parse_dates=['Time'], index_col='Time', low_memory=False)
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class JsonFileHandler(FileHandler):
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
def read_data(self, file_path: Path) -> DataFrame:
|
|
23
|
+
return read_json(file_path)
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class ExcelFileHandler(FileHandler):
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
def read_data(self, file_path: Path) -> DataFrame:
|
|
28
|
+
return read_excel(file_path, parse_dates=['Time'])
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class DataReaderFactory:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
_handler_mapping = {
|
|
33
|
+
'.csv': CsvFileHandler(),
|
|
34
|
+
'.json': JsonFileHandler(),
|
|
35
|
+
'.xls': ExcelFileHandler(),
|
|
36
|
+
'.xlsx': ExcelFileHandler(),
|
|
37
|
+
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
@staticmethod
|
|
40
|
+
def create_handler(file_extension: str) -> FileHandler:
|
|
41
|
+
reader_class = DataReaderFactory._handler_mapping.get(file_extension)
|
|
42
|
+
if reader_class is None:
|
|
43
|
+
raise ValueError(f"Unsupported file format: {file_extension}")
|
|
44
|
+
return reader_class
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
class DataReader:
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
"""
|
|
49
|
+
A class for reading data files with different extensions (.csv, .json, .xls, .xlsx).
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
Parameters
|
|
52
|
+
----------
|
|
53
|
+
filename (Path | str): The name of the file to be read or the Path of the file.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
Returns
|
|
56
|
+
-------
|
|
57
|
+
pandas.DataFrame: data
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
Examples
|
|
60
|
+
--------
|
|
61
|
+
>>> psd = DataReader(Path(...))
|
|
62
|
+
"""
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
def __new__(cls, file_path: Path | str) -> DataFrame:
|
|
65
|
+
file_path = Path(file_path)
|
|
66
|
+
return DataReaderFactory.create_handler(file_path.suffix.lower()).read_data(file_path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: AeroViz
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3b0
|
|
4
4
|
Summary: Aerosol science
|
|
5
5
|
Home-page: https://github.com/Alex870521/AeroViz
|
|
6
6
|
Author: alex
|
|
@@ -43,9 +43,10 @@ Requires-Dist: tabulate
|
|
|
43
43
|
|
|
44
44
|
## <div align="center">Key Features</div>
|
|
45
45
|
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
46
|
+
* Data Reading: Supports reading multiple aerosol data formats.
|
|
47
|
+
* Data Visualization: Offers various charts and graphs, including time series plots, distribution plots, and correlation
|
|
48
|
+
matrices.
|
|
49
|
+
* Data Processing: Includes multiple data processing tools, such as linear regression and Mie theory calculations.
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
## <div align="center">Installation</div>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
AeroViz/__init__.py,sha256=OY2qGnYhTjN0lHgafcXXnlTMZQZ6Z__QaYhREaHZGxY,415
|
|
2
|
+
AeroViz/config/DEFAULT_DATA.csv,sha256=bgk3nBKS8GGIZxGUahT64eRmkQcVqlYEe9-cv2709EM,2248525
|
|
3
|
+
AeroViz/config/DEFAULT_PNSD_DATA.csv,sha256=imLvLA80oYwo_jzXZtlQn5hZ76d47HUIlK2jp0tZPrg,2636511
|
|
4
|
+
AeroViz/dataProcess/__init__.py,sha256=O4HctAIQ9V4z-wexk_yQdQgPY5o8LDXknOIhEZlHQC8,191
|
|
5
|
+
AeroViz/dataProcess/Chemistry/__init__.py,sha256=on9wPgNmN7F4Q3sozitgIvYyCyUIXj65VtV7dRfDBr4,1996
|
|
6
|
+
AeroViz/dataProcess/Chemistry/_calculate.py,sha256=q7ojTFPok0vg8k_1PMECNdP5CPanR9NWQ4Rx5iTcHew,599
|
|
7
|
+
AeroViz/dataProcess/Chemistry/_isoropia.py,sha256=yb1toNYJhRt8TZuDH1JYS9zlV7fzyAHfEDk_2HCrsU0,3265
|
|
8
|
+
AeroViz/dataProcess/Chemistry/_mass_volume.py,sha256=_6LNGX_1hmJq0Ldtn_JMANZa95C_8FK6srjQrIo3V6Q,5487
|
|
9
|
+
AeroViz/dataProcess/Chemistry/_ocec.py,sha256=KctX-oRr6CwzrLpz4PnjNAbOTkgSAlZr8rwhNp02iPY,5959
|
|
10
|
+
AeroViz/dataProcess/Chemistry/_partition.py,sha256=tKhb6BJns46UiUlEq6Zq7ahYnvUJ_whY3tWE54C3bqU,1023
|
|
11
|
+
AeroViz/dataProcess/Chemistry/_teom.py,sha256=i5BfSNqU1005Wo3z5WfD3PipZuvN3gjOv-MlUT8Da9Y,462
|
|
12
|
+
AeroViz/dataProcess/Optical/_IMPROVE.py,sha256=ihD8bmoRIKOG73iT2PG3xy4TEYaQ9S-dIn2kU2x49vE,1700
|
|
13
|
+
AeroViz/dataProcess/Optical/__init__.py,sha256=-ypBJitvmV3dvK7rNpkuTTgqqG9VxnJGQEhFN9lYQio,1396
|
|
14
|
+
AeroViz/dataProcess/Optical/_absorption.py,sha256=rQRHDgJfatK2yRiKJ25bT9PZzFzUtH11Ma3T-d_95QA,1560
|
|
15
|
+
AeroViz/dataProcess/Optical/_extinction.py,sha256=yJ6zuGsTNn4UN6b2ISjq0i_WsPuYriERcZZ6cEEr5gY,985
|
|
16
|
+
AeroViz/dataProcess/Optical/_mie.py,sha256=mMfkFV4z2LRi4UYkjaa6xbcIAyrRTKC-psZsHwenU0k,384
|
|
17
|
+
AeroViz/dataProcess/Optical/_mie_sd.py,sha256=cbWSorfG-l92csaXsZJ7005f8ij2H_VZopIhNPCwx70,4812
|
|
18
|
+
AeroViz/dataProcess/Optical/_scattering.py,sha256=9UMpu-yDGvtLhFSDfkVT_T7KSvTpSw8vCYqGSUSY5B0,664
|
|
19
|
+
AeroViz/dataProcess/SizeDistr/__init__.py,sha256=qnKzRJPD0srLOTcraRblp_A4lqSmv7Dl9N2wczvkMX4,2196
|
|
20
|
+
AeroViz/dataProcess/SizeDistr/__merge.py,sha256=A-ZmduUA9a0nVM8szhG1AWhsfUPu2UhGIaqFLcmg7Lk,9422
|
|
21
|
+
AeroViz/dataProcess/SizeDistr/_merge.py,sha256=TjsS6mnQywHWHzdzysw2G10FW8KBLP7s93FprKIysCI,9178
|
|
22
|
+
AeroViz/dataProcess/SizeDistr/_merge_v1.py,sha256=5WQlZVI6EIyq9eVljgr7yQ1Q4HYcuq1yhsbtRwEsdT4,9528
|
|
23
|
+
AeroViz/dataProcess/SizeDistr/_merge_v2.py,sha256=9vQjRWSF9bBP6bIsLIIjyytg4Pgu3MMufYINehXi_Yw,9048
|
|
24
|
+
AeroViz/dataProcess/SizeDistr/_merge_v3.py,sha256=SDos_2uOWbiaS2GYoZxHZF40O3RvDTVO0C9qir1_LK4,18748
|
|
25
|
+
AeroViz/dataProcess/SizeDistr/_merge_v4.py,sha256=ROAx_o68evHnmjneWORZMyA0HBKsUzglwmPwaJFiq0E,16227
|
|
26
|
+
AeroViz/dataProcess/SizeDistr/_size_distr.py,sha256=o5fTwLH7j9j5129e3uciSJrOR8AGCN3tkAyGffoPENg,3127
|
|
27
|
+
AeroViz/dataProcess/VOC/__init__.py,sha256=7cMLlQxYqO_fploj5JozN5r5wfjJ3abpQO1ZyKCtIg0,296
|
|
28
|
+
AeroViz/dataProcess/VOC/_potential_par.py,sha256=H_9EoDpbz6dZ193FuJEsoaOQ7jCDz9LqPqhEce_nOFQ,3065
|
|
29
|
+
AeroViz/dataProcess/VOC/voc_par.json,sha256=cJF0ynKCMccIruHp7YJ19fZmXZV6ASlLszCJCqduDJQ,7077
|
|
30
|
+
AeroViz/dataProcess/core/__init__.py,sha256=3Lr0rzW_Y44D0Gu9_I_c047zBHfDS6pqxMTJPb9J6kw,2803
|
|
31
|
+
AeroViz/plot/__init__.py,sha256=8spN9T7m7P6iLc2iIbJpVSafgKFhppOnY2lTxQgx430,343
|
|
32
|
+
AeroViz/plot/bar.py,sha256=cSPKJLWGifCzICCZVPcbZtrDrea_AStlwSli9-b-lsA,4246
|
|
33
|
+
AeroViz/plot/box.py,sha256=0V5AECxfNS0IWQBmvCkp0ejOWY7rP2wwnowtgZQd-HY,2106
|
|
34
|
+
AeroViz/plot/pie.py,sha256=PVOqc_tAMlfjojTggP7HPL9Nk3ImigETo_EUFD6K2BY,7421
|
|
35
|
+
AeroViz/plot/regression.py,sha256=twQMRpqqvHqAyYqXTWiR1wVmQ98zlcLZDYVKYBP3dOk,7225
|
|
36
|
+
AeroViz/plot/scatter.py,sha256=1PBgP-Leu1rPEF846q1G80AxtWi92S4BfwatsuW7TT0,3773
|
|
37
|
+
AeroViz/plot/violin.py,sha256=cYoMj0wbaC-NGGs9PVN1ahpUiRGoZJg_WhVRVvmnOxY,2678
|
|
38
|
+
AeroViz/plot/distribution/__init__.py,sha256=nhbIegWczkuEfWsE7-2jfF0dnpmPDzJJzjq8Fuh6q5k,28
|
|
39
|
+
AeroViz/plot/distribution/distribution.py,sha256=sAjqtqKavFwQqI8PGPFnpvZFSU-w2UKjcTTC5L91f4E,20595
|
|
40
|
+
AeroViz/plot/meteorology/__init__.py,sha256=hhGfQE3IUzS3Eaju_nO7LomPPHJnd-zAAZZweXOXs2M,27
|
|
41
|
+
AeroViz/plot/meteorology/meteorology.py,sha256=h5KiaReatt238FXZyGjP9CAMkzTF1aVjOaFAGq3CKRY,11197
|
|
42
|
+
AeroViz/plot/optical/__init__.py,sha256=5S2WPq8NouPYgc46c1XBveSL8Cxs3w8wNYN7vWIpB-s,23
|
|
43
|
+
AeroViz/plot/optical/optical.py,sha256=iONBHQXIfr1oYPFOd7maMxr4pwsuCiLgbFTZFVOrV4k,13718
|
|
44
|
+
AeroViz/plot/templates/__init__.py,sha256=ryBJzbPFit5YG4PSNii1UgNqvIPDQP6AAAki3D91y6I,174
|
|
45
|
+
AeroViz/plot/templates/contour.py,sha256=fAM6Wn_EmENQM1IW6KJpwmLva6D9P2dEAaK6cNQBtdQ,1678
|
|
46
|
+
AeroViz/plot/templates/corr_matrix.py,sha256=VeiwBwmg_v6LYslJvhSqweiLBheR3vGfPYxrtHoqJRI,3507
|
|
47
|
+
AeroViz/plot/templates/diurnal_pattern.py,sha256=_rWC6euNTI6tn_TNkeOGSSHj-h1GXrrJVQBp-ys8mvI,1337
|
|
48
|
+
AeroViz/plot/templates/koschmieder.py,sha256=1EIvTyf6rI7u3ZwMSkH_rgP-cLquCAgdXtmjoj8Y5U0,6113
|
|
49
|
+
AeroViz/plot/templates/metal_heatmap.py,sha256=XrIKPNSIDcHOIWHf185QSC0-k6Ai9nP1LcGUg2r-QnQ,1972
|
|
50
|
+
AeroViz/plot/timeseries/__init__.py,sha256=veqmkZy6j_BikD3JxBZp9cptOsaf6oP503xaDK8nn_o,26
|
|
51
|
+
AeroViz/plot/timeseries/timeseries.py,sha256=jknWMmYgn5GpkrBxxbvL8MAHhPON-WUirAXAIr7E1Zk,10169
|
|
52
|
+
AeroViz/plot/utils/__init__.py,sha256=sxp3nfUnyVIIXYd-F874gEHkhQiDnMPDE1nJ_Z98270,104
|
|
53
|
+
AeroViz/plot/utils/_color.py,sha256=Vhjo-v4UWFME1JbbBR_Ro8FRj6dHB2O5Sud_9lpdu_U,2797
|
|
54
|
+
AeroViz/plot/utils/_unit.py,sha256=Abum0WDnq08DzkSoxkKvBc0mYKo8izIDmgduPo9Q27A,1671
|
|
55
|
+
AeroViz/plot/utils/fRH.json,sha256=t-2ux4TLOYAB-4jJ72LSM4jv1jk9XkaxKYNMDepMHIg,6038
|
|
56
|
+
AeroViz/plot/utils/plt_utils.py,sha256=AVcXccCaOZAGqQB3oSu9lXbr70RJo-zdNL5Vl0jpSkA,3433
|
|
57
|
+
AeroViz/plot/utils/sklearn_utils.py,sha256=hKFfkVkYLRxkIDKvO9COHXwhjD_UWqQigdT3mDToni4,2098
|
|
58
|
+
AeroViz/plot/utils/units.json,sha256=OSNUAJdXx1GqE1_9afHdCNQteK69imv7aYFfm0F-SxI,2803
|
|
59
|
+
AeroViz/process/__init__.py,sha256=nX7y9YkKPoTDy5PzNzszWErpvYSMaGlVG0n7gELv02s,1212
|
|
60
|
+
AeroViz/process/core/DataProc.py,sha256=6MBDcHyQmVU16Z0oDo0GItvhU5f7fWLXFMGqUyoW1eQ,419
|
|
61
|
+
AeroViz/process/core/SizeDist.py,sha256=V6CpxTRfWjsZ8GwIEOqyKJ8_qcz7dO0ZmfHQvR6SgW4,2097
|
|
62
|
+
AeroViz/process/core/__init__.py,sha256=WmVSFDx97urX0WPA8dtRVoQF04IDaU-IgxHK979-kM8,98
|
|
63
|
+
AeroViz/process/method/PyMieScatt_update.py,sha256=g3vlzATjzYSYZd3LwmwxEmdkpo4cHJ3KY4rePY4jwZk,21065
|
|
64
|
+
AeroViz/process/method/__init__.py,sha256=_yxoNAbbI82ORhrVsi-6x8vPnWQNHavjZUXy-ioZ2wg,123
|
|
65
|
+
AeroViz/process/method/mie_theory.py,sha256=EC3SsUaq5G3SdQyPMQxcosbEokqAgJw-4Gz6moJiOsk,8666
|
|
66
|
+
AeroViz/process/method/prop.py,sha256=7f18SOkkLgDiY_g1c1We8g-3WDJJIFcxkfR4F99jUgc,1845
|
|
67
|
+
AeroViz/process/script/AbstractDistCalc.py,sha256=wLJrvh6lOMpIbk7f4yDdC2bX5NyKNYP-g_N5ytppYgo,5350
|
|
68
|
+
AeroViz/process/script/Chemical.py,sha256=Oo25Ey80St9C-1eV3oxb0mmHOKr8HaT3E0zvCd56_Ag,6329
|
|
69
|
+
AeroViz/process/script/IMPACT.py,sha256=Zz1GRQLJopNQGw5qUTdWl7Zxy_CBnFBsL1B-CCemaDQ,1520
|
|
70
|
+
AeroViz/process/script/IMPROVE.py,sha256=5FNl33S_785J7CsSue_CvZP58TWevpwGr2ePQM6qScw,5709
|
|
71
|
+
AeroViz/process/script/Others.py,sha256=fw_vaExiL7wJqsCW-qfKfFIh5EB-hLwKcgdQSG1Kh1Y,2323
|
|
72
|
+
AeroViz/process/script/PSD.py,sha256=unSvyHp1RqgQecY-Lab-wRFGP2u45blSO4NCNTaxcRQ,3721
|
|
73
|
+
AeroViz/process/script/PSD_dry.py,sha256=P9rSQVA78jHXrY2bDiC1iQvG0w9Js8QiBNfooPOXzfY,3269
|
|
74
|
+
AeroViz/process/script/__init__.py,sha256=QExUHHK79oiwZXvk8u00P8rLwWhGOc1fpZY2Fx8Vkxg,188
|
|
75
|
+
AeroViz/process/script/retrieve_RI.py,sha256=9OQJU1w6VzVqKz00e9GdWswRAnaETe_1meAHp5N_s54,2711
|
|
76
|
+
AeroViz/rawDataReader/__init__.py,sha256=s59cI9xmeaQYHgdt95Mp69492-9JyUXnrMx2poyxRZ8,2018
|
|
77
|
+
AeroViz/rawDataReader/core/__init__.py,sha256=j9Y2CgeZ-wI7ksIcrD_j0H7GEn23THPYJZMD0GfT4FI,14382
|
|
78
|
+
AeroViz/rawDataReader/script/AE33.py,sha256=4H0ChbHuVD85ljqLlywc3dg6SSTtHHfrKXpR3LHi-6E,1194
|
|
79
|
+
AeroViz/rawDataReader/script/AE43.py,sha256=C_d849i1QMUShbLzV4FE_a64cE3yho4frF7wveKVJrg,1070
|
|
80
|
+
AeroViz/rawDataReader/script/APS_3321.py,sha256=VXpuDl0bDVC98B2EhEAcUj5IOxk2GmHk2cCh1X-V9Zs,1702
|
|
81
|
+
AeroViz/rawDataReader/script/Aurora.py,sha256=5gEF2i7lS7qGx5gShJsi6IV5AdhzfQGSkHbPIDc6Heo,1282
|
|
82
|
+
AeroViz/rawDataReader/script/BC1054.py,sha256=-ytaqamDEEyfL3CCCKDX-IEKtY2uWGLxgBPLohsUYRM,1693
|
|
83
|
+
AeroViz/rawDataReader/script/EPA_vertical.py,sha256=AMIMfF6dPNJHmyyKlFdsklAQ3QGoKbqdpoNPXRp5aak,646
|
|
84
|
+
AeroViz/rawDataReader/script/GRIMM.py,sha256=OABKGbN6AFlvr4J-Bj-wZkIXfCdxeYuz798O3Wlwknc,1206
|
|
85
|
+
AeroViz/rawDataReader/script/IGAC_TH.py,sha256=F38BUgH84_MaM1Etbcu2k_uBceya7VfdQ6K2eaVybPk,3568
|
|
86
|
+
AeroViz/rawDataReader/script/IGAC_ZM.py,sha256=AU_LM9iy_rEztPpF97pOTpCY-bwx9NT98VCUk6OAVNA,3130
|
|
87
|
+
AeroViz/rawDataReader/script/MA350.py,sha256=gte1gxrr7p0Id-7xkXr5HF8FGT77qP5_EjVaW3mGVgE,1620
|
|
88
|
+
AeroViz/rawDataReader/script/NEPH.py,sha256=N_pXpTd3fKzfd0nDEqCozZOST6b5sDmuJrTPy2-Ptlw,3197
|
|
89
|
+
AeroViz/rawDataReader/script/OCEC_LCRES.py,sha256=wOKaCm6qnD5Mkda2msrpalX7HQLsLbmtXp0fqqWy2N8,1278
|
|
90
|
+
AeroViz/rawDataReader/script/OCEC_RES.py,sha256=V-Gj2DSJZac_GfY_4_k5vYdrByt8IPWiElDWFfQwTG4,836
|
|
91
|
+
AeroViz/rawDataReader/script/SMPS_TH.py,sha256=BwRNMrdF8dinJ65mMughJemFmT8063TW60ml-WrH8Kw,1474
|
|
92
|
+
AeroViz/rawDataReader/script/SMPS_aim11.py,sha256=efQG1xjpeCFGyCzUTUZo8V0WqcjIoeljHeduX05-WBc,1640
|
|
93
|
+
AeroViz/rawDataReader/script/SMPS_genr.py,sha256=G7tfMdiBIG1Xao8Il3Ke19dh9z-LMb2gW505Yjk2RxE,1617
|
|
94
|
+
AeroViz/rawDataReader/script/TEOM.py,sha256=xEfJzSCaZCF_cWAoGId-InBhkgs4TaVOwq_7jurdKrg,1733
|
|
95
|
+
AeroViz/rawDataReader/script/Table.py,sha256=ExOywhYFkq59pdXZ2ipALz3nNPJQlwzH28Fqgp45Mio,799
|
|
96
|
+
AeroViz/rawDataReader/script/VOC_TH.py,sha256=FEPUIG2YGa5BydPGqocKMGCa3uv-EQav5MDqxCD568A,1181
|
|
97
|
+
AeroViz/rawDataReader/script/VOC_ZM.py,sha256=IAS7k4ImKexfGmlE2jo94YzONJY71jATknIkhs-Uc24,1722
|
|
98
|
+
AeroViz/rawDataReader/script/__init__.py,sha256=AzzDB2eOgAwltrmAxpeJP0FKYV5kzK2wHuyWLUwDbyc,306
|
|
99
|
+
AeroViz/rawDataReader/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
|
+
AeroViz/rawDataReader/utils/config.py,sha256=jLYA-AEPkszO97PsIGfUJMbcYd1nQWlpIXMt5TVLC0E,3809
|
|
101
|
+
AeroViz/tools/__init__.py,sha256=tPUmCI9Fi1LgE-QSVnzan5jRdYQBIENH9PRDXB_DhTw,109
|
|
102
|
+
AeroViz/tools/database.py,sha256=jmCeyXiZ-Dun8Cs3ig3GU3JexxCpXEcXE0t-goYefSo,3388
|
|
103
|
+
AeroViz/tools/dataclassifier.py,sha256=_wpv0PlZ5EGkcNqHxfFtdEsYvHP5FVE8sMZXikhm_YE,4492
|
|
104
|
+
AeroViz/tools/dataprinter.py,sha256=Jq2Yztpa9YCOeLDVTrRs7PhSdNIPhEAexVj1YSuJ7hY,2249
|
|
105
|
+
AeroViz/tools/datareader.py,sha256=TI2EglMDlsfovSfg9vLh7iZaGHpMgt8xytdMTo6UDbU,1926
|
|
106
|
+
AeroViz-0.1.3b0.dist-info/LICENSE,sha256=E-679GpGGkp3irmtuJXiT7R4cNUA4cmsH6Q7QUgPf5U,1069
|
|
107
|
+
AeroViz-0.1.3b0.dist-info/METADATA,sha256=2IamO_fg3R0ubr_Chig9evrMpK_TJknHS9RGpOk6UqM,5325
|
|
108
|
+
AeroViz-0.1.3b0.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
|
|
109
|
+
AeroViz-0.1.3b0.dist-info/top_level.txt,sha256=BYsmTst_o4FZOKRP1XIvIMlN6mMTTXNfnSToL2_nVbQ,8
|
|
110
|
+
AeroViz-0.1.3b0.dist-info/RECORD,,
|
AeroViz/config/__init__.py
DELETED
|
File without changes
|
AeroViz/plot/improve/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .improve import *
|