DatasetWeatherTokyoMeanAirTemperature
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RicardoSantos

//@version=5

// @description Provides a data set of the monthly mean air temperature (°C) for the city of Tokyo in Japan.
//  this was just for fun, no financial implications in this.
// reference:
//		https://www.data.jma.go.jp/obd/stats/etrn/view/monthly_s3_en.php?block_no=47662
// 		TOKYO   WMO Station ID:47662 Lat 35o41.5'N  Lon 139o45.0'E
library(title='DatasetWeatherTokyoMeanAirTemperature')

// @function the years of the data set.
// @returns
//		array<int> : year values.
export year_ () =>
	var array<int> year_ = array.from(
		  1875, 1876, 1877, 1878, 1879, 
		  1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 
		  1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 
		  1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 
		  1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 
		  1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 
		  1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 
		  1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 
		  1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 
		  1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 
		  1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 
		  1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 
		  1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 
		  2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
		  2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 
		  2020, 2021, 2022
		  )

// @function the january values of the dataset
// @returns
//		array\<float> : data values for january.
export january () =>
	var array<float> january = array.from(
		  float(na), 1.6, 3.2, 2.3, 3.2, 
		  2.6, 2.1, 4.6, 3.1, 2.6, 0.6, 2.4, 2.7, 3.3, 2.1, 
		  3.4, 2.4, 3.7, 2.6, 3.0, 2.1, 3.3, 3.7, 3.6, 3.2, 
		  1.6, 4.1, 2.4, 4.6, 1.9, 4.3, 2.2, 4.0, 3.2, 2.1, 
		  4.2, 2.5, 3.0, 1.9, 4.3, 3.3, 5.1, 2.3, 1.6, 2.8, 
		  4.1, 4.0, 0.6, 1.7, 2.7, 2.9, 3.1, 2.7, 3.6, 2.6, 
		  3.8, 2.9, 5.9, 3.2, 2.5, 3.7, 2.0, 4.6, 2.7, 2.4, 
		  2.7, 4.8, 2.9, 2.4, 3.0, 1.1, 3.5, 3.4, 4.0, 5.4, 
		  5.0, 3.3, 4.3, 3.3, 4.3, 3.8, 4.2, 5.7, 5.0, 3.7, 
		  5.0, 3.6, 4.5, 3.2, 5.4, 4.4, 4.6, 4.4, 5.7, 5.7, 
		  4.5, 5.1, 6.6, 6.3, 4.4, 4.7, 5.4, 3.4, 5.6, 6.6, 
		  5.6, 4.4, 5.8, 6.2, 3.7, 4.1, 4.5, 5.8, 7.7, 8.1, 
		  5.0, 6.3, 6.8, 6.2, 5.5, 6.3, 6.6, 6.8, 5.3, 6.6, 
		  7.6, 4.9, 7.4, 5.5, 6.3, 6.1, 5.1, 7.6, 5.9, 6.8, 
		  7.0, 5.1, 4.8, 5.5, 6.3, 5.8, 6.1, 5.8, 4.7, 5.6, 
		  7.1, 5.4, 4.9
		  )

// @function the february values of the dataset
// @returns
//		array\<float> : data values for february.
export february () =>
	var array<float> february = array.from(
		  float(na), 3.4, 3.6, 2.5, 5.4, 
		  5.8, 3.7, 5.2, 1.9, 2.7, 2.2, 2.0, 4.3, 2.2, 3.1, 
		  6.1, 3.8, 4.1, 2.2, 3.7, 4.0, 3.5, 3.5, 4.4, 4.2, 
		  3.1, 3.7, 3.8, 4.1, 4.3, 2.7, 2.6, 2.9, 3.4, 3.1, 
		  2.9, 5.2, 6.2, 4.5, 3.5, 4.1, 4.1, 4.5, 3.6, 3.7, 
		  2.6, 3.5, 7.0, 3.0, 4.5, 2.4, 4.6, 2.1, 3.3, 2.9, 
		  5.4, 2.5, 4.3, 3.6, 4.0, 4.8, 2.5, 5.7, 3.4, 4.1, 
		  3.7, 5.0, 2.6, 4.0, 3.2, 1.6, 4.2, 2.7, 5.1, 6.5, 
		  4.7, 4.5, 2.6, 4.2, 5.6, 6.2, 4.3, 4.3, 6.0, 7.3, 
		  6.6, 4.5, 5.9, 4.8, 4.2, 4.7, 7.2, 4.9, 4.3, 5.7, 
		  6.0, 5.9, 5.1, 6.9, 5.1, 5.1, 6.8, 4.9, 4.2, 8.4, 
		  5.2, 5.3, 5.5, 6.1, 3.0, 6.5, 4.3, 6.8, 4.9, 7.5, 
		  7.8, 6.5, 6.9, 7.7, 6.6, 6.5, 5.4, 7.0, 7.0, 6.7, 
		  6.0, 6.6, 7.9, 6.4, 8.5, 6.2, 6.7, 8.6, 5.5, 7.8, 
		  6.5, 7.0, 5.4, 6.2, 5.9, 5.7, 7.2, 6.9, 5.4, 7.2, 
		  8.3, 8.5, 5.2
	  	  )

// @function the march values of the dataset
// @returns
//		array\<float> : data values for march.
export march () =>
	var array<float> march = array.from(
		  float(na), 8.1, 6.2, 7.2, 8.0, 
		  8.4, 5.3, 6.9, 5.3, 6.1, 4.9, 6.9, 6.9, 7.2, 6.9, 
		  9.2, 8.9, 5.1, 6.2, 8.4, 6.9, 6.0, 5.7, 5.5, 8.5, 
		  5.7, 7.3, 8.4, 7.7, 6.1, 5.6, 7.3, 5.6, 6.2, 6.3, 
		  6.1, 8.2, 8.1, 6.2, 8.8, 6.6, 5.8, 6.5, 6.7, 8.3, 
		  6.6, 6.2, 6.6, 7.9, 5.0, 6.2, 6.3, 6.3, 6.9, 7.1, 
		  8.8, 7.9, 6.9, 5.8, 6.1, 7.1, 6.1, 8.1, 8.8, 7.4, 
		  8.2, 8.2, 10.3, 6.8, 5.6, 6.6, 6.2, 6.8, 6.5, 6.7,
		  7.7, 8.8, 7.4, 9.4, 8.4, 8.7, 8.6, 6.8, 8.4, 8.9, 
		  9.5, 8.2, 8.2, 7.6, 7.6, 6.9, 9.6, 9.5, 10.0, 7.9, 
		  5.5, 8.3, 9.7, 7.8, 7.3, 7.9, 9.0, 9.3, 8.7, 9.9, 
		  8.2, 9.0, 9.9, 8.6, 5.9, 7.8, 7.8, 9.3, 8.4, 9.6, 
		  10.6, 9.5, 9.7, 8.7, 8.1, 8.9, 9.2, 10.5, 10.1, 10.1, 
		  9.4, 9.8, 12.2, 8.7, 9.8, 9.0, 9.8, 10.8, 10.7, 10.0, 
		  9.1, 8.1, 8.8, 12.1, 10.4, 10.3, 10.1, 8.5, 11.5, 10.6, 
		  10.7, 12.8, 10.9
		  )

// @function the april values of the dataset
// @returns
//		array\<float> : data values for april.
export april () =>
	var array<float> april = array.from(
		  float(na), 12.2, 13.6, 11.5, 12.6, 
		  12.3, 11.6, 13.7, 12.0, 11.6, 10.7, 12.3, 12.2, 12.4, 12.0, 
		  14.2, 12.0, 13.1, 13.3, 13.8, 12.9, 13.7, 11.3, 11.2, 12.8, 
		  11.4, 13.4, 11.6, 12.7, 13.2, 10.9, 12.9, 12.4, 12.3, 13.6, 
		  12.3, 13.8, 13.0, 13.6, 11.8, 11.6, 12.7, 12.7, 11.7, 13.4, 
		  12.6, 13.8, 13.3, 12.0, 14.7, 11.9, 11.1, 13.5, 12.5, 12.6, 
		  14.0, 12.4, 12.3, 12.3, 11.5, 12.5, 12.0, 12.8, 13.2, 12.8, 
		  13.1, 12.7, 13.6, 11.8, 10.6, 13.5, 14.3, 13.1, 14.2, 12.1, 
		  13.9, 13.3, 13.3, 12.7, 14.9, 13.6, 13.1, 14.3, 13.9, 15.3, 
		  12.8, 14.9, 14.1, 13.9, 15.3, 11.1, 13.6, 14.5, 14.1, 14.6, 
		  13.0, 13.5, 13.4, 15.3, 14.8, 14.3, 13.0, 15.1, 13.9, 13.9, 
		  13.6, 13.9, 14.0, 15.9, 11.6, 14.2, 13.9, 14.4, 14.3, 15.6, 
		  14.7, 15.4, 15.1, 13.4, 15.8, 15.0, 12.7, 15.2, 16.3, 15.0, 
		  14.5, 15.7, 16.1, 15.1, 16.4, 15.1, 13.6, 13.7, 14.7, 15.7, 
		  12.4, 14.5, 14.5, 15.2, 15.0, 14.5, 15.4, 14.7, 17.0, 13.6, 
		  12.8, 15.1, 15.3
		  )

// @function the may values of the dataset
// @returns
//		array\<float> : data values for may.
export may () =>
	var array<float> may = array.from(
		  float(na), 17.0, 16.5, 18.3, 18.0, 
		  17.7, 17.2, 16.8, 15.5, 15.5, 15.2, 16.4, 15.2, 16.0, 15.7, 
		  16.1, 18.2, 16.6, 15.8, 16.3, 17.5, 16.6, 17.3, 16.7, 17.9, 
		  17.3, 16.1, 16.3, 15.9, 15.7, 16.9, 16.3, 17.1, 16.1, 16.9, 
		  16.8, 16.2, 16.7, 16.1, 17.8, 15.9, 16.9, 15.8, 16.7, 16.2, 
		  16.8, 16.4, 16.8, 16.8, 16.9, 16.1, 16.3, 17.1, 17.8, 15.9, 
		  17.7, 16.3, 18.0, 18.1, 17.8, 16.7, 16.4, 17.6, 18.7, 17.0, 
		  17.7, 17.6, 17.3, 17.8, 17.7, 15.6, 16.9, 16.9, 18.1, 18.4, 
		  19.2, 18.0, 18.1, 17.8, 17.6, 18.2, 17.6, 17.1, 18.0, 18.5, 
		  17.8, 19.8, 18.4, 18.4, 18.9, 17.2, 17.9, 20.0, 17.5, 19.6, 
		  19.6, 17.4, 18.6, 17.9, 19.3, 18.6, 17.7, 18.7, 19.0, 18.6, 
		  19.2, 17.5, 20.7, 19.7, 17.2, 19.1, 17.9, 19.3, 18.2, 17.7, 
		  19.2, 18.8, 17.3, 18.1, 19.5, 19.1, 18.1, 19.2, 20.5, 19.9, 
		  19.8, 19.5, 18.4, 18.8, 19.6, 17.7, 19.0, 19.8, 18.5, 20.1, 
		  19.0, 18.5, 19.6, 19.8, 20.3, 21.1, 20.2, 20.0, 19.8, 20.0, 
		  19.5, 19.6, 18.8
		  )

// @function the june values of the dataset
// @returns
//		array\<float> : data values for june.
export june () =>
	var array<float> june = array.from(
		  22.3, 18.5, 22.0, 20.0, 21.4, 
		  19.8, 21.3, 20.4, 19.8, 19.8, 20.3, 20.9, 20.3, 18.6, 20.9, 
		  22.0, 20.3, 21.1, 20.5, 23.6, 20.4, 21.6, 18.8, 19.2, 21.5, 
		  19.3, 20.6, 19.8, 19.7, 21.8, 20.8, 18.4, 19.2, 20.9, 20.2, 
		  20.7, 20.8, 20.1, 20.3, 21.5, 21.9, 22.7, 19.6, 20.1, 19.8, 
		  20.3, 18.8, 21.7, 20.4, 19.4, 20.1, 19.0, 20.5, 20.3, 20.6, 
		  21.4, 20.4, 19.8, 21.9, 22.0, 21.5, 21.4, 19.6, 20.8, 20.7, 
		  22.1, 20.8, 22.2, 21.5, 22.3, 20.4, 23.3, 19.2, 21.6, 19.4, 
		  21.8, 21.2, 21.3, 20.6, 18.3, 22.7, 22.3, 19.8, 22.0, 20.4, 
		  21.5, 22.6, 20.9, 21.8, 21.5, 21.6, 20.1, 23.0, 22.0, 21.8, 
		  20.7, 21.3, 21.4, 19.8, 21.9, 21.6, 21.5, 20.9, 23.8, 24.4, 
		  23.6, 20.2, 21.4, 20.5, 21.8, 20.2, 21.1, 22.1, 22.3, 20.7, 
		  23.5, 23.6, 20.6, 21.7, 22.4, 20.4, 22.6, 22.7, 21.5, 22.8, 
		  22.5, 23.1, 21.6, 23.2, 23.7, 23.2, 22.5, 23.2, 21.3, 22.5, 
		  23.6, 22.8, 21.4, 22.9, 23.4, 22.1, 22.4, 22.0, 22.4, 21.8, 
		  23.2, 22.7, 23.0
		  )

// @function the july values of the dataset
// @returns
//		array\<float> : data values for july.
export july () =>
	var array<float> july = array.from(
		  26.0, 24.3, 26.5, 26.0, 26.1, 
		  24.2, 24.0, 24.2, 23.7, 23.4, 23.1, 25.0, 23.6, 24.5, 23.4, 
		  23.5, 24.9, 25.7, 25.3, 26.8, 22.1, 24.1, 22.9, 25.9, 23.2, 
		  22.8, 22.1, 21.8, 23.2, 24.8, 23.3, 23.5, 22.7, 22.1, 24.3, 
		  23.0, 24.5, 24.3, 23.3, 25.5, 24.2, 23.9, 25.7, 26.0, 23.6, 
		  26.1, 24.3, 25.0, 24.0, 26.1, 23.2, 24.6, 26.0, 23.4, 25.9, 
		  26.3, 21.8, 25.7, 26.6, 23.9, 24.3, 24.9, 26.3, 25.0, 26.5, 
		  26.9, 23.7, 27.5, 25.1, 25.6, 22.0, 26.2, 25.7, 26.0, 25.3, 
		  26.5, 24.3, 24.3, 24.7, 22.3, 27.6, 24.2, 24.4, 24.9, 26.1, 
		  25.8, 27.4, 25.1, 25.7, 25.5, 24.2, 24.4, 26.3, 24.7, 25.0, 
		  25.4, 25.8, 25.2, 26.1, 23.4, 25.6, 23.9, 25.8, 27.8, 25.2, 
		  23.8, 26.3, 23.1, 23.8, 26.2, 26.3, 23.9, 27.0, 22.4, 24.1, 
		  25.7, 26.7, 25.5, 22.5, 28.3, 26.4, 26.2, 26.6, 25.3, 25.9, 
		  27.7, 28.5, 28.0, 22.8, 28.5, 25.6, 25.6, 24.4, 27.0, 26.3, 
		  28.0, 27.3, 26.4, 27.3, 26.8, 26.2, 25.4, 27.3, 28.3, 24.1, 
		  24.3, 25.9, 27.4
		  )

// @function the august values of the dataset
// @returns
//		array\<float> : data values for august.
export august () =>
	var array<float> august = array.from(
		  24.9, 26.6, 25.9, 24.6, 26.6, 
		  25.5, 26.7, 24.7, 25.1, 24.1, 25.4, 26.5, 25.3, 25.6, 25.8, 
		  25.4, 25.5, 26.4, 26.2, 27.0, 25.5, 25.9, 25.0, 26.1, 26.1, 
		  26.1, 25.1, 22.9, 25.7, 25.1, 22.2, 24.5, 25.8, 25.4, 25.2, 
		  24.1, 25.6, 25.2, 23.8, 26.4, 25.7, 25.0, 25.0, 26.1, 25.0, 
		  25.7, 25.3, 27.3, 27.2, 26.2, 25.7, 26.3, 26.6, 24.1, 27.1, 
		  26.8, 26.4, 26.7, 27.5, 26.1, 24.8, 26.5, 28.2, 26.0, 25.8, 
		  24.9, 25.4, 27.0, 27.4, 27.5, 26.7, 26.7, 28.0, 25.4, 26.6, 
		  26.2, 26.7, 26.8, 25.0, 27.0, 26.3, 25.4, 27.3, 25.8, 26.7, 
		  26.4, 26.8, 28.1, 26.6, 27.8, 26.7, 26.9, 28.0, 26.6, 27.2, 
		  27.4, 26.7, 26.6, 28.5, 27.1, 27.3, 25.1, 25.0, 28.9, 27.4, 
		  23.4, 26.2, 27.1, 27.5, 28.6, 27.9, 26.8, 27.3, 27.0, 27.1, 
		  28.6, 25.5, 27.0, 24.8, 28.9, 29.4, 26.0, 27.0, 27.2, 28.5, 
		  28.3, 26.4, 28.0, 26.0, 27.2, 28.1, 27.5, 29.0, 26.8, 26.6, 
		  29.6, 27.5, 29.1, 29.2, 27.7, 26.7, 27.1, 26.4, 28.1, 28.4, 
		  29.1, 27.4, 29.6
		  )

// @function the september values of the dataset
// @returns
//		array\<float> : data values for september.
export september () =>
	var array<float> september = array.from(
		  21.5, 22.6, 21.3, 22.8, 21.3, 
		  22.5, 22.7, 21.1, 21.8, 22.3, 22.1, 23.2, 21.0, 20.9, 20.3, 
		  24.2, 24.3, 23.0, 22.5, 21.9, 22.9, 22.3, 20.9, 21.6, 19.8, 
		  22.6, 22.3, 22.6, 22.3, 21.2, 21.9, 19.7, 21.3, 19.4, 21.8, 
		  20.9, 22.6, 20.2, 20.0, 22.5, 22.7, 23.7, 22.0, 22.6, 22.7, 
		  21.4, 21.3, 23.4, 23.4, 21.8, 22.9, 23.2, 21.2, 23.9, 20.5, 
		  21.5, 22.5, 21.8, 23.1, 21.6, 20.8, 24.2, 22.7, 22.4, 23.7, 
		  21.7, 20.6, 24.9, 24.4, 23.2, 22.4, 23.1, 22.9, 23.8, 22.4, 
		  23.8, 20.7, 22.7, 22.2, 24.6, 22.3, 22.7, 20.8, 23.2, 24.1, 
		  23.6, 25.3, 24.5, 21.4, 22.3, 22.2, 23.2, 22.6, 21.9, 22.8, 
		  24.0, 21.1, 23.1, 23.2, 22.8, 25.2, 22.0, 24.3, 22.2, 24.1, 
		  23.0, 21.8, 22.3, 23.1, 23.5, 23.1, 23.7, 23.3, 22.8, 25.2, 
		  24.8, 23.9, 23.3, 22.9, 24.8, 23.7, 22.4, 22.9, 24.4, 26.2, 
		  25.6, 23.2, 23.1, 24.2, 25.1, 24.7, 23.5, 25.2, 24.4, 23.0, 
		  25.1, 25.1, 26.2, 25.2, 23.2, 22.6, 24.4, 22.8, 22.9, 25.1, 
		  24.2, 22.3, float(na)
		  )

// @function the october values of the dataset
// @returns
//		array\<float> : data values for october.
export october () =>
	var array<float> october = array.from(
		  15.3, 14.8, 15.9, 15.8, 15.0, 
		  16.6, 15.7, 15.4, 16.7, 15.8, 16.1, 16.6, 16.6, 15.0, 14.6, 
		  16.0, 16.5, 16.5, 15.9, 15.4, 16.5, 15.8, 15.2, 16.0, 14.3, 
		  16.5, 16.8, 16.6, 15.2, 16.4, 16.2, 15.1, 15.2, 16.1, 14.8, 
		  16.1, 15.8, 15.9, 15.6, 16.1, 17.6, 15.8, 16.8, 16.0, 16.4, 
		  16.4, 15.4, 16.8, 16.8, 15.4, 16.3, 15.0, 16.7, 16.7, 16.5, 
		  16.7, 16.3, 16.5, 16.8, 14.6, 17.1, 16.0, 16.3, 16.7, 17.9, 
		  17.8, 17.3, 16.4, 17.2, 16.3, 16.8, 17.3, 15.6, 17.4, 16.1, 
		  15.8, 17.3, 17.3, 17.2, 15.5, 17.6, 17.3, 17.2, 16.0, 17.6, 
		  16.8, 18.3, 16.7, 16.3, 15.9, 16.9, 18.9, 16.9, 16.3, 17.3, 
		  17.2, 15.5, 18.5, 17.4, 17.8, 17.3, 17.5, 18.7, 17.3, 19.6, 
		  18.2, 17.6, 18.0, 17.7, 17.7, 17.9, 17.1, 18.9, 17.5, 17.5, 
		  19.2, 18.1, 17.3, 17.5, 20.2, 19.5, 18.0, 18.7, 20.1, 19.5, 
		  18.8, 18.7, 19.0, 17.8, 17.5, 19.2, 19.5, 19.0, 19.4, 19.0, 
		  18.9, 19.5, 19.4, 19.8, 19.1, 18.4, 18.7, 16.8, 19.1, 19.4, 
		  17.5, 18.2, float(na)
		  )

// @function the november values of the dataset
// @returns
//		array\<float> : data values for november.
export november () =>
	var array<float> november = array.from(
		  9.7, 9.1, 9.6, 9.7, 9.7, 
		  10.2, 11.0, 9.6, 10.0, 7.6, 10.7, 10.2, 11.6, 11.4, 9.7, 
		  10.8, 10.4, 9.9, 10.1, 11.6, 9.9, 10.7, 10.1, 10.9, 8.9, 
		  11.0, 10.2, 11.5, 9.1, 9.1, 10.3, 9.3, 11.2, 9.1, 10.0, 
		  10.4, 12.8, 9.4, 10.0, 11.9, 11.1, 11.3, 8.7, 10.4, 11.4, 
		  12.0, 9.3, 10.8, 12.0, 9.9, 11.4, 9.8, 11.2, 11.7, 11.0, 
		  10.3, 11.5, 10.9, 11.2, 10.8, 10.7, 11.2, 11.2, 10.8, 12.3, 
		  12.3, 11.7, 10.1, 10.8, 10.9, 11.3, 12.4, 10.3, 11.9, 10.0, 
		  11.1, 11.4, 12.0, 10.4, 11.7, 11.0, 11.8, 12.9, 11.1, 12.3, 
		  12.3, 12.7, 11.3, 12.1, 11.1, 12.7, 12.9, 12.1, 14.1, 12.8, 
		  12.3, 11.9, 12.3, 12.1, 11.7, 12.7, 11.2, 14.8, 12.9, 14.3, 
		  13.0, 10.4, 14.3, 12.3, 12.2, 13.3, 12.3, 12.8, 11.4, 14.2, 
		  15.1, 13.0, 13.0, 14.1, 13.4, 12.7, 13.2, 14.3, 13.9, 14.2, 
		  13.3, 13.1, 11.6, 14.4, 15.6, 13.3, 14.4, 13.3, 13.1, 13.5, 
		  13.5, 14.9, 12.7, 13.5, 14.2, 13.9, 11.4, 11.9, 14.0, 13.1, 
		  14.0, 13.7, float(na)
		  )

// @function the december values of the dataset
// @returns
//		array\<float> : data values for december.
export december () =>
	var array<float> december = array.from(
		  4.6, 4.8, 5.8, 5.1, 8.0, 
		  3.9, 4.3, 5.0, 5.0, 3.4, 5.7, 4.7, 5.7, 5.2, 4.9, 
		  9.3, 5.6, 3.3, 4.7, 5.8, 5.4, 4.8, 3.7, 6.4, 5.5, 
		  5.5, 4.5, 7.1, 4.1, 5.3, 6.8, 5.9, 4.5, 4.6, 4.6, 
		  4.3, 5.0, 4.7, 5.2, 5.8, 5.6, 6.8, 4.0, 3.9, 5.3, 
		  5.2, 5.0, 4.0, 5.6, 5.2, 6.8, 4.1, 5.5, 5.4, 8.6, 
		  5.2, 6.9, 6.0, 6.2, 5.9, 5.5, 6.2, 5.2, 5.9, 5.4, 
		  6.2, 6.9, 5.4, 5.7, 4.3, 4.8, 4.7, 4.1, 7.9, 6.0, 
		  5.4, 7.3, 5.3, 7.6, 7.1, 7.9, 5.0, 8.0, 7.9, 7.0, 
		  6.7, 7.2, 7.0, 8.1, 7.5, 7.0, 6.6, 6.7, 10.2, 7.2, 
		  6.8, 7.9, 8.1, 6.6, 6.7, 6.7, 7.3, 8.9, 8.5, 10.1, 
		  7.7, 7.6, 9.5, 7.1, 7.7, 7.4, 8.5, 8.1, 8.4, 9.2, 
		  10.0, 9.2, 9.4, 8.5, 9.0, 7.7, 9.3, 9.2, 9.0, 9.0, 
		  8.8, 8.4, 7.2, 9.2, 9.9, 6.4, 9.5, 9.0, 9.8, 9.0, 
		  9.9, 7.5, 7.3, 8.3, 6.7, 9.3, 8.9, 6.6, 8.3, 8.5, 
		  7.7, 7.9, float(na)
		  )

// @function the annual values of the dataset
// @returns
//		array\<float> : data values for annual.
export annual () =>
	var array<float> annual = array.from(
		  17.0, 13.6, 14.2, 13.8, 14.6, 
		  14.1, 13.8, 14.0, 13.3, 12.9, 13.1, 13.9, 13.8, 13.5, 13.3, 
		  15.0, 14.4, 14.0, 13.8, 14.8, 13.8, 14.0, 13.2, 14.0, 13.8, 
		  13.6, 13.9, 13.7, 13.7, 13.7, 13.5, 13.1, 13.5, 13.2, 13.6, 
		  13.5, 14.4, 13.9, 13.4, 14.7, 14.2, 14.5, 13.6, 13.8, 14.1, 
		  14.2, 13.6, 14.4, 14.2, 14.0, 13.8, 13.6, 14.1, 14.1, 14.3, 
		  14.8, 14.0, 14.6, 14.7, 13.9, 14.1, 14.1, 14.9, 14.5, 14.7, 
		  14.8, 14.6, 15.0, 14.6, 14.2, 13.6, 14.9, 14.1, 15.2, 14.6, 
		  15.1, 14.7, 14.6, 14.6, 14.8, 15.5, 14.7, 14.9, 15.2, 15.7, 
		  15.4, 15.9, 15.4, 15.0, 15.3, 14.6, 15.5, 15.7, 15.6, 15.6, 
		  15.2, 15.0, 15.7, 15.7, 15.2, 15.6, 15.0, 15.8, 16.1, 16.9, 
		  15.4, 15.0, 16.0, 15.7, 14.9, 15.7, 15.2, 16.3, 15.4, 16.4, 
		  17.0, 16.4, 16.0, 15.5, 16.9, 16.3, 15.8, 16.7, 16.7, 17.0, 
		  16.9, 16.5, 16.7, 16.0, 17.3, 16.2, 16.4, 17.0, 16.4, 16.7, 
		  16.9, 16.5, 16.3, 17.1, 16.6, 16.4, 16.4, 15.8, 16.8, 16.5, 
		  16.5, 16.6, 15.1
		  )

// @function get the temperature values for a specific month.
// @param idx int, month index (1 -> 12 | any other value returns annual average values).
// @returns
//		array\<float> : data values for selected month.
export select_month (int idx) =>
	switch idx
		01 => january()  
		02 => february() 
		03 => march()    
		04 => april()    
		05 => may()      
		06 => june()     
		07 => july()     
		08 => august()   
		09 => september()
		10 => october()  
		11 => november() 
		12 => december() 
		=> annual()

// @function get the temperature value of a specified year and month.
// @param year_  int, year value.
// @param month_ int, month index (1 -> 12 | any other value returns annual average values).
// @returns
//		float : value of specified year and month.
export select_value (int year_, int month_) =>
	int _idx = array.indexof(year_(), year_)
	array.get(select_month(month_), _idx)
//float sum = 0.0
//for _i = 1875 to 2022
//	sum += nz(select_value(_i, 01))
//plot(sum)
//plot(array.sum(january))

// @function the difference of the month air temperature (ºC) to the median of the sample.
// @param month_ int, month index (1 -> 12 | any other value returns annual average values).
// @returns
//		float : difference of current month to median in (Cº)
export diff_to_median (int month_) =>
	var array<float> _month_data = select_month(month_)
	int _idx = bar_index % array.size(_month_data)
	float _diff = array.get(_month_data, _idx) - array.median(_month_data)

plot(diff_to_median(00), color=color.rgb(255, 255, 255, 0), style=plot.style_circles)
plot(diff_to_median(01), color=color.rgb(000, 150, 255, 0), style=plot.style_circles)
plot(diff_to_median(02), color=color.rgb(000, 200, 255, 0), style=plot.style_circles)
plot(diff_to_median(03), color=color.rgb(000, 255, 255, 0), style=plot.style_circles)
plot(diff_to_median(04), color=color.rgb(100, 200, 255, 0), style=plot.style_circles)
plot(diff_to_median(05), color=color.rgb(200, 150, 255, 0), style=plot.style_circles)
plot(diff_to_median(06), color=color.rgb(255, 100, 255, 0), style=plot.style_circles)
plot(diff_to_median(07), color=color.rgb(255, 000, 255, 0), style=plot.style_circles)
plot(diff_to_median(08), color=color.rgb(255, 100, 255, 0), style=plot.style_circles)
plot(diff_to_median(09), color=color.rgb(255, 150, 255, 0), style=plot.style_circles)
plot(diff_to_median(10), color=color.rgb(200, 200, 255, 0), style=plot.style_circles)
plot(diff_to_median(11), color=color.rgb(100, 255, 255, 0), style=plot.style_circles)
plot(diff_to_median(12), color=color.rgb(000, 150, 255, 0), style=plot.style_circles)
plot(bar_index % array.size(annual()) == 0?0:na, color=color.white, style=plot.style_circles, linewidth=4)
