sscdev.weather#

Classes#

Module Contents#

class sscdev.weather.OpenMeteo#
get_history(latitude: float, longitude: float, start_date: str, end_date: str) pandas.DataFrame#

Fetches historical weather data for the given coordinates and date range.

Parameters: - latitude (float): Latitude of the location. - longitude (float): Longitude of the location. - start_date (str): The start date for the historical data in YYYY-MM-DD format. - end_date (str): The end date for the historical data in YYYY-MM-DD format.

Returns: - pd.DataFrame: A DataFrame containing the historical weather data.

Example: >>> OpenMeteo.get_weather_history(35.6895, 139.6917, ‘2023-01-01’, ‘2023-01-07’)

get_forecast(latitude: float, longitude: float) pandas.DataFrame#

Fetches weather forecast data for the given coordinates.

Parameters: - latitude (float): Latitude of the location. - longitude (float): Longitude of the location.

Returns: - pd.DataFrame: A DataFrame containing the weather forecast data.

Example: >>> OpenMeteo.get_weather_forecast(35.6895, 139.6917)

get_weather(latitude: float, longitude: float) pandas.DataFrame#

Fetches current weather data for the given coordinates.

Parameters: - latitude (float): Latitude of the location. - longitude (float): Longitude of the location.

Returns: - pd.DataFrame: A DataFrame containing the current weather data.

Example: >>> OpenMeteo.get_current_weather(35.6895, 139.6917)

get_alerts(latitude: float, longitude: float) pandas.DataFrame#

Fetches weather alerts for the given coordinates.

Parameters: - latitude (float): Latitude of the location. - longitude (float): Longitude of the location.

Returns: - pd.DataFrame: A DataFrame containing the weather alerts.

Example: >>> OpenMeteo.get_weather_alerts(35.6895, 139.6917)