[{"name":"RawData","comment":" The RawData module exposes two functions\n\n    get : String -> Maybe RawData\n\nand\n\n    getData : Int -> Int -> RawData -> Maybe Data\n\nThe first intelligently extracts a data table,\ncolumn headers, and metadata from a string\nrepresenting data in one of several formats --\ncsv, tab-delimited, or space-delimited. With\nthe second, one can extract a list of Points\nin the xy plane from a data table.\n\nA RawData value is a record of the following form:\n\n    type alias RawData =\n        { metadata : List String\n        , columnHeaders : List String\n        , data : Table\n        }\n\nHere is how one can construct such a record from actual deta:\n\n    > get SampleData.temperature\n         Just {\n             columnHeaders = [\"Year\",\"Value\"]\n           , metadata = [\"Global Land and Ocean Temperature Anomalies\"\n                         ,\"January-December 1880-2016\"\n                         ,\"Units: Degrees Celsius\"\n                        ]\n           , rawData = [[\"1880\",\"-0.12\"],[\"1881\",\"-0.07\"],[\"1882\",\"-0.08\"]\n                        [\"1883\",\"-0.15\"], ...\n\nTo extract a list of points from the raw data, one proceeds as in the next example:\n\n    > get D.temperature |> Maybe.andThen (dataFromRawData 0 1)\n\n@docs RawData, get, getData, getColumn\n\n","unions":[],"aliases":[{"name":"RawData","comment":" A RawData value consists of metadata, columnHeaders,\nand data. The first two are lists of strings, while the\nlast is a list of records, where a record is a lest of\nstrings.\n","args":[],"type":"{ metadata : List.List String.String, columnHeaders : List.List String.String, data : RawData.Table }"}],"values":[{"name":"get","comment":" get makes intelligent guesses, If it is successful\n\n> get spaceTest\n> Just ([\"x\",\"y\"],[[\"0\",\"0\"],[\"1\",\"0\"],[\"1\",\"1\"],[\"0\",\"1\"]])\n\nThe function `get` accomplishes its work as follows. (1) it inspects the\ndata and makes a guess about is format:\n\n    type DataFormat\n        = SpaceDelimited\n        | TabDelimited\n        | CommaDelimited\n\nHere CommaDelimited means Csv. (2) With this guess in hand the string\nis parsed into a Table value, i.e., a list of records. As is, it is\nusually in an unsatisfactory state. (3) Another informed guess is made\nabout the the number of fields in the actual data, i.e., the number of\ncolumns of data. (4) The Table is filtered, removing rows that have\ntoo few or too many fields. (5) It is assumed that the real data is numerical,\nand that it starts on row k. An informed guess is made about the value of k,\nand the rows 1 through k - 1 are discarded. The actual data is now in hand,\nalbeit as a table of strings. There is also enough information hand to extract\nthe column headers -- the row of non-data just before the data starts, and\nthe other metadata, the rows before the column headers .\n\nThe process just described is not fail-safe, but is it works quite frequently.\nOne sometimes has to fix the data with a text editor.\n\n","type":"String.String -> Maybe.Maybe RawData.RawData"},{"name":"getColumn","comment":" getColumn i table extracts a list of Floats from\na table (List of Records) by extracting column i of the\nTable, transforming the result to lists of floats.\n","type":"Basics.Int -> RawData.Table -> Maybe.Maybe (List.List Basics.Float)"},{"name":"getData","comment":" getData i j rawData_ extracts Data from\nRawData by extracting columns i and j of the\nRawData, trasforming these to lists of floats,\nand using these as the x and y coordinates of\na list of Points.\n","type":"Basics.Int -> Basics.Int -> RawData.RawData -> Maybe.Maybe Stat.Data"}],"binops":[]},{"name":"Stat","comment":" The aim of this library is to compute statistics for 2D data.\n\n@docs Data, Point, Statistics, mean, mode, filter, maximum, minimum, statistics, stdev\n\n","unions":[],"aliases":[{"name":"Data","comment":" The fundamental data structure: a list of points.\n","args":[],"type":"List.List Stat.Point"},{"name":"Point","comment":" A point in the Cartesian plane\ngiven by x and y coordinates\n","args":[],"type":"{ x : Basics.Float, y : Basics.Float }"},{"name":"Statistics","comment":" A `Statistics` value holds information like\nthe mean and standard deviation of the x and y\nvalues of `Data` value (list of points), as well\nas the coefficients `m` and `b` of the regression\nline, the `R^2` value, etc. Compute using\n`statistics data`.\n","args":[],"type":"{ m : Basics.Float, b : Basics.Float, n : Basics.Int, r2 : Basics.Float, xMin : Basics.Float, xMax : Basics.Float, xMean : Basics.Float, yMean : Basics.Float, xStdev : Basics.Float, yStdev : Basics.Float, leftDataPoint : Stat.Point, rightDataPoint : Stat.Point, leftRegressionPoint : Stat.Point, rightRegressionPoint : Stat.Point }"}],"values":[{"name":"filter","comment":" Apply filters to the data, This is set\nup as a pipeline so that other filters\ncan be added later. We may have to go\nwith different architectue if we have\nmay filters -- best to avoid too many\nrepeated list traversals.\n","type":"Stat.Filter -> Stat.Data -> Stat.Data"},{"name":"maximum","comment":" Compute the maximum of a column in a list of data, e.g.,\n\n    ```maximum .x data```\n\nwhich computes the maximum of the x-values.\n\n","type":"(data -> Basics.Float) -> List.List data -> Maybe.Maybe Basics.Float"},{"name":"mean","comment":" Compute the mean of a column in a list of data, e.g.,\n\n    ```mean .x data```\n\nwhich computes the mean of the x-values.\n\n","type":"(data -> Basics.Float) -> List.List data -> Maybe.Maybe Basics.Float"},{"name":"minimum","comment":" Compute the minimum of a column in a list of data, e.g.,\n\n    ```minimum .x data```\n\nwhich computes the minimum of the x-values.\n\n","type":"(data -> Basics.Float) -> List.List data -> Maybe.Maybe Basics.Float"},{"name":"mode","comment":" Compute the mode of the data:\n\n> data = [1, 5, 2, 2, 2, 2, 5, 3, 1][1,5,2,2,2,2,5,3,1]\n\n> mode data\n> Just (2,4) : Maybe ( number, Int )\n> data = [\"red\", \"green\", \"red\", \"blue\", \"blue\", \"red\"][\"red\",\"green\",\"red\",\"blue\",\"blue\",\"red\"]\n\n> mode data\n> Just (\"red\",3) : Maybe ( String, Int )\n\n","type":"List.List comparable -> Maybe.Maybe ( comparable, Basics.Int )"},{"name":"statistics","comment":" Compute the statistics of a `Data` value.\n","type":"Stat.Data -> Maybe.Maybe Stat.Statistics"},{"name":"stdev","comment":" Compute the standard deviation of a column in a list of data, e.g.,\n\n    ```stdev .x data```\n\nwhich computes the standard deviation of the x-values.\n\n","type":"(data -> Basics.Float) -> List.List data -> Maybe.Maybe Basics.Float"}],"binops":[]}]