# Example data

The Deephaven Express package includes several built-in, deterministically generated ticking datasets for testing and experimentation. These datasets initialize with a default number of rows and are designed to demonstrate a range of plot types and pivot table use cases.

## `iris` dataset

```python
from deephaven.plot import express as dx

iris = dx.data.iris()
```

This function generates a deterministically random dataset inspired by the
classic 1936 Iris flower dataset commonly used for classification tasks, with an
additional "ticking" feature. The ticking feature represents a continuously
increasing simulated timestamp.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "iris", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `marketing` dataset

```python
from deephaven.plot import express as dx

marketing = dx.data.marketing()
```

This dataset is intended to be used with the dx.funnel and dx.funnel_area plot types. Each row in this dataset
represents an individual that has visited a company website. The individual may download an instance of the product,
be considered a potential customer, formally request the price of the product, or purchase the product and receive
an invoice. Each of these categories is a strict subset of the last, so it lends itself well to funnel plots.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "marketing", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `jobs` dataset

```python
from deephaven.plot import express as dx

jobs = dx.data.jobs()
```

This dataset is intended to be used with a timeline plot. It demonstrates five different "jobs", each starting
two days after the previous, and each lasting 5 days in total. The job's "resource", or the name of the individual
assigned to the job, is randomly selected. The dataset continues to loop in this way, moving across time until
it is deleted or the server is shut down.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "jobs", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `stocks` dataset

```python
from deephaven.plot import express as dx

stocks = dx.data.stocks()
```

Randomly generated (but deterministic) fictional
stock market data. Starts with the first 5 minutes of data
already initialized so example plots won't start empty.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "stocks", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick using a replayer, if false the whole table will be returned as a static table.", "default": "True"}, {"name": "starting_time", "type": "str", "description": "The starting time for the data generation, defaults to 2018-06-01T08:00:00 ET", "default": "'2018-06-01T08:00:00 ET'"}]}} />

## `tips` dataset

```python
from deephaven.plot import express as dx

tips = dx.data.tips()
```

Homewood, IL: Richard D. Irwin Publishing.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "tips", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, a ticking table containing the entire Tips dataset will be returned, and new rows of synthetic data will tick in every second. If false, the Tips dataset will be returned as a static table.", "default": "True"}]}} />

## `election` dataset

```python
from deephaven.plot import express as dx

election = dx.data.election()
```

When this function is called, it will return a table containing the first 19 rows of the dataset.
Then, a new row will tick in each second, until all 58 rows are included in the table. The table will
then reset to the first 19 rows, and continue ticking in this manner until it is deleted or otherwise cleaned up.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "election", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `wind` dataset

```python
from deephaven.plot import express as dx

wind = dx.data.wind()
```

When this function is called, it will return a table containing the first 42 rows of the dataset.
Then, a new row will tick in each second, until all 128 rows are included in the table. The table will
then reset to the first 42 rows, and continue ticking in this manner until it is deleted or otherwise cleaned up.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "wind", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `gapminder` dataset

```python
from deephaven.plot import express as dx

gapminder = dx.data.gapminder()
```

The original Gapminder dataset from the plotly-express package has a single measurement per country once every five
years, starting in 1952 and ending in 2007. This resolution is not ideal for ticking data. So, this ticking version
creates new data points for every country at every month between measurements. For example, between two real
observations in 1952 and 1957, there are 12 * 5 - 1 synthetic observations for population, life expectancy, and GDP.
The synthetic data are simply computed by linear interpolation of the two nearest real observations. Finally, the
dataset ticks in one new month every second, and every country in the dataset gets updated each time, so a total of
142 rows tick in per second. The dataset starts with years up to 1961, ticks in each month till 2007, and then
repeats until the table is cleaned up or deleted.

**Returns:** `Table` A Deephaven Table

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "gapminder", "parameters": [{"name": "ticking", "type": "bool", "description": "If true, the table will tick new data every second.", "default": "True"}]}} />

## `fish_market` dataset

```python
from deephaven.plot import express as dx

fish_market = dx.data.fish_market()
```

Returns a fish market sales dataset designed for pivot table examples. Ticks every second,
is random but deterministic, and contains lots of categorical data for pivoting.

**Returns:** `Table` A Deephaven Table suitable for pivot table demonstrations.

<ParamTable param={{"module_name": "deephaven.plot.express.data.", "name": "fish_market", "parameters": [{"name": "ticking", "type": "bool", "description": "When true, one new transaction will tick in every second. When false, returns 1000 rows.", "default": "True"}]}} />
