Skip to main content

Documentation

You can find the documentation for the project by following this link
https://filter-stations.readthedocs.io/en/latest/

Getting Started

All methods require an API key and secret, which can be obtained by contacting dsail-info@dkut.ac.ke.

  • AuthManager: The new secure gateway. Log in once with your credentials to automatically unlock access to all downstream data loaders
  • RainLoader: class is used to get our DSAIL unified weather dataset from HuggingFace (See the documentation for more information on this)
  • MediumForecaster: Connects to the Google Weather API to pull 1-to-10 day forecasts (both hourly and daily)
  • SeasonalForecaster: Connects to Open-Meteo API to pull seasonal forecasts.
  • The RetrieveData class is used to retrieve data from the TAHMO API endpoints.
  • The Kieni class is used to get weather data for stations 100km around Kieni from the central point.with water level data.

Example

from filter_stations import AuthManager, MediumForecaster, RetrieveData, SeasonalForecaster

# 1. Authenticate once securely
auth = AuthManager(email="your_email@domain.com", password="your_password")

# 2. Initialize any tool you need seamlessly
weather = MediumForecaster(auth_session=auth)
tahmo = RetrieveData(auth_session=auth)
seasonal = SeasonalForecaster(auth_session=auth)

# 3. Pull your Medium Range weather forecast data 
nyeri_forecast = weather.get_weather_api_forecast(lat=-0.41, lon=36.95, days=7)

# Seasonal Forecasting Example

# 4. See what is available
print(seasonal.list_all_models())

# 5. Pull 6 months of ECMWF AIFS and Standard IFS data simultaneously
data = seasonal.get_forecast(
    lat=-0.41,
    lon=36.95,
    models=["ecmwf_seasonal_ensemble_mean_seamless"], 
    forecast_months=6,
    daily=['temperature_2m_max',
            'temperature_2m_mean',
            'temperature_2m_min',
            'precipitation_sum',
            'rain_sum',
            'pressure_msl_min',
            'pressure_msl_mean',
            'relative_humidity_2m_min',
            'relative_humidity_2m_mean',
            'relative_humidity_2m_max',
            'dew_point_2m_max',
            'dew_point_2m_mean',
            'dew_point_2m_min',
            'surface_pressure_min',
            'surface_pressure_mean',
            'surface_pressure_max',
            'cloud_cover_min',
            'cloud_cover_mean',
            'cloud_cover_max' ]
)

# 6. View the AIFS DataFrame (first model in the list)
aifs_df = data[0]["daily_df"]
print(aifs_df)

seasonal.list_api_variables()

To get started on the module test it out on Google Colab

Open In Colab

For earlier versions <= v0.6.2 use the link below for documentation

https://filter-stations.netlify.app/

Citations

If you use this package in your research, please cite it using the following BibTeX entry:

@misc{filter-stations,
  author = {Austin Kaburia},
  title = {filter-stations},
  year = {2024},
  publisher = {Python Package Index},
  journal = {PyPI},
  howpublished = {\url{https://pypi.org/project/filter-stations/}},
}

Metadata

Release files for filter-stations 0.8.3

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

Source distribution (sdist)

Source distribution for filter-stations 0.8.3
File Size Uploaded
filter_stations-0.8.3.tar.gz 40.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for filter-stations 0.8.3
File Interpreter ABI Platform
filter_stations-0.8.3-py3-none-any.whl Python 3 none any Details

Total release size: 68.8 MB

Release files / filter_stations-0.8.3.tar.gz

Download URL filter_stations-0.8.3.tar.gz
Size 40.8 MB
Tags Source
SHA-256 checksum
How to use checksums
918b537750b3d8e7ec3d3a5924848fc9ee6bafa9e0b3b3989b0c31cf528fc562
BLAKE2b-256 checksum
How to use checksums
4297907ec537d82d30940653018e15bcf3c0232feeb837307f93f57db5e963ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / filter_stations-0.8.3-py3-none-any.whl

Download URL filter_stations-0.8.3-py3-none-any.whl
Size 28.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5d7be30902596255b1f27d1fb2c8ffd126b8e65fd303078ac5f3e1e3ad84846d
BLAKE2b-256 checksum
How to use checksums
9d73ea236bd4bcf04ea878409ec0a2bbdda4ef355bd7ddf2c762f8275bf29851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.8.3 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.3.20

2 release files

0.3.19

2 release files

0.3.18

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

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