Metadata-Version: 2.4
Name: weather_rp5
Version: 1.4
Summary: Functions for retrieving weather data from rp5.ru
Home-page: https://github.com/jakmuell/weather_rp5/
Author: Jakob Müller
Author-email: jakob.mueller1004@gmail.com
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: bs4
Requires-Dist: httpx
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: summary

# weather_rp5

This package provides functions for automatically retrieving weather records from the rp5.ru website.

## Installation

To install this project, run:
```
pip install weather_rp5
```

## Example Usage

To get records for the weather station in Poitiers starting on February 1, 2024
and ending on April 1, 2024, you may use the following code:
```
from datetime import date
import pandas as pd
from weather_rp5 import get_station_id, get_weather_data

url = 'https://rp5.ru/Weather_archive_in_Poitiers_(airport)'
wmo_id = get_station_id(url)
start = date(2024, 2, 1)
end = date(2024, 4, 1)
df = get_weather_data(wmo_id, start, end, False)
```
If you need data from the airport (METAR) station, you may proceed as follows:
```
url = 'https://rp5.ru/Weather_archive_in_Sao_Paulo_(airport),_METAR'
station_id = get_station_id(url)
start = date(2024, 2, 1)
end = date(2024, 4, 1)
df = get_weather_data(station_id, start, end, True)
```

## Acknowledgement

The functions for sending post requests were taken from https://github.com/KonstantenKomkov/weather.
