About This Library
The asrad-reader is a small Python package for reading CWA long-term observational data from ASRAD (Atmospheric Science Research and Appliction Databank ,link) and turning it into a pandas-friendly dataset.
This project is built around two ideas:
- Quick loading of many observation files with multi-threading
- Convenient time-series processing through a pandas
DataFrameextension
The author is wyork507.
Current Structure
asrad-reader/
__init__.py
loader.py
nan_mode.py
obs_data_frame.py
special_value.py
py.typed
readme.md
readme_ZhTW.md
read_me.html
setup.py
Requirements
- Python 3.11.7 or higher
- NumPy 1.26.2 or higher
- pandas 2.1.4 or higher
Getting Started
1. Installation
For published releases, users should install the package from PyPI:
pip install asrad-reader
2. Importation
Import the package:
from pathlib import Path
from asrad_reader import load_file, load_folder
3. Read a File
For a sigle file
file_path = Path("datas/20029999_cwb_hr/20021099.cwb_hr.txt")
df = load_file(file_path)
Here, the load_file supports variety of parameters, please see source code or IDE hint for details.
For multiple files in folders
folder_path = Path("datas")
df = load_folder(folder_path)
The load_folder reads all .txt files under the folder with multi-threading, also supported parameters.
4. DataFrame Accessor
The returned object is an DataFrame, so you can also use the registered accessor:
df.obs.station("467490")
df.obs.get_item_with_time(["TX01", "PP01", "RH01"])
df.obs.find_observe_patterns()
df.obs.find_nan_periods()
See the ObsDataFrame class to know more method and usage.
Notes
ASRAD_reader.__init__exportsNanMode,SpecialValue,ObsDataFrame,ObservePattern,NanPeriod,load_file, andload_folder.ASRAD_readeris intended to be used as a library, not as a standalone script.- For any detail information in parameters, check your IDE hint or source code.
Last update: 2026/07/21.
Metadata
Release files for asrad-reader 0.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asrad_reader-0.4.6.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asrad_reader-0.4.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.6 kB
Release files / asrad_reader-0.4.6.tar.gz
| Download URL | asrad_reader-0.4.6.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5b0d460fdbdd9883cfaca51c156de6cc4cd689d46a0b342c2e97e8aa48dcd0f
|
|
BLAKE2b-256 checksum How to use checksums |
15365d5abe8c0f34d3f3a36d3c0f9a1fa4b61391ff00d3c56a87e1aaaad71e72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / asrad_reader-0.4.6-py3-none-any.whl
| Download URL | asrad_reader-0.4.6-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
662f49a1ea5e507434a07c71dd8cc87a805bce8c45bb045fe19187c007dc2613
|
|
BLAKE2b-256 checksum How to use checksums |
b767a4f559b7584b22c6dcc1094e92ccf35df1866f5381208829a5a694c4d012
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|