GeoEco.DataProducts.NOAA.ClimateIndices.PSLClimateIndices.UrlToList
- classmethod PSLClimateIndices.UrlToList(url, setNoDataValuesToNone=True)
Returns a table of climate index values parsed from the NOAA PSL climate index time series data downloaded from a URL.
Requires: Python requests module.
- Parameters:
url (
str) –URL to a text file containing climate index data in PSL time series format.
https://psl.noaa.gov/data/climateindices/list/ contains a large table that lists the available climate index data produced by PSL. The left column contains hyperlinks to the datasets and the right column contains the descriptions of the datasets. Find the dataset you are interested in, extract the URL from the hyperlink, and provide it to this tool.
For example, if you are interested in the Oceanic Niño Index (ONI), scroll down the table until you reach ONI in the left column. Click on the ONI hyperlink to bring up the page https://psl.noaa.gov/data/correlation/oni.data. Copy/paste that URL from your browser. Minimum length꞉ 1.
setNoDataValuesToNone (
bool, optional) – If True, the returned table will contain aNonewherever the original data has a missing_value. If False, the table will contain the missing_value as it appears in the original data.
- Returns:
1.
listoflistofobject: Table of climate index values parsed from the input data, represented as alistoflists. The outer list contains the rows of the table. Each inner list contains the field values for a row.There are two fields:
Date- the date of the first day of the month and year of the climate index value (e.g. 1-March-1960), as adatetime.Value- the climate index value, as afloat. This value may beNonerather than the missing_value if setNoDataValuesToNone is True.
For example:
[[datetime.datetime(1948, 1, 1, 0, 0), 2.5], [datetime.datetime(1948, 2, 1, 0, 0), None], [datetime.datetime(1948, 3, 1, 0, 0), 2.75], ...]
The rows will be ordered in ascending date order and all 12 months will be included for every year. If these months occur in the future they will have the missing_value (or
None).2.
float: The value that means “no data is available” in the returned table. If setNoDataValuesToNone is False, it will be the missing_value parsed from the input data. If True, it will beNone.3.
str: The comment parsed from the input data. If no comment was present, an empty string will be returned.- Return type:
tupleof 3 items