söndag 27 mars 2016

M-query (get tab data), Synoptics panel

PQScraping2
Picture: How to get data from the tabs: source


Instead of the usual way: Source = Web.Page(Web.Contents("http://financials.morningstar.com/ratios/r.html?t=MSFT

Use this M-code:
let
    Source = Text.FromBinary(Web.Contents("http://financials.morningstar.com/financials/getKeyStatPart.html?&t=XNAS:MSFT")),
    A = Text.Replace(Source, "\", ""),
    B = Text.Replace(A, "display:none", "display:block"),
    C = Web.Page(B),
    Data = C{6}[Data],
    D = Table.TransformColumnTypes(Data,{{"Efficiency", type text}, {"2015-06", type number}, {"2006-06", type number}, {"2007-06", type number}, {"2008-06", type number}, {"2009-06", type number}, {"2010-06", type number}, {"2011-06", type number}, {"2012-06", type number}, {"2013-06", type number}, {"2014-06", type number}, {"TTM", type number}}),
    E = Table.DemoteHeaders(D),
    #"Transposed Table" = Table.Transpose(E),
    #"First Row as Header" = Table.PromoteHeaders(#"Transposed Table"),
    #"Renamed Columns" = Table.RenameColumns(#"First Row as Header",{{"Efficiency", "Period"}}),
    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Ticker", each "MSFT"),
    #"Reordered Columns" = Table.ReorderColumns(#"Added Custom",{"Ticker", "Period", "Days Sales Outstanding", "Days Inventory", "Payables Period", "Cash Conversion Cycle", "Receivables Turnover", "Inventory Turnover", "Fixed Assets Turnover", "Asset Turnover"})
in
    #"Reordered Columns"

------
Power-Query Tips
* How to Custom-Sort a Table
= Table.Sort(#"Renamed Columns", each List.PositionOf({"infrastrukturTable", "finansTable", "naturTable", "manniskorTable"}, [Area]))

* How to Combine Records
= Table.AddColumn(Coordinates, "Custom.1", each Record.Combine({[#"http://Column1.properties "],[Custom]}))

------------


Picture: explanation


Site with Country Flags

lördag 19 mars 2016

Flow-diagram (Sankey) with PowerBI

Picture: How to create a Data-table for the Sankey visualisation


I will clear up the picture once I actually done this.


Picture: Before 3-columns, After 2-columns


Picture: Show example (explanation)


-----
SSAS_Visualizing_Tabular_Calc_Dependencies
Picture: Visualise a database

----

Picture: Rotate pictures

-----
Well said:
“For us, success does not lie in launching products.
We should not have product launch events,
we should only have Customer success events (joking).”

“It is not a marker of progress if all we do
is to launch technology and products,
it is only useful when it’s transformed, by our customers.”


-----
Other
Just ready "A beautiful question", by Frank Wilczek. - He also concluded beauty, but not why.


torsdag 17 mars 2016

Remove & Replace a list of rows (PowerQuery) + R-visualisations


image
Picture: How...1. Left Anti (to remove rows), 2. Append (to add rows).

Source: Post+Excel file

-------
Using R - good way to visualise
Rplot02
Picture: Blog-post, file

söndag 13 mars 2016

Azure Data Catalogue + Machine Learning + R

Picture: How to register all Tables (in a TableCatalogue), and all Columns - Only the Metadata



Picture: How to register a DataSource


This is Machine Learning:
What is ML
Picture: The purpose is to make a function that can predict Output = f(Xn):





DataProcess: 1. Define Output, 2. GetData, 3. TransformData
FunctionProcess: 4. GetFunction, 5. TransformFunction (called TrainModel*), 6. EvaluateFunction
* based on the data


Example (linear regression):
Machine learning tutorial: Complete linear regression experiment that uses predictive modeling techniques.
Picture: How to learn ML


Picture: Video

and MS Research lab,



Picture: ggplot2 cheat sheet (in R-Studio)



distribution
Picture: Distribution types 

------
R links
R stats boxplot in Power BIR stats coplot cross filter in Power BI action
Picture: Getting started with R, or A Complete tutorial

R visuals in Power BI
Picture: link (.pbix)

Examples: Sales data ggplot2 (.pbix), PowerBI ggplot2 (.pbix),
Videos: R in PowerBI (video), R with Jen (video), Videos
Download: R Tools for Visual Studio (download pagedocumentation), R-Quick.
Other: Forecasts
---------
Predictive Analytics


Picture: Link; To describe something well enough to be able to anticipate, and control something with a certain certainty.


---
Ternary Crosshairs
crosshairs
Picture: 3-variable detection


----
Community Detection Algorithms


Picture: closeness/betweenness comes from the igraph in R 


----------------
Learn more

Twitter: Fredrik HedenströmMS-BuckWoody,  MS-PowerBI,
Azure Free Trial is not really free, Analytics Magazine
Top 3 R resources for beginners (Try R)
Learn R from Scratch