Skip to main content

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.

Release files for WeatherQualityCSB 0.1

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

Source distribution (sdist)

Source distribution for WeatherQualityCSB 0.1
File Size Uploaded
WeatherQualityCSB-0.1.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for WeatherQualityCSB 0.1
File Interpreter ABI Platform
WeatherQualityCSB-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / WeatherQualityCSB-0.1.tar.gz

Download URL WeatherQualityCSB-0.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
57fbc1fc9045e707bebd82699fc5796f4f01cdb12025fd5e69810bb3f7b4594b
BLAKE2b-256 checksum
How to use checksums
8d3f43c3c7361fc514b9907d7f7f4d3058e9c266d5006ea1e438d69bd3f67242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / WeatherQualityCSB-0.1-py3-none-any.whl

Download URL WeatherQualityCSB-0.1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4154803e80f8a26e1d61d61afb12efa534794fa8fc63b20a530d2f13211074d
BLAKE2b-256 checksum
How to use checksums
de5868cbdc7c7de106f68de8c7029b0682383a50afed55e302b20302466269a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1 This release

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