AeroViz 0.1.3b0__py3-none-any.whl → 0.1.5__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.

Files changed (85) hide show
  1. AeroViz/__init__.py +5 -3
  2. AeroViz/{config → data}/DEFAULT_DATA.csv +1 -1
  3. AeroViz/dataProcess/Chemistry/__init__.py +28 -27
  4. AeroViz/dataProcess/Chemistry/_isoropia.py +11 -11
  5. AeroViz/dataProcess/Chemistry/_mass_volume.py +15 -18
  6. AeroViz/dataProcess/Chemistry/_ocec.py +21 -46
  7. AeroViz/dataProcess/Chemistry/_teom.py +2 -1
  8. AeroViz/dataProcess/Chemistry/isrpia.cnf +21 -0
  9. AeroViz/dataProcess/Chemistry/isrpia2.exe +0 -0
  10. AeroViz/dataProcess/Optical/Angstrom_exponent.py +20 -0
  11. AeroViz/dataProcess/Optical/_IMPROVE.py +13 -15
  12. AeroViz/dataProcess/Optical/__init__.py +15 -30
  13. AeroViz/dataProcess/Optical/_absorption.py +21 -47
  14. AeroViz/dataProcess/Optical/_extinction.py +20 -15
  15. AeroViz/dataProcess/Optical/_mie.py +0 -1
  16. AeroViz/dataProcess/Optical/_scattering.py +19 -20
  17. AeroViz/dataProcess/Optical/fRH.pkl +0 -0
  18. AeroViz/dataProcess/SizeDistr/__init__.py +7 -7
  19. AeroViz/dataProcess/SizeDistr/_merge.py +2 -2
  20. AeroViz/dataProcess/SizeDistr/_merge_v1.py +2 -2
  21. AeroViz/dataProcess/SizeDistr/_merge_v2.py +2 -2
  22. AeroViz/dataProcess/SizeDistr/_merge_v3.py +1 -1
  23. AeroViz/dataProcess/SizeDistr/_merge_v4.py +1 -1
  24. AeroViz/dataProcess/VOC/__init__.py +4 -9
  25. AeroViz/dataProcess/VOC/_potential_par.py +71 -37
  26. AeroViz/dataProcess/VOC/{voc_par.json → support_voc.json} +321 -339
  27. AeroViz/dataProcess/__init__.py +28 -6
  28. AeroViz/dataProcess/core/__init__.py +10 -17
  29. AeroViz/plot/__init__.py +1 -1
  30. AeroViz/plot/box.py +2 -1
  31. AeroViz/plot/optical/optical.py +4 -4
  32. AeroViz/plot/regression.py +25 -39
  33. AeroViz/plot/scatter.py +68 -2
  34. AeroViz/plot/templates/__init__.py +2 -1
  35. AeroViz/plot/templates/ammonium_rich.py +34 -0
  36. AeroViz/plot/templates/diurnal_pattern.py +11 -9
  37. AeroViz/plot/templates/koschmieder.py +51 -115
  38. AeroViz/plot/templates/metal_heatmap.py +115 -17
  39. AeroViz/plot/timeseries/__init__.py +1 -0
  40. AeroViz/plot/timeseries/template.py +47 -0
  41. AeroViz/plot/timeseries/timeseries.py +275 -208
  42. AeroViz/plot/utils/plt_utils.py +2 -2
  43. AeroViz/plot/utils/units.json +5 -0
  44. AeroViz/plot/violin.py +9 -8
  45. AeroViz/process/__init__.py +2 -2
  46. AeroViz/process/script/AbstractDistCalc.py +1 -1
  47. AeroViz/process/script/Chemical.py +5 -4
  48. AeroViz/process/script/Others.py +1 -1
  49. AeroViz/rawDataReader/__init__.py +66 -22
  50. AeroViz/rawDataReader/{utils/config.py → config/supported_instruments.py} +33 -54
  51. AeroViz/rawDataReader/core/__init__.py +116 -231
  52. AeroViz/rawDataReader/script/AE33.py +12 -13
  53. AeroViz/rawDataReader/script/AE43.py +10 -13
  54. AeroViz/rawDataReader/script/APS_3321.py +8 -8
  55. AeroViz/rawDataReader/script/Aurora.py +21 -19
  56. AeroViz/rawDataReader/script/BC1054.py +13 -17
  57. AeroViz/rawDataReader/script/EPA_vertical.py +36 -8
  58. AeroViz/rawDataReader/script/GRIMM.py +6 -13
  59. AeroViz/rawDataReader/script/{IGAC_ZM.py → IGAC.py} +18 -18
  60. AeroViz/rawDataReader/script/MA350.py +9 -16
  61. AeroViz/rawDataReader/script/Minion.py +103 -0
  62. AeroViz/rawDataReader/script/NEPH.py +28 -38
  63. AeroViz/rawDataReader/script/SMPS_TH.py +6 -6
  64. AeroViz/rawDataReader/script/SMPS_aim11.py +8 -8
  65. AeroViz/rawDataReader/script/SMPS_genr.py +8 -8
  66. AeroViz/rawDataReader/script/Sunset_OCEC.py +66 -0
  67. AeroViz/rawDataReader/script/TEOM.py +10 -8
  68. AeroViz/rawDataReader/script/Table.py +9 -10
  69. AeroViz/rawDataReader/script/VOC.py +33 -0
  70. AeroViz/rawDataReader/script/__init__.py +10 -12
  71. AeroViz/tools/database.py +7 -9
  72. AeroViz/tools/datareader.py +3 -3
  73. {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.5.dist-info}/METADATA +1 -1
  74. AeroViz-0.1.5.dist-info/RECORD +114 -0
  75. AeroViz/rawDataReader/script/IGAC_TH.py +0 -104
  76. AeroViz/rawDataReader/script/OCEC_LCRES.py +0 -34
  77. AeroViz/rawDataReader/script/OCEC_RES.py +0 -28
  78. AeroViz/rawDataReader/script/VOC_TH.py +0 -30
  79. AeroViz/rawDataReader/script/VOC_ZM.py +0 -37
  80. AeroViz-0.1.3b0.dist-info/RECORD +0 -110
  81. /AeroViz/{config → data}/DEFAULT_PNSD_DATA.csv +0 -0
  82. /AeroViz/rawDataReader/{utils → config}/__init__.py +0 -0
  83. {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.5.dist-info}/LICENSE +0 -0
  84. {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.5.dist-info}/WHEEL +0 -0
  85. {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,66 @@
1
+ from pandas import to_datetime, read_csv
2
+
3
+ from AeroViz.rawDataReader.core import AbstractReader
4
+
5
+
6
+ class Reader(AbstractReader):
7
+ nam = 'Sunset_OCEC'
8
+
9
+ def _raw_reader(self, file):
10
+ with open(file, 'r', encoding='utf-8', errors='ignore') as f:
11
+ _df = read_csv(f, skiprows=3, nrows=25)
12
+
13
+ _df['Start Date/Time'] = _df['Start Date/Time'].str.strip()
14
+ _df['time'] = to_datetime(_df['Start Date/Time'], format='%m/%d/%Y %I:%M:%S %p', errors='coerce')
15
+ _df = _df.set_index('time')
16
+ _df.index = _df.index.round('1h')
17
+
18
+ _df = _df.rename(columns={
19
+ 'Thermal/Optical OC (ugC/LCm^3)': 'Thermal_OC',
20
+ 'Thermal/Optical EC (ugC/LCm^3)': 'Thermal_EC',
21
+ 'OC=TC-BC (ugC/LCm^3)': 'Optical_OC',
22
+ 'BC (ugC/LCm^3)': 'Optical_EC',
23
+ 'TC (ugC/LCm^3)': 'TC',
24
+
25
+ 'OC ugC/m^3 (Thermal/Optical)': 'Thermal_OC',
26
+ 'EC ugC/m^3 (Thermal/Optical)': 'Thermal_EC',
27
+ 'OC by diff ugC (TC-OptEC)': 'Optical_OC',
28
+ 'OptEC ugC/m^3': 'Optical_EC',
29
+ 'TC ugC/m^3': 'TC',
30
+
31
+ 'Sample Volume Local Condition Actual m^3': 'Sample_Volume',
32
+
33
+ 'OCPk1-ug C': 'OC1_raw',
34
+ 'OCPk2-ug C': 'OC2_raw',
35
+ 'OCPk3-ug C': 'OC3_raw',
36
+ 'OCPk4-ug C': 'OC4_raw',
37
+ 'ECPk1-ug C': 'EC1_raw',
38
+ 'ECPk2-ug C': 'EC2_raw',
39
+ 'ECPk3-ug C': 'EC3_raw',
40
+ 'ECPk4-ug C': 'EC4_raw',
41
+ 'ECPk5-ug C': 'EC5_raw',
42
+ })
43
+
44
+ _df = _df[['Thermal_OC', 'Optical_OC', 'Thermal_EC', 'Optical_EC', 'TC', 'Sample_Volume',
45
+ 'OC1_raw', 'OC2_raw', 'OC3_raw', 'OC4_raw', 'EC1_raw', 'EC2_raw', 'EC3_raw', 'EC4_raw',
46
+ 'EC5_raw']]
47
+
48
+ return _df.loc[~_df.index.duplicated() & _df.index.notna()]
49
+
50
+ # QC data
51
+ def _QC(self, _df):
52
+ import numpy as np
53
+
54
+ _df = _df.where(_df > 0)
55
+
56
+ thresholds = {
57
+ 'Thermal_OC': 0.3,
58
+ 'Optical_OC': 0.3,
59
+ 'Thermal_EC': 0.015,
60
+ 'Optical_EC': 0.015
61
+ }
62
+
63
+ for col, thresh in thresholds.items():
64
+ _df.loc[_df[col] <= thresh, col] = np.nan
65
+
66
+ return _df
@@ -6,8 +6,8 @@ from AeroViz.rawDataReader.core import AbstractReader
6
6
  class Reader(AbstractReader):
7
7
  nam = 'TEOM'
8
8
 
9
- def _raw_reader(self, _file):
10
- with open(_file, 'r', encoding='utf-8', errors='ignore') as f:
9
+ def _raw_reader(self, file):
10
+ with open(file, 'r', encoding='utf-8', errors='ignore') as f:
11
11
  _df = read_csv(f, skiprows=3, index_col=False)
12
12
 
13
13
  _df = _df.rename(columns={'Time Stamp': 'time',
@@ -27,18 +27,20 @@ class Reader(AbstractReader):
27
27
 
28
28
  _df = _df.where(_df['status'] < 1e-7)
29
29
 
30
- return _df[['PM_NV', 'PM_Total', 'noise', ]]
30
+ _df = _df[['PM_NV', 'PM_Total', 'noise', ]]
31
31
 
32
- ## QC data
32
+ return _df.loc[~_df.index.duplicated() & _df.index.notna()]
33
+
34
+ # QC data
33
35
  def _QC(self, _df):
34
36
 
35
37
  _df_idx = _df.index.copy()
36
38
 
37
- ## remove negative value
38
- _df = _df.where(_df.noise < 0.01)[['PM_NV', 'PM_Total']].mask((_df < 0).copy())
39
+ # remove negative value
40
+ _df = _df.where(_df.noise < 0.01)[['PM_NV', 'PM_Total']].mask((_df <= 0).copy())
39
41
 
40
- ## QC data in 1 hr
41
- ## remove data where size < 8 in 1-hr
42
+ # QC data in 1 hr
43
+ # remove data where size < 8 in 1-hr
42
44
  for _key in ['PM_Total', 'PM_NV']:
43
45
  _size = _df[_key].dropna().resample('1h').size().reindex(_df_idx).ffill().copy()
44
46
  _df[_key] = _df[_key].mask(_size < 8)
@@ -1,6 +1,5 @@
1
1
  # read meteorological data from google sheet
2
2
 
3
-
4
3
  from pandas import read_csv, to_datetime
5
4
 
6
5
  from AeroViz.rawDataReader.core import AbstractReader
@@ -9,20 +8,20 @@ from AeroViz.rawDataReader.core import AbstractReader
9
8
  class Reader(AbstractReader):
10
9
  nam = 'Table'
11
10
 
12
- def _raw_reader(self, _file):
13
- self.meta['freq'] = self._oth_set.get('data_freq') or self.meta['freq']
14
-
15
- with (_file).open('r', encoding='utf-8-sig', errors='ignore') as f:
11
+ def _raw_reader(self, file):
12
+ with file.open('r', encoding='utf-8-sig', errors='ignore') as f:
16
13
  _df = read_csv(f, low_memory=False, index_col=0)
17
14
 
18
- _df.index = to_datetime(_df.index, errors='coerce', format=self._oth_set.get('date_format') or 'mixed')
15
+ _df.index = to_datetime(_df.index, errors='coerce')
19
16
  _df.index.name = 'time'
20
17
 
21
18
  _df.columns = _df.keys().str.strip(' ')
22
19
 
23
- _df = _df.loc[_df.index.dropna()].copy()
24
-
25
- return _df.loc[~_df.index.duplicated()]
20
+ return _df.loc[~_df.index.duplicated() & _df.index.notna()]
26
21
 
27
22
  def _QC(self, _df):
28
- return _df
23
+ # remove negative value
24
+ _df = _df.mask((_df < 0).copy())
25
+
26
+ # QC data in 6h
27
+ return _df.resample('6h').apply(self.basic_QC).resample(self.meta.get("freq")).mean()
@@ -0,0 +1,33 @@
1
+ from pandas import read_csv
2
+
3
+ from AeroViz.rawDataReader.core import AbstractReader
4
+
5
+
6
+ class Reader(AbstractReader):
7
+ nam = 'VOC'
8
+
9
+ def _raw_reader(self, file):
10
+ with file.open('r', encoding='utf-8-sig', errors='ignore') as f:
11
+ _df = read_csv(f, parse_dates=True, index_col=0, na_values=('-', 'N.D.'))
12
+
13
+ _df.columns = _df.keys().str.strip(' ')
14
+ _df.index.name = 'time'
15
+
16
+ support_voc = set(self.meta["key"])
17
+
18
+ valid_keys = [key for key in _df.keys() if key in support_voc]
19
+ invalid_keys = [key for key in _df.keys() if key not in support_voc]
20
+
21
+ if invalid_keys:
22
+ self.logger.warning(f'{invalid_keys} are not supported keys.')
23
+ print(f'\n\t\t{invalid_keys} are not supported keys.'
24
+ f'\n\t\tPlease check the\033[91m support_voc.md\033[0m file to use the correct name.')
25
+
26
+ if valid_keys:
27
+ return _df[valid_keys].loc[~_df.index.duplicated() & _df.index.notna()]
28
+ else:
29
+ self.logger.warning("沒有找到匹配的鍵。返回原始DataFrame並移除含NaN的行。")
30
+ return _df.loc[~_df.index.duplicated() & _df.index.notna()]
31
+
32
+ def _QC(self, _df):
33
+ return _df
@@ -1,22 +1,20 @@
1
1
  __all__ = [
2
2
  'NEPH',
3
3
  'Aurora',
4
- 'Table',
5
- 'EPA_vertical',
6
- 'APS_3321',
7
4
  'SMPS_TH',
5
+ 'SMPS_genr',
6
+ 'SMPS_aim11',
7
+ 'APS_3321',
8
+ 'GRIMM',
8
9
  'AE33',
9
10
  'AE43',
10
11
  'BC1054',
11
12
  'MA350',
12
13
  'TEOM',
13
- 'OCEC_RES',
14
- 'OCEC_LCRES',
15
- 'IGAC_TH',
16
- 'IGAC_ZM',
17
- 'VOC_TH',
18
- 'VOC_ZM',
19
- 'SMPS_genr',
20
- 'SMPS_aim11',
21
- 'GRIMM'
14
+ 'Sunset_OCEC',
15
+ 'IGAC',
16
+ 'VOC',
17
+ 'Table',
18
+ 'EPA_vertical',
19
+ 'Minion'
22
20
  ]
AeroViz/tools/database.py CHANGED
@@ -45,7 +45,8 @@ def load_dataset_by_url(dataset_name: Literal["Tunghai", "Taipei"] = "Tunghai")
45
45
  response = requests.get(url)
46
46
 
47
47
  if response.status_code == 200:
48
- return read_csv(StringIO(response.text), parse_dates=['Time'], index_col='Time')
48
+ return read_csv(StringIO(response.text), na_values=('E', 'F', '-', '_', '#', '*'), index_col=0,
49
+ parse_dates=True, low_memory=False)
49
50
  else:
50
51
  print(f"Failed to download file: {response.status_code}")
51
52
  print(response.text) # Print the response text for debugging
@@ -54,7 +55,7 @@ def load_dataset_by_url(dataset_name: Literal["Tunghai", "Taipei"] = "Tunghai")
54
55
 
55
56
  def load_dataset_local(dataset_name: Literal["Tunghai", "Taipei", "PNSD"] = "Tunghai") -> DataFrame:
56
57
  base_dir = Path(__file__).resolve().parent.parent
57
- config_dir = base_dir / 'config'
58
+ config_dir = base_dir / 'data'
58
59
 
59
60
  dataset_paths = {
60
61
  "Tunghai": config_dir / 'DEFAULT_DATA.csv',
@@ -70,7 +71,8 @@ def load_dataset_local(dataset_name: Literal["Tunghai", "Taipei", "PNSD"] = "Tun
70
71
  if not file_path.exists():
71
72
  raise FileNotFoundError(f"The file {file_path} does not exist.")
72
73
 
73
- return read_csv(file_path, parse_dates=['Time'], index_col='Time', na_values=('-', 'E', 'F'), low_memory=False)
74
+ return read_csv(file_path, na_values=('E', 'F', '-', '_', '#', '*'), index_col=0, parse_dates=True,
75
+ low_memory=False)
74
76
 
75
77
 
76
78
  class DataBase:
@@ -79,15 +81,11 @@ class DataBase:
79
81
  if file_path is not None:
80
82
  file_path = Path(file_path)
81
83
  if file_path.exists():
82
- return read_csv(file_path, parse_dates=['Time'], index_col='Time', na_values=('-', 'E', 'F'),
84
+ return read_csv(file_path, na_values=('E', 'F', '-', '_', '#', '*'), index_col=0, parse_dates=True,
83
85
  low_memory=False)
84
86
 
85
87
  if load_data ^ load_PSD:
86
- if load_data:
87
- return load_dataset_local("Tunghai")
88
-
89
- elif load_PSD:
90
- return load_dataset_local("PNSD")
88
+ return load_dataset_local("Tunghai") if load_data else load_dataset_local("PNSD")
91
89
 
92
90
  else:
93
91
  raise ValueError("Exactly one of 'load_data' or 'load_PSD' must be True.")
@@ -14,8 +14,8 @@ class FileHandler(ABC):
14
14
 
15
15
  class CsvFileHandler(FileHandler):
16
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)
17
+ return read_csv(file_path, na_values=('E', 'F', '-', '_', '#', '*'), index_col=0, parse_dates=True,
18
+ low_memory=False)
19
19
 
20
20
 
21
21
  class JsonFileHandler(FileHandler):
@@ -25,7 +25,7 @@ class JsonFileHandler(FileHandler):
25
25
 
26
26
  class ExcelFileHandler(FileHandler):
27
27
  def read_data(self, file_path: Path) -> DataFrame:
28
- return read_excel(file_path, parse_dates=['Time'])
28
+ return read_excel(file_path, index_col=0, parse_dates=True, )
29
29
 
30
30
 
31
31
  class DataReaderFactory:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AeroViz
3
- Version: 0.1.3b0
3
+ Version: 0.1.5
4
4
  Summary: Aerosol science
5
5
  Home-page: https://github.com/Alex870521/AeroViz
6
6
  Author: alex
@@ -0,0 +1,114 @@
1
+ AeroViz/__init__.py,sha256=A5W6SR71uY_eW44Sh-Yk6blJQ_G1aHrkSzeP2YTPQc4,371
2
+ AeroViz/data/DEFAULT_DATA.csv,sha256=eeeyeh8vSLKkE5tAF0TYnUNOyQIH98VA41bJaAP204Y,2248526
3
+ AeroViz/data/DEFAULT_PNSD_DATA.csv,sha256=imLvLA80oYwo_jzXZtlQn5hZ76d47HUIlK2jp0tZPrg,2636511
4
+ AeroViz/dataProcess/__init__.py,sha256=D3rTVUiGfs_daGuaotVtbijOgLAp6HaRWchj-zoEnHw,828
5
+ AeroViz/dataProcess/Chemistry/__init__.py,sha256=fyyomjxkQcUNWDx4R5jPrHafAftN-v2liUZii9OlaiU,2058
6
+ AeroViz/dataProcess/Chemistry/_calculate.py,sha256=q7ojTFPok0vg8k_1PMECNdP5CPanR9NWQ4Rx5iTcHew,599
7
+ AeroViz/dataProcess/Chemistry/_isoropia.py,sha256=3wp_FXdN230awlStMbctutwld4oot9WaAVXETGd6PSs,3255
8
+ AeroViz/dataProcess/Chemistry/_mass_volume.py,sha256=oqFjRDYZ1om0_kG4g8XNi2QpUPcHsukpnWKydQoNEVg,5394
9
+ AeroViz/dataProcess/Chemistry/_ocec.py,sha256=gqDTs9rOyr0RXdN1Nrxv6Vgvh04IFgHwk4gAJUgZZGc,5437
10
+ AeroViz/dataProcess/Chemistry/_partition.py,sha256=tKhb6BJns46UiUlEq6Zq7ahYnvUJ_whY3tWE54C3bqU,1023
11
+ AeroViz/dataProcess/Chemistry/_teom.py,sha256=IiM-TrifWpQLTbKllG-4k4c3mvQulfcmjswWu6muCXA,486
12
+ AeroViz/dataProcess/Chemistry/isrpia.cnf,sha256=iWXTqsOZFmNrJxAI9nYuilZ9h6ru1icdPFVim7YKc_k,566
13
+ AeroViz/dataProcess/Chemistry/isrpia2.exe,sha256=xFYPTXHSjl_-atmVcTmqqOkTZgUn1p8h-kFMcoGMIQw,1560032
14
+ AeroViz/dataProcess/Optical/Angstrom_exponent.py,sha256=KSGM_hf2oUPsLoLuhYSRDK5zdekwce9KgqhzRnf2Y4g,706
15
+ AeroViz/dataProcess/Optical/_IMPROVE.py,sha256=_u0uyKC9ZQpB4uLMx3x8Dm5hSUMcdGUifBcC2bGaM9c,1675
16
+ AeroViz/dataProcess/Optical/__init__.py,sha256=h_IYhaum0DhK7Qw6lWFvjAEv7uAqLVVPEwU0V4hJnX4,1371
17
+ AeroViz/dataProcess/Optical/_absorption.py,sha256=pYHIoj_R23wKvxR4acUqqU9JXKY40wgsFvZH78rETrY,1234
18
+ AeroViz/dataProcess/Optical/_extinction.py,sha256=anUemSXmLvJi2CSxqTYgQCgUW4pSUqgZ0q0xZ4zs0zY,1189
19
+ AeroViz/dataProcess/Optical/_mie.py,sha256=K_I8NqRStCdExRVxq2rX5hQdvYmfKuu9JCkNtL1OzfE,352
20
+ AeroViz/dataProcess/Optical/_mie_sd.py,sha256=cbWSorfG-l92csaXsZJ7005f8ij2H_VZopIhNPCwx70,4812
21
+ AeroViz/dataProcess/Optical/_scattering.py,sha256=w5xXXOfafV9a_dXY60YqTyzFDZppjBJeLcKl5PeCQe4,961
22
+ AeroViz/dataProcess/Optical/fRH.pkl,sha256=PhJ-BYTaUDjl2Lp5Wz0zeiLQCzrsNdq8nP7Jd1BXyXE,4528
23
+ AeroViz/dataProcess/SizeDistr/__init__.py,sha256=PJVAdb-v1q8h38JXIkpVcr6q4mg38V26sk4xD_2Mjlc,2186
24
+ AeroViz/dataProcess/SizeDistr/__merge.py,sha256=A-ZmduUA9a0nVM8szhG1AWhsfUPu2UhGIaqFLcmg7Lk,9422
25
+ AeroViz/dataProcess/SizeDistr/_merge.py,sha256=CyZwUc2M4lL-OE74e8mXq41nC6X0LJTAV8TwpO3fS2o,9176
26
+ AeroViz/dataProcess/SizeDistr/_merge_v1.py,sha256=6Anb8DszoatK66tc9ccA6ZApbqtL7pZRPR5TKHj-Tbs,9526
27
+ AeroViz/dataProcess/SizeDistr/_merge_v2.py,sha256=8OzUKw7hTg-yuQBipuFKgBS_7c7zbApN_BNr00G8q9c,9046
28
+ AeroViz/dataProcess/SizeDistr/_merge_v3.py,sha256=HN2ARFmeWOawOWRPPv_pHEGBBZNgXVbH4dDTxcN7rdY,18749
29
+ AeroViz/dataProcess/SizeDistr/_merge_v4.py,sha256=b8RVAievGIOLrmJHJXRsKXQ1tkMkm6rx43S7XAfeXE4,16228
30
+ AeroViz/dataProcess/SizeDistr/_size_distr.py,sha256=o5fTwLH7j9j5129e3uciSJrOR8AGCN3tkAyGffoPENg,3127
31
+ AeroViz/dataProcess/VOC/__init__.py,sha256=8GNP0RMymTkJXK18pSgfLHqrKPWboN-3x1_Ke4UrI44,259
32
+ AeroViz/dataProcess/VOC/_potential_par.py,sha256=h3rVdvtBvC6xHa_ZG4Oq5eXezeSZtHNy6T6I40maIcM,3863
33
+ AeroViz/dataProcess/VOC/support_voc.json,sha256=tMYp_NERqhSriVRE2NavXh33CQ5CnsbJHtmMFlE5q_E,6804
34
+ AeroViz/dataProcess/core/__init__.py,sha256=FhGwqlP8ZwXZQS0LjH0YOz2g1Q2yJniUUhRZ_jDOQ6k,2707
35
+ AeroViz/plot/__init__.py,sha256=BxoarxAeDHNdMHizS1bCTwV8NEuUCgeDB75GbSEsNWs,394
36
+ AeroViz/plot/bar.py,sha256=cSPKJLWGifCzICCZVPcbZtrDrea_AStlwSli9-b-lsA,4246
37
+ AeroViz/plot/box.py,sha256=8zDd8jYndSv5f0P1lFeX0m7VWYh9okYgJTClh2Lj7Dg,2115
38
+ AeroViz/plot/pie.py,sha256=PVOqc_tAMlfjojTggP7HPL9Nk3ImigETo_EUFD6K2BY,7421
39
+ AeroViz/plot/regression.py,sha256=mTCNrCAYvH7QjIb_5WlltCR1Kqwer1anpGEsxmO2S3o,7292
40
+ AeroViz/plot/scatter.py,sha256=2Q_Um7Ai-pym2nUiMk6tY_zEXwbKE-BpkgrDkMyNbYA,6293
41
+ AeroViz/plot/violin.py,sha256=pU2Z2yTWocEtImmCAmbtn0WvXtUOrnCGOdDOrLxjooU,2689
42
+ AeroViz/plot/distribution/__init__.py,sha256=nhbIegWczkuEfWsE7-2jfF0dnpmPDzJJzjq8Fuh6q5k,28
43
+ AeroViz/plot/distribution/distribution.py,sha256=sAjqtqKavFwQqI8PGPFnpvZFSU-w2UKjcTTC5L91f4E,20595
44
+ AeroViz/plot/meteorology/__init__.py,sha256=hhGfQE3IUzS3Eaju_nO7LomPPHJnd-zAAZZweXOXs2M,27
45
+ AeroViz/plot/meteorology/meteorology.py,sha256=h5KiaReatt238FXZyGjP9CAMkzTF1aVjOaFAGq3CKRY,11197
46
+ AeroViz/plot/optical/__init__.py,sha256=5S2WPq8NouPYgc46c1XBveSL8Cxs3w8wNYN7vWIpB-s,23
47
+ AeroViz/plot/optical/optical.py,sha256=xtuJuaonyM4OUS_BlkxKudLZKEteCS1u_-Svj3lQPco,13728
48
+ AeroViz/plot/templates/__init__.py,sha256=VXp73SqrSF1WR9WYhHpHtbhvFcb1CR4JeV1tPQvCEEI,227
49
+ AeroViz/plot/templates/ammonium_rich.py,sha256=a46rfwhSZ3LIj71LxdOnklAFyy6Xe_VQ-kh1komnZ5g,1225
50
+ AeroViz/plot/templates/contour.py,sha256=fAM6Wn_EmENQM1IW6KJpwmLva6D9P2dEAaK6cNQBtdQ,1678
51
+ AeroViz/plot/templates/corr_matrix.py,sha256=VeiwBwmg_v6LYslJvhSqweiLBheR3vGfPYxrtHoqJRI,3507
52
+ AeroViz/plot/templates/diurnal_pattern.py,sha256=Vp8nDzSe95ppZBCDkFXnpUEh1cb-19yDS3H0qftoPaw,1434
53
+ AeroViz/plot/templates/koschmieder.py,sha256=XmsYn8x9lu2BgN1FXKHb0quZdRw7Etv1dT5LBjBB0ok,3199
54
+ AeroViz/plot/templates/metal_heatmap.py,sha256=ngqJFiOPCoExPKv-lHvgB1XCSr9fF_jSKmx4VwjUUXQ,4961
55
+ AeroViz/plot/timeseries/__init__.py,sha256=LQ_aE32pvp5ouC--BRa0NwSJ48DYO3rFaOt4AKGmn_s,50
56
+ AeroViz/plot/timeseries/template.py,sha256=E9dxaH_Y5QxnkIHK4VH59IVShnf4i1-TT_QE4NqVqrQ,1460
57
+ AeroViz/plot/timeseries/timeseries.py,sha256=EitNnjleHj3Qu1PBHClWNi9kCgJ8tULGZSicS3xhoZw,14626
58
+ AeroViz/plot/utils/__init__.py,sha256=sxp3nfUnyVIIXYd-F874gEHkhQiDnMPDE1nJ_Z98270,104
59
+ AeroViz/plot/utils/_color.py,sha256=Vhjo-v4UWFME1JbbBR_Ro8FRj6dHB2O5Sud_9lpdu_U,2797
60
+ AeroViz/plot/utils/_unit.py,sha256=Abum0WDnq08DzkSoxkKvBc0mYKo8izIDmgduPo9Q27A,1671
61
+ AeroViz/plot/utils/fRH.json,sha256=t-2ux4TLOYAB-4jJ72LSM4jv1jk9XkaxKYNMDepMHIg,6038
62
+ AeroViz/plot/utils/plt_utils.py,sha256=7Au3r2-7AZQmzrO2OfcyTFomJRLHgu1Npb7wxQqUvzY,3438
63
+ AeroViz/plot/utils/sklearn_utils.py,sha256=hKFfkVkYLRxkIDKvO9COHXwhjD_UWqQigdT3mDToni4,2098
64
+ AeroViz/plot/utils/units.json,sha256=JKcqvLA6dkc8REV_NhX85Jl9LA4iAZxzw9RJp6JTla0,2965
65
+ AeroViz/process/__init__.py,sha256=vqXO0vhowU9yNW5tnVYNg3ceBxLt96PgBNkZ2KUxKXw,1309
66
+ AeroViz/process/core/DataProc.py,sha256=6MBDcHyQmVU16Z0oDo0GItvhU5f7fWLXFMGqUyoW1eQ,419
67
+ AeroViz/process/core/SizeDist.py,sha256=V6CpxTRfWjsZ8GwIEOqyKJ8_qcz7dO0ZmfHQvR6SgW4,2097
68
+ AeroViz/process/core/__init__.py,sha256=WmVSFDx97urX0WPA8dtRVoQF04IDaU-IgxHK979-kM8,98
69
+ AeroViz/process/method/PyMieScatt_update.py,sha256=g3vlzATjzYSYZd3LwmwxEmdkpo4cHJ3KY4rePY4jwZk,21065
70
+ AeroViz/process/method/__init__.py,sha256=_yxoNAbbI82ORhrVsi-6x8vPnWQNHavjZUXy-ioZ2wg,123
71
+ AeroViz/process/method/mie_theory.py,sha256=EC3SsUaq5G3SdQyPMQxcosbEokqAgJw-4Gz6moJiOsk,8666
72
+ AeroViz/process/method/prop.py,sha256=7f18SOkkLgDiY_g1c1We8g-3WDJJIFcxkfR4F99jUgc,1845
73
+ AeroViz/process/script/AbstractDistCalc.py,sha256=wXF7OA634m_i-Y79lU4THj0c0yZx5NUtLNvORH1FWZg,5351
74
+ AeroViz/process/script/Chemical.py,sha256=jjBIdILe0fO5Rqidb4pg3CP6qmMLqFvst-ZSz8mbb7Q,6413
75
+ AeroViz/process/script/IMPACT.py,sha256=Zz1GRQLJopNQGw5qUTdWl7Zxy_CBnFBsL1B-CCemaDQ,1520
76
+ AeroViz/process/script/IMPROVE.py,sha256=5FNl33S_785J7CsSue_CvZP58TWevpwGr2ePQM6qScw,5709
77
+ AeroViz/process/script/Others.py,sha256=TOtSKVZ9Z-zX1LFfE4p36H0hMjfmyyQw_Xaeq8HgMBk,2325
78
+ AeroViz/process/script/PSD.py,sha256=unSvyHp1RqgQecY-Lab-wRFGP2u45blSO4NCNTaxcRQ,3721
79
+ AeroViz/process/script/PSD_dry.py,sha256=P9rSQVA78jHXrY2bDiC1iQvG0w9Js8QiBNfooPOXzfY,3269
80
+ AeroViz/process/script/__init__.py,sha256=QExUHHK79oiwZXvk8u00P8rLwWhGOc1fpZY2Fx8Vkxg,188
81
+ AeroViz/process/script/retrieve_RI.py,sha256=9OQJU1w6VzVqKz00e9GdWswRAnaETe_1meAHp5N_s54,2711
82
+ AeroViz/rawDataReader/__init__.py,sha256=kouHFAxpbl1Xj4IBHqzNaUExuxi0vF6E59l8Oryktq8,3949
83
+ AeroViz/rawDataReader/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
+ AeroViz/rawDataReader/config/supported_instruments.py,sha256=6pkjRqe4Kz5023N_C3OQhX3u9PtfCpeUWhIA25Y9T7Q,4273
85
+ AeroViz/rawDataReader/core/__init__.py,sha256=oBxig1HXb2QmWAdPwEKXx8L_85LPX8CPbBc0eYR9C5A,10744
86
+ AeroViz/rawDataReader/script/AE33.py,sha256=Nv0u0w_V50sDjsLh17ZkNT6A75TjIo2A1O6GYc4zkJg,1107
87
+ AeroViz/rawDataReader/script/AE43.py,sha256=Qq9MdiBKzDuKIEFPanmn7wUbkN5VeSTG6Dopw8i0W90,1056
88
+ AeroViz/rawDataReader/script/APS_3321.py,sha256=bzE-GaElXU16xmOgYr6tR62GAtgRZxYqRrifbBRuU-0,1694
89
+ AeroViz/rawDataReader/script/Aurora.py,sha256=b0XPs2gc_2UJj4HnOHwW7o255zsCPp459goaDqeAJA8,1387
90
+ AeroViz/rawDataReader/script/BC1054.py,sha256=QGU1SRDoE8e4yNXUX7RsdK5zh72fNd2Q0IpUy7iFzrg,1486
91
+ AeroViz/rawDataReader/script/EPA_vertical.py,sha256=MpcbOzbigivsuldCxzn_B6POtQMzahGQhM_sWRDVP9s,1669
92
+ AeroViz/rawDataReader/script/GRIMM.py,sha256=s2z3aNfpPOd_07Zl8jbHa7CxsR2EjrtoZw_HRjR5ykc,946
93
+ AeroViz/rawDataReader/script/IGAC.py,sha256=BDhmsNy02EvLY0sd75NM6XvLGVTEJlxyQQbprhdFQmU,2948
94
+ AeroViz/rawDataReader/script/MA350.py,sha256=YRY19R2V6nyHMpGMOLVZvK8_41OCCzdTcSnuZR-OJsU,1287
95
+ AeroViz/rawDataReader/script/Minion.py,sha256=c128ZkkxakV6wq1k9NtEq0scdi1mh9Mn0jhQFqz_uVE,3940
96
+ AeroViz/rawDataReader/script/NEPH.py,sha256=OSDtbJ4sujtnf3bzbENXoyJwA-RIeOkPXNCEJ6MvkPQ,2735
97
+ AeroViz/rawDataReader/script/SMPS_TH.py,sha256=4bK8Fm4oyPZd3GegcOttjamZf2ZqcL_uaKUXdNtv8_0,1468
98
+ AeroViz/rawDataReader/script/SMPS_aim11.py,sha256=lop0YmOOWde9vBKMXV3nqwqZOxR-OCbYZznSf4QWuGs,1632
99
+ AeroViz/rawDataReader/script/SMPS_genr.py,sha256=rR5OO63ozDKMcGBfNFPi_f49gUbx2qYx60GMSgC9jwg,1609
100
+ AeroViz/rawDataReader/script/Sunset_OCEC.py,sha256=6TyosCQ4N6jB9yZOfAJHwiIvkTYCwCThmMbhe4_U9a0,2322
101
+ AeroViz/rawDataReader/script/TEOM.py,sha256=Hx_DDnvGSfSl9cgIVmuf4VmphaFfNCY60mqPWoLmNvw,1796
102
+ AeroViz/rawDataReader/script/Table.py,sha256=othBoQSFVcjfWX0_Q4y8BkjCBc5CihvC6LyrhyJWywk,800
103
+ AeroViz/rawDataReader/script/VOC.py,sha256=JaMDojHrLJL37LdcNzI7xEGy_592feokJw9kedcwL20,1273
104
+ AeroViz/rawDataReader/script/__init__.py,sha256=UndjtWjvJHMma7WtArL5sF9UHiQsanx5sT2otQDqzng,270
105
+ AeroViz/tools/__init__.py,sha256=tPUmCI9Fi1LgE-QSVnzan5jRdYQBIENH9PRDXB_DhTw,109
106
+ AeroViz/tools/database.py,sha256=05VzjJyhlRrhsZdhfFQ__7CxGm4MdFekLjz3_Is5h9U,3430
107
+ AeroViz/tools/dataclassifier.py,sha256=_wpv0PlZ5EGkcNqHxfFtdEsYvHP5FVE8sMZXikhm_YE,4492
108
+ AeroViz/tools/dataprinter.py,sha256=Jq2Yztpa9YCOeLDVTrRs7PhSdNIPhEAexVj1YSuJ7hY,2249
109
+ AeroViz/tools/datareader.py,sha256=iTQ0U8hdNMjCdbiH7EiKW10UEoxzxXRHc4s5_1IikJo,1933
110
+ AeroViz-0.1.5.dist-info/LICENSE,sha256=E-679GpGGkp3irmtuJXiT7R4cNUA4cmsH6Q7QUgPf5U,1069
111
+ AeroViz-0.1.5.dist-info/METADATA,sha256=dWKrlnoRNBUgRf5R1VvNVcurimM8slO9RMiSeEw6Stk,5323
112
+ AeroViz-0.1.5.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
113
+ AeroViz-0.1.5.dist-info/top_level.txt,sha256=BYsmTst_o4FZOKRP1XIvIMlN6mMTTXNfnSToL2_nVbQ,8
114
+ AeroViz-0.1.5.dist-info/RECORD,,
@@ -1,104 +0,0 @@
1
- # read meteorological data from google sheet
2
-
3
-
4
- import numpy as np
5
- from pandas import read_csv, concat, to_datetime
6
-
7
- from AeroViz.rawDataReader.core import AbstractReader
8
-
9
-
10
- class Reader(AbstractReader):
11
- nam = 'IGAC_TH'
12
-
13
- def _raw_reader(self, _file):
14
-
15
- self.meta['freq'] = self._oth_set.get('data_freq') or self.meta['freq']
16
-
17
- with (_file).open('r', encoding='utf-8-sig', errors='ignore') as f:
18
- _df = read_csv(f, low_memory=False, index_col=0)
19
-
20
- _df.index = to_datetime(_df.index, errors='coerce', format=self._oth_set.get('date_format') or 'mixed')
21
- _df.index.name = 'time'
22
-
23
- _df.columns = _df.keys().str.strip(' ')
24
-
25
- _df = _df.loc[_df.index.dropna()].copy()
26
-
27
- return _df.loc[~_df.index.duplicated()]
28
-
29
- ## QC data
30
- def _QC(self, _df):
31
-
32
- ## QC parameter, function (MDL SE LE)
33
- _mdl = {
34
- 'Na+': 0.05,
35
- 'NH4+': 0.05,
36
- 'K+': 0.05,
37
- 'Mg2+': 0.05,
38
- 'Ca2+': 0.05,
39
- 'Cl-': 0.05,
40
- 'NO2-': 0.05,
41
- 'NO3-': 0.05,
42
- 'SO42-': 0.05,
43
- }
44
-
45
- def _se_le(_df_, _log=False):
46
- _df_ = np.log10(_df_) if _log else _df_
47
-
48
- _df_qua = _df_.quantile([.25, .75])
49
- _df_q1, _df_q3 = _df_qua.loc[.25].copy(), _df_qua.loc[.75].copy()
50
- _df_iqr = _df_q3 - _df_q1
51
-
52
- _se = concat([_df_q1 - 1.5 * _df_iqr] * len(_df_), axis=1).T.set_index(_df_.index)
53
- _le = concat([_df_q3 + 1.5 * _df_iqr] * len(_df_), axis=1).T.set_index(_df_.index)
54
-
55
- if _log:
56
- return 10 ** _se, 10 ** _le
57
- return _se, _le
58
-
59
- _cation, _anion, _main = ['Na+', 'NH4+', 'K+', 'Mg2+', 'Ca2+'], ['Cl-', 'NO2-', 'NO3-', 'SO42-', ], ['SO42-',
60
- 'NO3-',
61
- 'NH4+']
62
-
63
- _df_salt = _df[_mdl.keys()].copy()
64
- _df_pm = _df['PM2.5'].copy()
65
-
66
- ## lower than PM2.5
67
- ## conc. of main salt should be present at the same time (NH4+, SO42-, NO3-)
68
- _df_salt = _df_salt.mask(_df_salt.sum(axis=1, min_count=1) > _df_pm).dropna(subset=_main).copy()
69
-
70
- ## mdl
71
- for (_key, _df_col), _mdl_val in zip(_df_salt.items(), _mdl.values()):
72
- _df_salt[_key] = _df_col.mask(_df_col < _mdl_val, _mdl_val / 2)
73
-
74
- ## group by time (per month)
75
- _df_salt['tm'] = _df_salt.index.strftime('%Y-%m')
76
-
77
- _df_lst = []
78
- for _ky, _df_grp in _df_salt.groupby('tm'):
79
- _df_grp = _df_grp[_mdl.keys()].copy()
80
-
81
- ## calculate SE LE
82
- ## salt < LE
83
- _se, _le = _se_le(_df_grp, _log=True)
84
- _df_grp = _df_grp.mask(_df_grp > _le).copy()
85
-
86
- ## C/A, A/C
87
- _rat_CA = (_df_grp[_cation].sum(axis=1) / _df_grp[_anion].sum(axis=1)).to_frame()
88
- _rat_AC = (1 / _rat_CA).copy()
89
-
90
- _se, _le = _se_le(_rat_CA, )
91
- _cond_CA = (_rat_CA < _le) & (_rat_CA > 0)
92
-
93
- _se, _le = _se_le(_rat_AC, )
94
- _cond_AC = (_rat_AC < _le) & (_rat_AC > 0)
95
-
96
- _df_grp = _df_grp.where((_cond_CA * _cond_AC)[0]).copy()
97
-
98
- ## conc. of main salt > SE
99
- _se, _le = _se_le(_df_grp[_main], _log=True)
100
- _df_grp[_main] = _df_grp[_main].mask(_df_grp[_main] < _se).copy()
101
-
102
- _df_lst.append(_df_grp)
103
-
104
- return concat(_df_lst).reindex(_df.index)
@@ -1,34 +0,0 @@
1
- from pandas import to_datetime, read_csv
2
-
3
- from AeroViz.rawDataReader.core import AbstractReader
4
-
5
-
6
- class Reader(AbstractReader):
7
- nam = 'OCEC_LCRES'
8
-
9
- def _raw_reader(self, _file):
10
- with open(_file, 'r', encoding='utf-8', errors='ignore') as f:
11
- _df = read_csv(f, skiprows=3)
12
-
13
- _col = {'Thermal/Optical OC (ugC/LCm^3)': 'Thermal_OC',
14
- 'Thermal/Optical EC (ugC/LCm^3)': 'Thermal_EC',
15
- 'OC=TC-BC (ugC/LCm^3)': 'Optical_OC',
16
- 'BC (ugC/LCm^3)': 'Optical_EC',
17
- 'Sample Volume Local Condition Actual m^3': 'Sample_Volume',
18
- 'TC (ugC/LCm^3)': 'TC', }
19
-
20
- _tm_idx = to_datetime(_df['Start Date/Time'], errors='coerce')
21
- _df['time'] = _tm_idx
22
-
23
- _df = _df.dropna(subset='time').loc[~_tm_idx.duplicated()].set_index('time')
24
-
25
- return _df[_col.keys()].rename(columns=_col)
26
-
27
- ## QC data
28
- def _QC(self, _df):
29
- _df[['Thermal_OC', 'Optical_OC']] = _df[['Thermal_OC', 'Optical_OC']].where(
30
- _df[['Thermal_OC', 'Optical_OC']] > 0.3).copy()
31
- _df[['Thermal_EC', 'Optical_EC']] = _df[['Thermal_EC', 'Optical_EC']].where(
32
- _df[['Thermal_EC', 'Optical_EC']] > .015).copy()
33
-
34
- return _df
@@ -1,28 +0,0 @@
1
- from pandas import to_datetime, read_csv
2
-
3
- from AeroViz.rawDataReader.core import AbstractReader
4
-
5
-
6
- class Reader(AbstractReader):
7
- nam = 'OCEC_RES'
8
-
9
- def _raw_reader(self, _file):
10
- with open(_file, 'r', encoding='utf-8', errors='ignore') as f:
11
- _df = read_csv(f, skiprows=3)
12
-
13
- _col = {'OCPk1-ug C': 'OC1',
14
- 'OCPk2-ug C': 'OC2',
15
- 'OCPk3-ug C': 'OC3',
16
- 'OCPk4-ug C': 'OC4',
17
- 'Pyrolized C ug': 'PC', }
18
-
19
- _tm_idx = to_datetime(_df['Start Date/Time'], errors='coerce')
20
- _df['time'] = _tm_idx
21
-
22
- _df = _df.dropna(subset='time').loc[~_tm_idx.duplicated()].set_index('time')
23
-
24
- return _df[_col.keys()].rename(columns=_col)
25
-
26
- ## QC data
27
- def _QC(self, _df):
28
- return _df.where(_df > 0)
@@ -1,30 +0,0 @@
1
- # read meteorological data from google sheet
2
-
3
-
4
- from pandas import read_csv
5
-
6
- from AeroViz.rawDataReader.core import AbstractReader
7
-
8
-
9
- class Reader(AbstractReader):
10
- nam = 'VOC_TH'
11
-
12
- def _raw_reader(self, _file):
13
- _keys = ['Isopentane', 'Hexane', '2-Methylhexane', '3-Methylhexane', '2-Methylheptane', '3-Methylheptane',
14
- 'Propene', '1.3-Butadiene', 'Isoprene', '1-Octene',
15
- 'Benzene', 'Toluene', 'Ethylbenzene', 'm.p-Xylene', 'o-Xylene', 'Iso-Propylbenzene', 'Styrene',
16
- 'n-Propylbenzene', '3.4-Ethyltoluene', '1.3.5-TMB', '2-Ethyltoluene', '1.2.4-TMB', '1.2.3-TMB',
17
- 'Acetaldehyde', 'Ethanol', 'Acetone', 'IPA', 'Ethyl Acetate', 'Butyl Acetate',
18
- 'VCM', 'TCE', 'PCE', '1.4-DCB', '1.2-DCB']
19
-
20
- with (_file).open('r', encoding='utf-8-sig', errors='ignore') as f:
21
- _df = read_csv(f, parse_dates=[0], index_col=[0], na_values=['-', 'N.D.'])
22
-
23
- _df.columns = _df.keys().str.strip(' ')
24
- _df.index.name = 'time'
25
-
26
- _df = _df[_keys].loc[_df.index.dropna()]
27
- return _df.loc[~_df.index.duplicated()]
28
-
29
- def _QC(self, _df):
30
- return _df
@@ -1,37 +0,0 @@
1
- # read meteorological data from google sheet
2
-
3
-
4
- from pandas import read_csv
5
-
6
- from AeroViz.rawDataReader.core import AbstractReader
7
-
8
-
9
- class Reader(AbstractReader):
10
- nam = 'VOC_ZM'
11
-
12
- def _raw_reader(self, _file):
13
- _keys = ['Ethane', 'Propane', 'Isobutane', 'n-Butane', 'Cyclopentane', 'Isopentane',
14
- 'n-Pentane', '2,2-Dimethylbutane', '2,3-Dimethylbutane', '2-Methylpentane',
15
- '3-Methylpentane', 'n-Hexane', 'Methylcyclopentane', '2,4-Dimethylpentane',
16
- 'Cyclohexane', '2-Methylhexane', '2-Methylhexane', '3-Methylheptane',
17
- '2,2,4-Trimethylpentane', 'n-Heptane', 'Methylcyclohexane',
18
- '2,3,4-Trimethylpentane', '2-Methylheptane', '3-Methylhexane', 'n-Octane',
19
- 'n-Nonane', 'n-Decane', 'n-Undecane', 'Ethylene', 'Propylene', 't-2-Butene',
20
- '1-Butene', 'cis-2-Butene', 't-2-Pentene', '1-Pentene', 'cis-2-Pentene',
21
- 'isoprene', 'Acetylene', 'Benzene', 'Toluene', 'Ethylbenzene', 'm,p-Xylene',
22
- 'Styrene', 'o-Xylene', 'Isopropylbenzene', 'n-Propylbenzene', 'm-Ethyltoluene',
23
- 'p-Ethyltoluene', '1,3,5-Trimethylbenzene', 'o-Ethyltoluene',
24
- '1,2,4-Trimethylbenzene', '1,2,3-Trimethylbenzene', 'm-Diethylbenzene',
25
- 'p-Diethylbenzene']
26
-
27
- with (_file).open('r', encoding='utf-8-sig', errors='ignore') as f:
28
- _df = read_csv(f, parse_dates=[0], index_col=[0], na_values=['-'])
29
-
30
- _df.columns = _df.keys().str.strip(' ')
31
- _df.index.name = 'time'
32
-
33
- _df = _df[_keys].loc[_df.index.dropna()]
34
- return _df.loc[~_df.index.duplicated()]
35
-
36
- def _QC(self, _df):
37
- return _df