Skip to content

Commit a9ff509

Browse files
author
jonnyp
committed
documentation tidy up and release notes
1 parent 801c098 commit a9ff509

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Head to the address it gives you to check if your changes have worked. More info
4040

4141
## Release Notes
4242

43+
- **3.2.0, February 2018**:
44+
* Added initial version of [analytics library](http://aquaqanalytics.github.io/TorQ/analyticslib/), a set of functions to aid data manipulation
45+
* Added optional [dependency checker](http://aquaqanalytics.github.io/TorQ/gettingstarted/#application-dependency) for applications to check if they have minimal TorQ and kdb+ dependencies
46+
* Added [kdb compression to filealerter](https://github.com/AquaQAnalytics/TorQ/commit/1b048d5e52fa26d537d6c88064b533f376ef08c6). Use case is for compression of tickerplant log files, so log files can be replayed directly rather than having separate uncompress step
47+
* Added [-onelog command line](http://aquaqanalytics.github.io/TorQ/gettingstarted/#logging) option to write stdout/stderr to same log file
48+
* Added [file pattern option](http://aquaqanalytics.github.io/TorQ/utilities/#dataloaderq) to data loading utility
49+
* Bug Fixes
4350
- **3.1.0, May 2017**:
4451
* added kafka which is a real time messaging system with persistent storage in message logs
4552
* added datareplay.q with functionality for generating tickerplant function calls from historical data which can be executed by subscriber functions

docs/analyticslib.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All functions contain usage examples, as well as an explanation on the type and
77

88
## ffills[]
99

10+
### Usage
1011
This script contains the utility to dynamically forward fill a given table keyed by given columns.
1112
Input parameters:
1213
* Dictionary containing:
@@ -32,15 +33,10 @@ To achieve this functionality a function to forward fill mixed list columns was
3233
forwardfill:{$[0h=type x;x maxs (til count x)*(0<count each x);fills x]};
3334
```
3435

35-
If the column is a numerical column it passes through the conditional statement and the function fills gets called.
36-
If the column is a mixed list then a a boolean list is created with 0's at each index in the column where the count 0 is present this is then multiplied by the indexes of each element of the column which is used as
37-
input to the maxs function, thereby forward filling the column.
38-
39-
#### Options
36+
If the column is a numerical column it passes through the conditional statement and the function fills gets called. If the column is a mixed list then a a boolean list is created with 0's at each index in the column where the count 0 is present this is then multiplied by the indexes of each element of the column which is used as input to the maxs function, thereby forward filling the column.
4037

4138
By specifying the `by` condition in the input dictionary the function can forward fill keyed by specific column, for example:
4239

43-
Using the following table:
4440
```
4541
q)table
4642
time sym ask bid asize bsize a id
@@ -82,7 +78,6 @@ time sym ask bid asize bsize a id
8278
8379
```
8480

85-
8681
By specifying the `keycols` condition in the input dictionary the function can forward fill only specific columns, for example:
8782

8883
Using the same data set as before we can create a new input specifying which column we want to forward fill:
@@ -125,8 +120,7 @@ time sym ask bid asize bsize a id
125120
126121
```
127122

128-
129-
#### Example:
123+
### Example
130124
We have the following table:
131125
```
132126
q)table
@@ -177,10 +171,9 @@ time sym ask bid asize bsize a id
177171
```
178172

179173
## pivot[]
180-
Modified from:
181-
182-
http://code.kx.com/q/cookbook/pivoting-tables/#a-very-general-pivot-function-and-an-example
174+
This is a modified version of code available on [code.kx](http://code.kx.com/q/cookbook/pivoting-tables/#a-very-general-pivot-function-and-an-example)
183175

176+
### Usage
184177
This script contains the utility to pivot a table, specifying the keyed columns, the columns
185178
you wish to pivot around and the values you wish to expose. This utility takes a dictionary as
186179
input with the following parameters:
@@ -197,7 +190,7 @@ pivoted table.
197190
The optional function g is a function of the keyed columns, piv and the return of f, which
198191
sorts the columns in ascending order.
199192

200-
#### Example:
193+
### Example 1
201194
We have a table of quotes:
202195

203196
```
@@ -243,7 +236,7 @@ date sym time | price_A_0 price_A_1 price_A_2 price_A_3 price_A_4
243236
..
244237
```
245238

246-
#### Example:
239+
### Example 2
247240
We have the following table showing some FX data:
248241
```
249242
q)t
@@ -301,7 +294,7 @@ parameters:start,end,interval,round (optional)
301294
The intervals.q utility in the .al namespace is used to output a
302295
list of equally spaced intervals between given start and end points.
303296

304-
#### Usage
297+
### Usage
305298

306299
Parameters should be passed in the form of a dictionary, where start
307300
and end must be of the same type and interval can be either a long int
@@ -311,9 +304,9 @@ and intervals of 5 minutes were required interval could equal 05:00 or 5)
311304
Allowed data types are:
312305
date, month, time, minute, second, timestamp, timespan, integer, short, long
313306

314-
#### Examples
307+
### Example 1
315308

316-
##### Using minute datatype:
309+
Using minute datatype:
317310
```
318311
q)params:`start`end`interval`round!(09:32;12:00;00:30;0b)
319312
q)intervals[params]
@@ -333,8 +326,7 @@ q)params:`start`end`interval!(09:32;12:00;00:30)
333326
q)intervals[params]
334327
09:30 10:00 10:30 11:00 11:30 12:00
335328
```
336-
#### Some examples using other datatypes:
337-
##### Date
329+
338330
```
339331
q)params:`start`end`interval!(2001.04.07;2001.05.01;5)
340332
q)intervals[params]
@@ -346,19 +338,16 @@ q)params:`start`end`interval`round!(2001.04.07;2001.05.01;5;0b)
346338
q)intervals[params]
347339
2001.04.07 2001.04.12 2001.04.17 2001.04.22 2001.04.27
348340
```
349-
##### Second
350341
```
351342
q)params:`start`end`interval!(00:20:30 01:00:00 00:10:00)
352343
q)intervals[params]
353344
00:20:00 00:30:00 00:40:00 00:50:00 01:00:00
354345
```
355-
and without rounding
356346
```
357347
q)params:`start`end`interval`round!(00:20:30 01:00:00 00:10:00)
358348
q)intervals[params]
359349
00:20:30 00:30:30 00:40:30 00:50:30
360350
```
361-
##### timespan
362351
```
363352
q)params:`start`end`interval!(00:01:00.000000007;00:05:00.000000001;50000000000)
364353
q)intervals[params]
@@ -368,7 +357,7 @@ q)intervals[params]
368357
The rack utility gives the user the ability to create a rack table
369358
(the cross product of distinct values at the input).
370359

371-
#### Input parameters:
360+
### Usage
372361
* table (required) - keyed or unkeyed in-memory table
373362
* keycols (required) - the columns of the table you want to create the rack from.
374363
* base (optional) - this is an additional table, against which the rack can be created
@@ -377,12 +366,11 @@ The rack utility gives the user the ability to create a rack table
377366
* timeseries.interval (optional) - the interval for the time racking
378367
* timeseries.round (optional) - should rounding be carried out when creating the timeseries
379368
* fullexpansion (optional, default is 0b) - determines whether the required columns of input table will be expanded themselves or not.
380-
#### Usage
369+
381370
- All the above arguments must be provided in dictionary form.
382371
- A timeseries is optional but if it is required then start, end, and timeseries must be specified as a dictionary called 'timseries' (round remains optional with a default value of 1b).
383372
- Keyed tables can be provided, these will be unkeyed by the function and crossed as standard unkeyed tables.
384373

385-
386374
Should full expansion be required the function we use is:
387375
```
388376
racktable:args[`base] cross (((0#args[`keycols]#args[`table]) upsert distinct (cross/)value flip args[`keycols]#args[`table]) cross timeseries);
@@ -395,7 +383,7 @@ If full expansion isn't required the process is similar to the above but there's
395383
racktable:args[`base] cross ((args[`keycols]#args[`table]) cross timeseries)]
396384
```
397385

398-
#### Examples
386+
### Examples
399387
- no fullexpansion, only table and keycols specified
400388
```
401389
q)t

0 commit comments

Comments
 (0)