# series

Synth's `series`

generator creates streams of events based on different 'processes' (a process here can be an auto-correlated process, a poisson process, a cyclical process etc.).

The `series`

generators are used in several different contexts:

- Creating fake events for event-driven systems
- Modelling time-independent events like 'orders' on a website or 'requests' made to a web server
- Modelling seasonal behaviour, like an increase in flight frequency for a given airline over the summer

#### #

Date TimeAll `series`

are modelled on so called 'Naive Date Times' - that is 'Date Times' that do not have a timezone. This can be interpreted as Timestamps in UTC. There is future work to improve functionality to add other chrono types.

The format of a series can be set by using the optional `format`

field; if `format`

is omitted, the default format is `%Y-%m-%d %H:%M:%S`

.

#### #

DurationThe `series`

generators will often make use of durations as generation parameters. A duration as a quantity like '1 hour' or '5.7 milliseconds'.

The `series`

generators use `humantime`

to make it easy to specify human readable quantities like `3hr 5m 2s`

.

## #

incrementingThe `incrementing`

series simply increments at a fixed duration. This could be for example a stock ticker.

The `incrementing`

series has 2 parameters:

`start`

: The time at which the first event occurs`increment`

: The increment between two consecutive events

#### #

ExampleBelow is an example stock ticker for AAPL sampled at regular intervals every minute.

## #

poissonThe `poisson`

series models independent events which occur at random, but which tend to occur at an average rate when viewed as a group.

One example of a poisson process could be earthquakes occurring during the course of a year, or customers arriving at a store, or cars crossing a bridge etc.

The `poisson`

series has 2 parameters:

`start`

: The time at which the first event occurs`rate`

: The average duration between two consecutive events

#### #

ExampleThe below is an example HTTP server, which was brought up on a given date and has an average of 1 request every 1 minute.

## #

cyclicalThe `cyclical`

series models events which have a 'cyclical' or 'periodic' frequency.

For example, the frequency of orders placed in an online store peaks during the day and is at it's lowest during the night.

The `cyclical`

series has 4 parameters:

`start`

: The time at which the first event occurs`max_rate`

: The maximum average duration between two events.`min_rate`

: The minimum average duration between two events`period`

: The period of the cyclical series.

#### #

ExampleThe below is a minimal example of orders being placed in an online store.

## #

zipThe `zip`

series combines 2 or more series together by `zipping`

the output together. That is, the two series are super imposed.

The `zip`

series has 1 parameter:

`series`

: The child series to be zipped together