• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Building a reporting sytem with BREW
 

Building a reporting sytem with BREW

on

  • 4,216 views

 

Statistics

Views

Total Views
4,216
Views on SlideShare
2,515
Embed Views
1,701

Actions

Likes
1
Downloads
9
Comments
0

5 Embeds 1,701

http://www.scoop.it 1529
http://illadellogaritme.wordpress.com 141
http://localhost 24
http://www.linkedin.com 6
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Building a reporting sytem with BREW Building a reporting sytem with BREW Presentation Transcript

    • Building a reporting system withBREWXavi GuardiolaChief Technology OfficerSimpple - Xarxa Sanitària i Social de Santa Teclaxavier.guardiola@simpple.com @xguardi
    • Enterprise report generation Datawharehouse Data analysis Report template wizards: Report template Jasper Reports, BIRT, etc. Report Report distribution: Rep Rep Rep Web, email. Dynamic reports
    • Enterprise reporting design shortcomingsPoor in-report logic.Not a best practice but most of the times inevitable!Ugly defaults.Please, check out Tufte books.Simple plots.Sometimes you need statistical or more complex plots.Regular users should be able to create their own reports. Really?
    • Brew The dumbest example example.brew <% x <- 2 %> Good morning. Today the kilo oranges is priced at <%= x %> euros. R> brew(“example.brew”, “example.txt”) example.txt Good morning. Today the kilo oranges is priced at 2 euros.
    • Brew Precomputing things before example.R x <- 2 save(x, file= “data.Rdata”) example.brew <% load(“data.Rdata”) %> Good morning. Today the kilo oranges is priced at <%= x %> euros. R> brew(“example.brew”, “example.txt”) example.txt Good morning. Today the kilo oranges is priced at 2 euros.
    • Brew Smart templates example.R x <- 2 save(x, file= “data.Rdata”) example.brew <% load(“data.Rdata”) %> Good morning. Today the kilo oranges is priced at <%= x %> euros. <% if x > 1 %> That’s f***ing expensive! <% end %> R> brew(“example.brew”, “example.txt”) example.txt Good morning. Today the kilo oranges is priced at 2 euros. That’s f***ing expensive!
    • Brew + latex example.brew begin{document} Today the kilo oranges $rightarrow$ <%= x %> euros. end{document} R> brew(“example.brew”, “example.tex”) example.tex begin{document} Today the kilo oranges $rightarrow$ 2 euros. end{document} R> texi2dvi(“example.tex”, pdf=TRUE) example.pdf Today the kilo oranges ! 2 euros.
    • The alternative stack R selects DB data Datawharehouse Datawharehouse RJDBC, RMySQL, etc. R computes results and Data analysis R script plots. Latex brew template loads Report template Brew latex template results and plots and generate template file PDF report is generated Report Report from the tex file Rep Rep Rep Rep Rep Rep
    • Report example
    • Report example
    • Report example
    • Brew vs Sweaveexample.brew example.Rnw begin{document} begin{document} begin{table} <<Table1, echo=F,results=tex>>= <% for (i in 1:nrow(data)) { -%> print(xtable(data)) <%= data$name[i] %> & @ <%= data$value[i] %> end{table} Price is Sexpr{x} Price is <%= x %> <<plot1, echo=F, fig=T>>== print(plot1) begin{figure} @ includegraphics{...} end{figure} end{document} end{document}
    • Thanks!