Skip to content

New proposed function: getWeather #216

Description

@matteozanettii

Hi everybody,

Today I am showing a new utility function, getWeather, designed to bring robust statistical analysis and advanced visualization to meteorological data within the FSDA "mind".
Inspired by the workflow and the interactive design of getYahoo, this function provides an end-to-end pipeline: from data retrieval (via Open-Meteo API) to robust anomaly detection and visualization. Given the recent meteorological shifts and the growing need for climate data quality checks, this function is intended to be a reliable "first-look" tool for time-series meteorological assessment.

Image

Screenshot produced by: getWeather("Parma","lastperiod","1mo")

Key Features

  • Pipeline Design: One-step retrieval, cleaning, and structuring of surface weather variables (Temperature, Humidity, Pressure, Wind, Precipitation) into a timetable.

  • Robust Statistics: Implements multivariate anomaly detection using Robust Covariance (robustcov) and Mahalanobis distances, allowing users to spot outliers (e.g., sensor malfunctions or extreme micro-climatic events) without being misled by non-Gaussian noise.

  • Technical Indicators: Uses Exponential Moving Averages (EMA) to identify structural trends in temperature and provides linear regression fitting between Wind Speed and Gusts to assess correlation stability.

  • Advanced Visualization: A custom three-panel diagnostic layout featuring a dark-themed UI, interactive datatips (implemented via DataTipTemplate for optimal performance), and automatic figure exportation.

Next integrations:

I am actively planning to expand this function's capabilities to align with FSDA’s core philosophy:
like integrate MahalFS for a more granular identification of outliers and potential statistical depth also a spatial visualization: Implementing geoplotFS to visualize weather stations or event paths on maps.
Also, am actively exploring API sources or calculation methods to integrate CAPE (Convective Available Potential Energy) and SWT (Severe Weather Threat) indices to enhance forecasting diagnostic power. Also a lot things are now missing (like a proper documentation) but I am going to add on this type of things, as soon as I can.

I am open to every tipe of suggestion, also if you want to try the code or propose some changes, this is the standalone repository of this beta code:

getWeather

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions