Skip to content

Commit

Permalink
docs: optimize RawDataReader usage guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex870521 committed Nov 16, 2024
1 parent ed7ed88 commit 8f4bab9
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 64 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from openpyxl.styles.builtins import output

## <div align="center">AeroViz for Aerosol Science Visualization</div>

<div align="center">
Expand Down Expand Up @@ -60,10 +62,24 @@ from pathlib import Path
from AeroViz import RawDataReader, DataProcess, plot

# Read data from a supported instrument
data = RawDataReader('NEPH', Path('/path/to/data'), start=datetime(2024, 2, 1), end=datetime(2024, 4, 30))
data = RawDataReader(
'NEPH',
Path('/path/to/data'),
start=datetime(2024, 2, 1),
end=datetime(2024, 4, 30)
)
```

# Create a visualization
plot.timeseries(data, y='scattering_coefficient')
```pycon
> Concole output
╔════════════════════════════════════════════════════════════════════════════════╗
║ Reading NEPH RAW DATA from 2024-02-01 00:00:00 to 2024-04-30 23:59:59 ║
╚════════════════════════════════════════════════════════════════════════════════╝
▶ Reading NEPH files ━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 file_name.dat
▶ Scatter Coe. (550 nm)
├─ Sample Rate : 100.0%
├─ Valid Rate : 100.0%
└─ Total Rate : 100.0%
```

For more detailed usage instructions, please refer to our [User Guide](docs/guide).
Expand All @@ -82,12 +98,3 @@ For detailed documentation, please refer to the `docs` folder, which includes:

## <div align="center">Contact</div>
For bug reports and feature requests please visit [GitHub Issues](https://github.com/Alex870521/DataPlot/issues).

<div align="center">

<a href="https://github.com/Alex870521"><img src="https://github.com/Alex870521/AeroViz/blob/main/assets/media/logo-social-github.png?raw=true" width="3%" alt="Alex870521 GitHub"></a>
<img src="https://github.com/Alex870521/AeroViz/blob/main/assets/media/logo-transparent.png?raw=true" width="3%">
<a href="https://www.linkedin.com/in/Alex870521/"><img src="https://github.com/Alex870521/AeroViz/blob/main/assets/media/logo-social-linkedin.png?raw=true" width="3%" alt="Alex870521 LinkedIn"></a>
<img src="https://github.com/Alex870521/AeroViz/blob/main/assets/media/logo-transparent.png?raw=true" width="3%">
<a href="https://medium.com/@alex870521"><img src="https://github.com/Alex870521/AeroViz/blob/main/assets/media/logo-social-medium.png?raw=true" width="3%" alt="Alex870521 Medium"></a>
</div>
7 changes: 5 additions & 2 deletions docs/api/RawDataReader.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,18 @@ def RawDataReader(
```python
from pathlib import Path
from datetime import datetime
from AeroViz import RawDataReader

data = RawDataReader(
instrument_name='BC1054',
instrument_name='AE33',
path=Path('/path/to/data'),
start=datetime(2024, 2, 1),
end=datetime(2024, 7, 31, 23)
end=datetime(2024, 8, 31, 23)
)
```

[]()

## AbstractReader Class

### Overview
Expand Down
47 changes: 47 additions & 0 deletions docs/example/RawDataReader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""
AeroViz Example Usage Guide
==========================
This script demonstrates basic usage of RawDataReader class with AE33 data.
Author: Chan Chih Yu
GitHub: https://github.com/Alex870521/AeroViz
"""

from datetime import datetime
from pathlib import Path

from AeroViz import RawDataReader

# Set data path and time range
data_path = Path('/path/to/your/data')
start_time = datetime(2024, 2, 1)
end_time = datetime(2024, 3, 31, 23, 59, 59)

# Read and process AE33 data
ae33_data = RawDataReader(
instrument_name='AE33',
path=data_path / 'AE33',
reset=True,
qc=True,
qc_freq='1MS', # print qc each month
rate=True,
start=start_time,
end=end_time,
mean_freq='1h',
csv_out=True
)

# Show processed data
print("\nProcessed AE33 data:")
print(ae33_data.head())

print("""
After processing, six files will be generated in the data directory:
1. _read_AE33_raw.csv: Raw merged data (original 1-min resolution)
2. _read_AE33_raw.pkl: Raw data in pickle format
3. _read_AE33.csv: QC processed data (original 1-min resolution)
4. _read_AE33.pkl: QC data in pickle format
5. Output_AE33: Final processed data (user-defined resolution)
6. AE33.log: Processing log file
""")
Loading

0 comments on commit 8f4bab9

Please sign in to comment.