Class: Weather

weather.Weather()

new Weather()

A class to fetch and manipulate weather data using the Visual Crossing Weather API.
Source:

Methods

clearWeatherData()

Clear the weather data of the class.
Source:

constructor(apiKey, baseUrl)

Constructs a new Weather object.
Parameters:
Name Type Description
apiKey string API key for the weather API.
baseUrl string Base URL of the weather API.
Source:

(async) fetchWeatherData(location, fromDate, toDate, unitGroup, include, elements) → {Promise.<object>}

Fetch weather data for a specified location and date range.
Parameters:
Name Type Description
location string Location for which weather data is requested.
fromDate string Start date of the weather data period (in `yyyy-MM-dd` format).
toDate string End date of the weather data period (in `yyyy-MM-dd` format).
unitGroup string Unit system for the weather data ('us', 'metric', 'uk' or 'base').
include string Data types to include (e.g., 'days', 'hours').
elements string Specific weather elements to retrieve.
Source:
Returns:
The weather data as a dictionary.
Type
Promise.<object>

getAddress() → {string|null}

Retrieves the address from the weather data.
Source:
Returns:
The address if available, otherwise null.
Type
string | null

getCloudcoverAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the cloud cover for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The cloud cover at the specified datetime, or null if not available or error.
Type
number | null

getCloudcoverOnDay(dayInfo) → {number|null}

Retrieves the cloud cover percentage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The cloud cover percentage for the specified day, or null if not available or error.
Type
number | null

getConditionsAtDatetime(dayInfo, timeInfo) → {string}

Retrieves the conditions for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The conditions at the specified datetime, or null if not available or error.
Type
string

getConditionsOnDay(dayInfo) → {string|null}

Retrieves the weather conditions for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The weather conditions for the specified day, or null if not available or error.
Type
string | null

getDailyDatetimes(() → {Array.<Date>}

Retrieves a list of datetime objects representing each day's date from the weather data.
Source:
Returns:
A list of Date objects parsed from the 'datetime' key of each day in the weather data.
Type
Array.<Date>

getDataAtDatetime(dayInfo, timeInfo, elements) → {Object}

Retrieves weather data for a specific date and time from the weather data collection.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index, pointing to a specific day in the data.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index, pointing to a specific time slot in the day's data.
elements Array Specific weather elements to retrieve.
Source:
Throws:
Propagates any exceptions that may occur during data retrieval.
Type
Error
Returns:
The specific hourly data dictionary corresponding to the given day and time.
Type
Object

getDataOnDay(dayInfo, elements) → {object|null}

Retrieves weather data for a specific day based on a date string or index.
Parameters:
Name Type Description
dayInfo string | number The identifier for the day, which can be a date string (YYYY-MM-DD) or an index of the day list.
elements Array.<string> Specific weather elements to retrieve.
Source:
Returns:
The weather data dictionary for the specified day, or null for errors.
Type
object | null

getDatetimeEpochAtDatetime(dayInfo, timeInfo) → {number}

Retrieves the epoch time for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Throws:
Propagates any exceptions that may occur during data retrieval.
Type
Error
Returns:
The epoch time corresponding to the specific day and time.
Type
number

getDescriptionOnDay(dayInfo) → {string|null}

Retrieves the weather description for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The weather description for the specified day, or null if not available or error.
Type
string | null

getDewAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the dew point temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The dew point temperature at the specified datetime, or null if not available or error.
Type
number | null

getDewOnDay(dayInfo) → {number|null}

Retrieves the dew point for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The dew point for the specified day, or null if not available or error.
Type
number | null

getFeelsLikeAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the 'feels like' temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The 'feels like' temperature at the specified datetime, or null if not available or error.
Type
number | null

getFeelslikeOnDay(dayInfo) → {number|null}

Retrieves the 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The 'feels like' temperature for the specified day, or null if not available or error.
Type
number | null

getFeelslikemaxOnDay(dayInfo) → {number|null}

Retrieves the maximum 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The maximum 'feels like' temperature for the specified day, or null if not available or error.
Type
number | null

getFeelslikeminOnDay(dayInfo) → {number|null}

Retrieves the minimum 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The minimum 'feels like' temperature for the specified day, or null if not available or error.
Type
number | null

getHourlyDataOnDay(dayInfo, elements) → {Array}

Retrieves hourly weather data for a specific day identified by date or index. Optionally filters the data to include only specified elements.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
elements Array Optional list of keys to filter the hourly data.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError
Returns:
A list of hourly data dictionaries for the specified day.
Type
Array

getHourlyDatetimes() → {Array.<Date>}

Retrieves a list of datetime objects representing each hour's datetime from the weather data.
Source:
Returns:
A list of Date objects parsed from the 'datetime' keys of each day and hour in the weather data.
Type
Array.<Date>

getHumidityAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the humidity for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The humidity percentage at the specified datetime, or null if not available or error.
Type
number | null

getHumidityOnDay(dayInfo) → {number|null}

Retrieves the humidity percentage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The humidity percentage for the specified day, or null if not available or error.
Type
number | null

getIconAtDatetime(dayInfo, timeInfo) → {string}

Retrieves the weather icon for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The weather icon at the specified datetime, or null if not available or error.
Type
string

getIconOnDay(dayInfo) → {string|null}

Retrieves the weather icon for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The weather icon for the specified day, or null if not available or error.
Type
string | null

getLatitude() → {number|null}

Retrieves the latitude from the weather data.
Source:
Returns:
The latitude if available, otherwise null.
Type
number | null

getLongitude() → {number|null}

Retrieves the longitude from the weather data.
Source:
Returns:
The longitude if available, otherwise null.
Type
number | null

getMoonphaseOnDay(dayInfo) → {number|null}

Retrieves the moon phase for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The moon phase for the specified day, or null if not available or error.
Type
number | null

getPrecipAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the precipitation amount for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The precipitation amount at the specified datetime, or null if not available or error.
Type
number | null

getPrecipOnDay(dayInfo) → {number|null}

Retrieves the precipitation amount for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The precipitation amount for the specified day, or null if not available or error.
Type
number | null

getPrecipProbAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the probability of precipitation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The probability of precipitation at the specified datetime, or null if not available or error.
Type
number | null

getPrecipcoverOnDay(dayInfo) → {number|null}

Retrieves the precipitation coverage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The precipitation coverage for the specified day, or null if not available or error.
Type
number | null

getPrecipprobOnDay(dayInfo) → {number|null}

Retrieves the probability of precipitation for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The probability of precipitation for the specified day, or null if not available or error.
Type
number | null

getPreciptypeAtDatetime(dayInfo, timeInfo) → {string}

Retrieves the type of precipitation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The type of precipitation at the specified datetime, or null if not available or error.
Type
string

getPreciptypeOnDay(dayInfo) → {string|null}

Retrieves the type of precipitation for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The type of precipitation for the specified day, or null if not available or error.
Type
string | null

getPressureAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the atmospheric pressure for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The atmospheric pressure at the specified datetime, or null if not available or error.
Type
number | null

getPressureOnDay(dayInfo) → {number|null}

Retrieves the atmospheric pressure for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The atmospheric pressure for the specified day, or null if not available or error.
Type
number | null

getQueryCost() → {number|null}

Retrieves the cost of the query from the weather data.
Source:
Returns:
The cost of the query if available, otherwise null.
Type
number | null

getResolvedAddress() → {string|null}

Retrieves the resolved address from the weather data.
Source:
Returns:
The resolved address if available, otherwise null.
Type
string | null

getSevereriskAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the severe risk for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The severe risk at the specified datetime, or null if not available or error.
Type
number | null

getSevereriskOnDay(dayInfo) → {number|null}

Retrieves the severe weather risk level for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The severe weather risk level for the specified day, or null if not available or error.
Type
number | null

getSnowAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the snow amount for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The snow amount at the specified datetime, or null if not available or error.
Type
number | null

getSnowDepthAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the snow depth for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The snow depth at the specified datetime, or null if not available or error.
Type
number | null

getSnowOnDay(dayInfo) → {number|null}

Retrieves the snowfall amount for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The snowfall amount for the specified day, or null if not available or error.
Type
number | null

getSnowdepthOnDay(dayInfo) → {number|null}

Retrieves the snow depth for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The snow depth for the specified day, or null if not available or error.
Type
number | null

getSolarenergyAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the solar energy for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The solar energy at the specified datetime, or null if not available or error.
Type
number | null

getSolarenergyOnDay(dayInfo) → {number|null}

Retrieves the solar energy generated on a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The solar energy generated on the specified day, or null if not available or error.
Type
number | null

getSolarradiationAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the solar radiation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The solar radiation at the specified datetime, or null if not available or error.
Type
number | null

getSolarradiationOnDay(dayInfo) → {number|null}

Retrieves the solar radiation level for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The solar radiation level for the specified day, or null if not available or error.
Type
number | null

getSourceAtDatetime(dayInfo, timeInfo) → {string|null}

Retrieves the type of weather data used for this weather object for a specific datetime within the weather data. Values include historical observation (“obs”), forecast (“fcst”), historical forecast (“histfcst”) or statistical forecast (“stats”). If multiple types are used in the same day, “comb” is used. Today a combination of historical observations and forecast data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The type of weather data used for this weather object at the specified datetime, or null if not available or error.
Type
string | null

getStations() → {Array}

Retrieves the list of weather stations from the weather data.
Source:
Returns:
The list of weather stations if available, otherwise an empty list.
Type
Array

getStationsAtDatetime(dayInfo, timeInfo) → {Array.<string>|null}

Retrieves the weather stations that were used for creating the observation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The weather stations that were used for creating the observation at the specified datetime, or null if not available or error.
Type
Array.<string> | null

getStationsOnDay(dayInfo) → {Array|null}

Retrieves the weather stations data for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The list of weather stations active on the specified day, or null if not available or error.
Type
Array | null

getSunriseEpochOnDay(dayInfo) → {number|null}

Retrieves the Unix timestamp for the sunrise time for a specific day.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The sunrise Unix timestamp for the specified day, or null if not available or error.
Type
number | null

getSunriseOnDay(dayInfo) → {string|null}

Retrieves the sunrise time for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The sunrise time for the specified day, or null if not available or error.
Type
string | null

getSunsetEpochOnDay(dayInfo) → {number|null}

Retrieves the Unix timestamp for the sunset time for a specific day.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The sunset Unix timestamp for the specified day, or null if not available or error.
Type
number | null

getSunsetOnDay(dayInfo) → {string|null}

Retrieves the sunset time for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The sunset time for the specified day, or null if not available or error.
Type
string | null

getTempAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The temperature at the specified datetime, or null if not available or error.
Type
number | null

getTempAtDatetime(dayInfo, timeInfo, value)

Sets the temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The temperature value to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

getTempOnDay(dayInfo) → {number|null}

Retrieves the temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The temperature for the specified day, or null if not available or error.
Type
number | null

getTempmaxOnDay(dayInfo) → {number|null}

Retrieves the maximum temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The maximum temperature for the specified day, or null if not available or error.
Type
number | null

getTempminOnDay(dayInfo) → {number|null}

Retrieves the minimum temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The minimum temperature for the specified day, or null if not available or error.
Type
number | null

getTimezone() → {string|null}

Retrieves the timezone from the weather data.
Source:
Returns:
The timezone if available, otherwise null.
Type
string | null

getTzoffset() → {number|null}

Retrieves the timezone offset from the weather data.
Source:
Returns:
The timezone offset if available, otherwise null.
Type
number | null

getUvindexAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the UV index for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The UV index at the specified datetime, or null if not available or error.
Type
number | null

getUvindexOnDay(dayInfo) → {number|null}

Retrieves the UV index for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The UV index for the specified day, or null if not available or error.
Type
number | null

getVisibilityAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the visibility for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The visibility at the specified datetime, or null if not available or error.
Type
number | null

getVisibilityOnDay(dayInfo) → {number|null}

Retrieves the visibility distance for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The visibility distance for the specified day, or null if not available or error.
Type
number | null

getWeatherDailyData(elements) → {Array.<object>|null}

Get daily weather data, optionally filtered by elements.
Parameters:
Name Type Description
elements Array.<string> List of elements to include in the returned data.
Source:
Returns:
List of daily data dictionaries, filtered by elements if specified, or null for errors.
Type
Array.<object> | null

getWeatherData(elements) → {object|null}

Get the stored weather data.
Parameters:
Name Type Description
elements Array.<string> List of elements to include in the returned data.
Source:
Returns:
The weather data as a dictionary, filtered by elements if specified, or null for errors.
Type
object | null

getWeatherHourlyData(elements) → {Array.<object>|null}

Get hourly weather data for all days, optionally filtered by elements.
Parameters:
Name Type Description
elements Array.<string> List of elements to include in the returned data.
Source:
Returns:
List of hourly data dictionaries, filtered by elements if specified, or null for errors.
Type
Array.<object> | null

getWinddirAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the wind direction for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The wind direction at the specified datetime, or null if not available or error.
Type
number | null

getWinddirOnDay(dayInfo) → {number|null}

Retrieves the wind direction for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The wind direction for the specified day, or null if not available or error.
Type
number | null

getWindgustAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the wind gust speed for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The wind gust speed at the specified datetime, or null if not available or error.
Type
number | null

getWindgustOnDay(dayInfo) → {number|null}

Retrieves the wind gust value for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The wind gust value for the specified day, or null if not available or error.
Type
number | null

getWindspeedAtDatetime(dayInfo, timeInfo) → {number|null}

Retrieves the wind speed for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
Source:
Returns:
The wind speed at the specified datetime, or null if not available or error.
Type
number | null

getWindspeedOnDay(dayInfo) → {number|null}

Retrieves the wind speed for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
Source:
Returns:
The wind speed for the specified day, or null if not available or error.
Type
number | null

setAddress(value)

Sets the address in the weather data.
Parameters:
Name Type Description
value string The new address to be set.
Source:

setCloudcoverAtDatetime(dayInfo, timeInfo, value)

Sets the cloud cover for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The cloud cover to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setCloudcoverOnDay(dayInfo, value)

Sets the cloud cover percentage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new cloud cover percentage to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setConditionsAtDatetime(dayInfo, timeInfo, value)

Sets the conditions for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value string The conditions to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setConditionsOnDay(dayInfo, value)

Sets the weather conditions for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new conditions value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setDataAtDatetime(dayInfo, timeInfo, data)

Sets weather data for a specific date and time from the weather data collection.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index, pointing to a specific day in the data.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index, pointing to a specific time slot in the day's data.
data Object The data dictionary to be set for the specific hourly time slot.
Source:
Throws:
Propagates any exceptions that may occur during data setting.
Type
Error

setDataOnDay(dayInfo, data)

Updates weather data for a specific day based on a date string or index.
Parameters:
Name Type Description
dayInfo string | number The identifier for the day, which can be a date string (YYYY-MM-DD) or an index of the day list.
data object The new weather data dictionary to replace the existing day's data.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setDatetimeEpochAtDatetime(dayInfo, timeInfo, value)

Sets the epoch time for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The epoch time value to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setDescriptionOnDay(dayInfo, value)

Sets the weather description for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new description to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setDewAtDatetime(dayInfo, timeInfo, value)

Sets the dew point temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The dew point temperature to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setDewOnDay(dayInfo, value)

Sets the dew point for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new dew point value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setFeelsLikeAtDatetime(dayInfo, timeInfo, value)

Sets the 'feels like' temperature for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The 'feels like' temperature value to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setFeelslikeOnDay(dayInfo, value)

Sets the 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new 'feels like' temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setFeelslikemaxOnDay(dayInfo, value)

Sets the maximum 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new maximum 'feels like' temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setFeelslikeminOnDay(dayInfo, value)

Sets the minimum 'feels like' temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new minimum temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setHourlyDataOnDay(dayInfo, data)

Sets the hourly weather data for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
data Array The new list of hourly weather data dictionaries to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setHumidityAtDatetime(dayInfo, timeInfo, value)

Sets the humidity for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The humidity percentage to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setHumidityOnDay(dayInfo, value)

Sets the humidity percentage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new humidity percentage value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setIconAtDatetime(dayInfo, timeInfo, value)

Sets the weather icon for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value string The weather icon to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setIconOnDay(dayInfo, value)

Sets the weather icon for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new icon to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setLatitude(value)

Sets the latitude in the weather data.
Parameters:
Name Type Description
value number The new latitude to be set.
Source:
Throws:
If the latitude value is out of <-90, 90> range.
Type
RangeError

setLongitude(value)

Sets the longitude in the weather data.
Parameters:
Name Type Description
value number The new longitude to be set.
Source:
Throws:
If the longitude value is out of <-180, 180> range.
Type
RangeError

setMoonphaseOnDay(dayInfo, value)

Sets the moon phase for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new moon phase value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setPrecipAtDatetime(dayInfo, timeInfo, value)

Sets the precipitation amount for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The precipitation amount to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setPrecipOnDay(dayInfo, value)

Sets the precipitation amount for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new precipitation amount value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setPrecipProbAtDatetime(dayInfo, timeInfo, value)

Sets the probability of precipitation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The probability of precipitation to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setPrecipcoverOnDay(dayInfo, value)

Sets the precipitation coverage for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new precipitation coverage value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setPrecipprobOnDay(dayInfo, value)

Sets the probability of precipitation for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new probability of precipitation value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setPreciptypeAtDatetime(dayInfo, timeInfo, value)

Sets the type of precipitation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value string The type of precipitation to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setPreciptypeOnDay(dayInfo, value)

Sets the type of precipitation for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new type of precipitation value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setPressureAtDatetime(dayInfo, timeInfo, value)

Sets the atmospheric pressure for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The atmospheric pressure to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setPressureOnDay(dayInfo, value)

Sets the atmospheric pressure for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new pressure value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setQueryCost(value)

Sets the cost of the query in the weather data.
Parameters:
Name Type Description
value number The new cost to be set for the query.
Source:

setResolvedAddress(value)

Sets the resolved address in the weather data.
Parameters:
Name Type Description
value string The new resolved address to be set.
Source:

setSevereriskAtDatetime(dayInfo, timeInfo, value)

Sets the severe risk for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The severe risk to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setSevereriskOnDay(dayInfo, value)

Sets the severe weather risk level for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new severe weather risk level to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSnowAtDatetime(dayInfo, timeInfo, value)

Sets the snow amount for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The snow amount to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setSnowDepthAtDatetime(dayInfo, timeInfo, value)

Sets the snow depth for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The snow depth to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setSnowOnDay(dayInfo, value)

Sets the snowfall amount for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new snowfall amount to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSnowdepthOnDay(dayInfo, value)

Sets the snow depth for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new snow depth to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSolarenergyAtDatetime(dayInfo, timeInfo, value)

Sets the solar energy for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The solar energy to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setSolarenergyOnDay(dayInfo, value)

Sets the solar energy level for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new solar energy level to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSolarradiationAtDatetime(dayInfo, timeInfo, value)

Sets the solar radiation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The solar radiation to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setSolarradiationOnDay(dayInfo, value)

Sets the solar radiation level for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new solar radiation level to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSourceAtDatetime(dayInfo, timeInfo, value)

Sets the type of weather data used for this weather object for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value string The type of weather data to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setStations(value)

Sets the list of weather stations in the weather data.
Parameters:
Name Type Description
value Array The new list of weather stations to be set.
Source:

setStationsAtDatetime(dayInfo, timeInfo, value)

Sets the weather stations that were used for creating the observation for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value Array.<string> The weather stations to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setStationsOnDay(dayInfo, value)

Sets the weather stations data for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value Array The new list of weather stations to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSunriseEpochOnDay(dayInfo, value)

Sets the Unix timestamp for the sunrise time for a specific day.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new sunrise Unix timestamp value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSunriseOnDay(dayInfo, value)

Sets the sunrise time for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new sunrise time value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSunsetEpochOnDay(dayInfo, value)

Sets the Unix timestamp for the sunset time for a specific day.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new sunset Unix timestamp value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setSunsetOnDay(dayInfo, value)

Sets the sunset time for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value string The new sunset time value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setTempOnDay(dayInfo, value)

Sets the temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setTempmaxOnDay(dayInfo, value)

Sets the maximum temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new maximum temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setTempminOnDay(dayInfo, value)

Sets the minimum temperature for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new minimum temperature value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setTimezone(value)

Sets the timezone in the weather data.
Parameters:
Name Type Description
value string The new timezone to be set.
Source:

setTzoffset(value)

Sets the timezone offset in the weather data.
Parameters:
Name Type Description
value number The new timezone offset to be set.
Source:

setUvindexAtDatetime(dayInfo, timeInfo, value)

Sets the UV index for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The UV index to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setUvindexOnDay(dayInfo, value)

Sets the UV index for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new UV index value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setVisibilityAtDatetime(dayInfo, timeInfo, value)

Sets the visibility for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The visibility to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setVisibilityOnDay(dayInfo, value)

Sets the visibility distance for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new visibility distance to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setWeatherDailyData(dailyData)

Set the daily weather data.
Parameters:
Name Type Description
dailyData Array.<object> List of daily weather data dictionaries.
Source:

setWeatherData(data)

Set the internal weather data.
Parameters:
Name Type Description
data object Weather data to store.
Source:

setWinddirAtDatetime(dayInfo, timeInfo, value)

Sets the wind direction for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The wind direction to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setWinddirOnDay(dayInfo, value)

Sets the wind direction for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new wind direction value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setWindgustAtDatetime(dayInfo, timeInfo, value)

Sets the wind gust speed for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The wind gust speed to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setWindgustOnDay(dayInfo, value)

Sets the wind gust value for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new wind gust value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

setWindspeedAtDatetime(dayInfo, timeInfo, value)

Sets the wind speed for a specific datetime within the weather data.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index.
value number The wind speed to be set.
Source:
Throws:
Propagates any exceptions that may occur during the setting process.
Type
Error

setWindspeedOnDay(dayInfo, value)

Sets the wind speed for a specific day identified by date or index.
Parameters:
Name Type Description
dayInfo string | number The day's date as a string ('YYYY-MM-DD') or index as an integer.
value number The new wind speed value to set.
Source:
Throws:
If the dayInfo is neither a string nor a number.
Type
TypeError

updateDataAtDatetime(dayInfo, timeInfo, data)

Updates weather data for a specific date and time in the weather data collection.
Parameters:
Name Type Description
dayInfo string | number A day identifier, which can be a date string (YYYY-MM-DD) or an index, pointing to a specific day in the data.
timeInfo string | number A time identifier, which can be a time string (HH:MM:SS) or an index, pointing to a specific time slot in the day's data.
data Object The data dictionary to be updated for the specific hourly time slot.
Source:
Throws:
Propagates any exceptions that may occur during data setting.
Type
Error

(static) filterItemByDatetimeVal(src, datetimeVal) → {Object|null}

Filters an item by its datetime value from a list of dictionaries, each containing a 'datetime' key.
Parameters:
Name Type Description
src Array The source list of dictionaries, each expected to contain a 'datetime' key.
datetimeVal string | number The datetime value used for filtering, which can be a date string or an index.
Source:
Throws:
If the datetimeVal is neither a string nor a number.
Type
TypeError
Returns:
The filtered dictionary item, or null if not available.
Type
Object | null

(static) setItemByDatetimeVal(src, datetimeVal, data)

Sets an item's data by its datetime value in a list of dictionaries based on the given datetimeVal.
Parameters:
Name Type Description
src Array The source list of dictionaries, each expected to contain a 'datetime' key.
datetimeVal string | number The datetime value used for updating, which can be a date string or an index.
data Object The new data dictionary to replace the old dictionary.
Source:
Throws:
If the input data is not an object or datetimeVal is neither a string nor a number.
Type
TypeError

(static) updateItemByDatetimeVal(src, datetimeVal, data)

Updates an item's data by its datetime value in a list of dictionaries based on the given datetimeVal.
Parameters:
Name Type Description
src Array The source list of dictionaries, each expected to contain a 'datetime' key.
datetimeVal string | number The datetime value used for updating, which can be a date string or an index.
data Object The new data dictionary to update the old dictionary.
Source:
Throws:
If the input data is not an object or datetimeVal is neither a string nor a number.
Type
TypeError

(static) validateParamDate(param) → {string|number}

Validate and return the date for which to retrieve weather data.
Parameters:
Name Type Description
param string | number The date for which to retrieve weather data.
Source:
Throws:
If the input data type is neither a string nor a number or its format is invalid.
Type
TypeError | Error
Returns:
The validated date for which to retrieve weather data.
Type
string | number

(static) validateParamElements(param) → {string}

Specifies the specific weather elements to include in the result data.
Parameters:
Name Type Description
param Array.<string> The specific weather elements to include in the result data.
Source:
Throws:
If the input data type is not a string, or an unsupported value is used.
Type
TypeError | Error
Returns:
The validated weather elements to include in the result data as a comma separated list.
Type
string

(static) validateParamInclude(param) → {string}

Specifies the sections to include in the result data.
Parameters:
Name Type Description
param Array.<string> The sections to include in the result data.
Source:
Throws:
If the input data type is not a string, or an unsupported value is used.
Type
TypeError | Error
Returns:
The validated sections to include in the result data as a comma separated list.
Type
string

(static) validateParamUnitGroup(param) → {string}

Validate and return the system of units used for the output data.
Parameters:
Name Type Description
param string The system of units used for the output data.
Source:
Throws:
If the input data type is not a string, or an unsupported value is used.
Type
TypeError | Error
Returns:
The validated unitGroup to specify the units that will be used when returning weather data.
Type
string