Skip to main content

A utility to fetch weather quality data from the CSB website.

Project description

Weather Quality Data Fetcher

This utility is designed to fetch weather quality data from the CSB website and save it as an Excel file.

Table of Contents

Prerequisites

Ensure you have the following libraries installed:

  • pytest
  • os
  • sys
  • time
  • json
  • logging
  • tqdm
  • selenium
  • custom module validations (containing validate_locations, validate_date, and validate_params)

You should also have ChromeDriver installed and available in your PATH to use with the Selenium WebDriver.

Usage

To use the WeatherQuality class, simply initialize it with the desired parameters and then call the run method:

locations = {"Ankara": ["Etimesgut", "Sincan"]}
dates = ("DD-MM-YYYY HH:MM", "DD-MM-YYYY HH:MM")
params = ["Parameter1", "Parameter2"]

weather_quality_fetcher = WeatherQuality(locations=locations, dates=dates, params=params, logs=True)
weather_quality_fetcher.run()

Attributes

  • locations: Dictionary where the keys are city names, and the values are lists of district names.
  • dates: Tuple containing the start and end dates in the format (start_date, end_date).
  • params: (Optional) List of parameters to select when fetching data.
  • headless: (Optional) Determines if the browser runs in headless mode (i.e., no GUI).
  • download_path: (Optional) Path to the directory where the Excel file will be downloaded.
  • logs: (Optional) Determines if progress logs should be printed to the console.

Methods

  • __init__: Initializes the WeatherQuality instance.
  • run: Initiates the process to fetch weather quality data from the CSB website and download it as an Excel file.
  • Private methods for various tasks (e.g., selecting cities, selecting districts, etc.)

Credits

Developed by [Melih Taşkın] as a utility to simplify and automate the process of fetching weather quality data.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

WeatherQualityCSB-0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WeatherQualityCSB-0.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file WeatherQualityCSB-0.1.tar.gz.

File metadata

  • Download URL: WeatherQualityCSB-0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for WeatherQualityCSB-0.1.tar.gz
Algorithm Hash digest
SHA256 57fbc1fc9045e707bebd82699fc5796f4f01cdb12025fd5e69810bb3f7b4594b
MD5 c513c23b43d9716ed1fe85f4292b937f
BLAKE2b-256 8d3f43c3c7361fc514b9907d7f7f4d3058e9c266d5006ea1e438d69bd3f67242

See more details on using hashes here.

File details

Details for the file WeatherQualityCSB-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for WeatherQualityCSB-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4154803e80f8a26e1d61d61afb12efa534794fa8fc63b20a530d2f13211074d
MD5 16234483630f88e439bb5504c168a2d0
BLAKE2b-256 de5868cbdc7c7de106f68de8c7029b0682383a50afed55e302b20302466269a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page