GeoEco.DataProducts.NOAA.ClimateIndices.PSLClimateIndices.UrlToArcGISTable
- classmethod PSLClimateIndices.UrlToArcGISTable(url, table, field, overwriteExisting=False)
Creates and populates a table of climate index values parsed from NOAA PSL climate index time series data downloaded from a URL.
Requires: ArcGIS Pro 3.2.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.2.0 or later, 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.
table (
str) –Table to create and populate. The table will have four fields:
IndexDate(DATE) - the date of the first day of the month and year of the climate index value (e.g. 1-March-1960).IndexYear(LONG) - the year of the climate index value (e.g. 1990).IndexMonth(LONG) - the month of the climate index value, ranging from 1 to 12.Value(DOUBLE) - the index value for that month and year. The name of this field is specified by the Climate Index Value Field parameter, and need not be “Value”. If the output table is a dBASE table (a DBF file), the missing_value parsed from the input data will be used to represent “no data is available”. For other types of tables, a database NULL will represent “no data is available”.
The second two fields store the same data as the first field but are present for your convenience, in case you prefer the year and month broken out as integers.
The rows will be inserted 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 NULL, as described above. Minimum length꞉ 1.
field (
str) – Name of the field to receive the climate index value. Minimum length꞉ 1.overwriteExisting (
bool, optional) – If True, the output table will be overwritten, if it exists. If False, aValueErrorwill be raised if the output table exists.
- Returns:
1.
float: The value that means “no data is available” in the output table. If the output table is a dBASE table (a DBF file), the missing_value parsed from the input data will be returned. For other types of tables,Nonewill be returned, representing a database NULL.2.
str: The comment parsed from the input data. If no comment was present, an empty string will be returned.- Return type:
tupleof 2 items