Doc about using the result of LINQ queries in Excel, R and Tableau

This commit is contained in:
georgis 2014-05-27 17:52:34 -07:00
Родитель 11bb2fba55
Коммит c9b529ac5c
6 изменённых файлов: 63 добавлений и 9 удалений

Просмотреть файл

@ -0,0 +1,62 @@
# Exporting results to .csv file
The single-pass feature of Tx allows to perform LINQ query and feed the output directly to standard .csv file.
This can be useful to integrate with existing popular UI-s for data exploration such as Excel, R and Tableau.
## Excel
To visualize the request duration as scatter-plot in Excel:
- select the Duration column
- choose the INSERT on the ribbon, and then Recommended Charts
- choose Scatter
![RequestDurationCsvExcel.JPG](RequestDurationCsvExcel.JPG)
## R
To visualize the same events in R, we start from this useful [introduction](http://www.cyclismo.org/tutorial/R/input.html#read)
> durations = read.csv("C:\\temp\\RequestDurations.csv", header = TRUE)
This reads the file into the variable dat. R provides out-of-box means to inspect data:
> summary(durations)
ActivityId Url HttpStatus Duration
80000146-0000-fe00-b63f-84710c7967bb: 1 http://georgis2:80/helloworld.htm:283 Min. :304 Min. :0.1452
80000147-0000-fe00-b63f-84710c7967bb: 1 http://georgis2:80/windir.txt : 6 1st Qu.:304 1st Qu.:0.1600
80000148-0000-fe00-b63f-84710c7967bb: 1 Median :304 Median :0.1837
80000149-0000-fe00-b63f-84710c7967bb: 1 Mean :304 Mean :0.2007
8000014a-0000-fe00-b63f-84710c7967bb: 1 3rd Qu.:304 3rd Qu.:0.2089
8000014b-0000-fe00-b63f-84710c7967bb: 1 Max. :304 Max. :0.8739
(Other)
To confirm raw values are the same as in LINQPad we could do:
> durations$Duration
And to get a chart we do:
> plot(durations$Duration)
![RequestDurationCsvR.JPG](RequestDurationCsvR.JPG)
## Tableau
In [Tableau](http://www.tableausoftware.com/):
* Click Open Data
* Create connection to the file
![RequestDurationCsvTableauConnection.JPG](RequestDurationCsvTableauConnection.JPG)
* For X axis, create a calculated field as INDEX()
![RequestDurationCsvTableauCalc.JPG](RequestDurationCsvTableauCalc.JPG)
* In the Analysis menu disable the "Aggregate Measures" option
* Drag Duration to Rows
* Drag the index to Columns
![RequestDurationCsvTableau.JPG](RequestDurationCsvTableau.JPG)

Просмотреть файл

@ -66,15 +66,7 @@ Note the difference between what is happening here and exporting from LINQPad's
- Here all events are are streamed into .csv file. Since they are not kept in-memory, this will work regardless of the size of .etl file. The disadvantage of this method is that there is nothing to see in LINQPad.
Exporting to .csv is how Tx can be used in conjunction with tools like Excel, Tableau and R.
In Excel for example:
- select the Duration column
- choose the INSERT on the ribbon, and then Recommended Charts
- choose Scatter
![RequestDurationCsvExcel.JPG](RequestDurationCsvExcel.JPG)
Exporting to .csv is how Tx can be used in conjunction with [popular tools](PopularUIs.md) like Excel, Tableau and R.
## Request Duration Summary

Двоичные данные
Samples/LinqPad/Queries/HTTP.sys/RequestDurationCsvR.JPG Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 58 KiB

Двоичные данные
Samples/LinqPad/Queries/HTTP.sys/RequestDurationCsvTableau.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 220 KiB

Двоичные данные
Samples/LinqPad/Queries/HTTP.sys/RequestDurationCsvTableauCalc.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 47 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 34 KiB