Skip to main content

README.md

ASOS Analysis

ASOS Analysis is a Python library designed to streamline the sorting, cleaning, and analysis of ASOS (Automated Surface Observing System) weather data. It provides tools for sorting data by time, stations, and variables, detecting and standardizing date-time formats, and removing duplicate entries.


Features

  • Sorting:

    • Group and save data by time (hourly intervals).
    • Group and save data by station.
    • Extract data for specific variables and save them in individual files.
  • Cleaning:

    • Remove duplicate entries from datasets.
  • Date-Time Management:

    • Detect unique date-time formats used in data files.
    • Standardize all date-time values into a consistent format.
  • Flexible and Modular Design:

    • Customizable options for handling ASOS datasets with ease.

Installation

ASOS Analysis is available via both pip and conda.

Using pip:

pip install asos_analysis

Using conda:

conda install -c sauravshuvo asos_analysis

Usage

Here's how to use ASOS Analysis for various tasks. Import the required functions and call them with your dataset paths.

Sorting Data by Time

Sort data into hourly intervals and save each interval into a separate file:

from asos_analysis.sorting import sort_by_time

input_file = "path/to/ND_feb12.csv"
output_dir = "path/to/Hourly_Files"

sort_by_time(input_file, output_dir)

Sorting Data by Stations

Organize data by stations and save each station's data into a separate file:

from asos_analysis.sorting import sort_by_station

input_file = "path/to/ND_feb12.csv"
output_dir = "path/to/Station_Files"

sort_by_station(input_file, output_dir)

Sorting Data by Variables

Extract data for specific variables:

from asos_analysis.sorting import sort_by_variable

input_file = "path/to/ND_feb12.csv"
variables = ['tmpf', 'dwpf', 'relh']
base_columns = ['station', 'valid', 'lon', 'lat', 'elevation']
output_dir = "path/to/Variables_Files"

sort_by_variable(input_file, variables, base_columns, output_dir)

Removing Duplicate Entries

Clean your datasets by removing duplicate rows:

from asos_analysis.cleaning import remove_duplicates

input_folder = "path/to/data_folder"
remove_duplicates(input_folder)

Listing Unique Date-Time Formats

Analyze your datasets to find all unique date-time formats in the valid column:

from asos_analysis.formats import list_unique_formats

input_folder = "path/to/data_folder"
unique_formats = list_unique_formats(input_folder)

print("Unique date-time formats detected:")
for fmt in unique_formats:
    print(fmt)

Standardizing Date-Time Format

Ensure all date-time values in the valid column conform to a standard format:

from asos_analysis.reformat import standardize_datetime

input_folder = "path/to/data_folder"
standardize_datetime(input_folder)

Contributing

Contributions are welcome! Feel free to fork the repository, create a branch, and submit pull requests. You can also report issues or feature requests on the GitHub repository.


License

This project is licensed under the MIT License. See the [LICENSE] file for more details.




Metadata

Release files for asos-analysis 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asos-analysis 1.0.0
File Size Uploaded Provenance
asos_analysis-1.0.0.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asos-analysis 1.0.0
File Interpreter ABI Platform
asos_analysis-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / asos_analysis-1.0.0.tar.gz

Download URL asos_analysis-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cbc87d699417fe501cd9427dad55d28575391d8d3cc45fca77436584f7eeb5f5
BLAKE2b-256 checksum
How to use checksums
2e375c9ca4be5a17d99770473bd02fd6f9675d928c0345b67843a9b1cfe98f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / asos_analysis-1.0.0-py3-none-any.whl

Download URL asos_analysis-1.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a02e9c85bcf9920884281930eea40876c163dede91e63ea10b55403b8d15c81
BLAKE2b-256 checksum
How to use checksums
2dd40508035f8c8fb40aee0b815023c297136fdb0299592dd5e2f031b062174f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for asos-analysis 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page