Communicating Risk at the Bay Area R User Group
Later this week I will give a similar presentation at the R in Finance conference in Chicago. Please get in touch if you are around and would like to share a coffee with me.
R in Insurance: Presentations are online
![]() |
| Front slides of the conference presentations |
Additionally to the slides many presenters have made their R code available as well:
- Alexander McNeil shared the examples of the CreditRisk+ model he presented.
- Lola Miranda made a Windows version of the double chain-ladder package DCL available via the Cass knowledge web site.
- Alessandro Carrato's 1-year re-reserving code is hosted on the ChainLadder project web site.
- Giorgio Spedicato's life contingencies package is on CRAN already.
- Simon Brickman and Adam Rich's HTML presentation and underlying R code for Automated Reporting is included in the GitHub repository.
- Stefan Eppert pointed out that KatRisk published an illustrative catastrophe model in R.
- Hugh Shanahan's code to integrate R with Azure for high-throughput analysis is on GitHub.
Hopefully, we see you again next year!
googleVis tutorial at useR!2013
![]() |
| googleVis Tutorial at useR! 2013 |
We will cover:
- Introduction and motivation
- Google Chart Tools
- R package googleVis
- Concepts of googleVis
- Case studies
- googleVis on shiny
Talking data: Building interactive relationships with data and colleagues
conference, organised by the Exeter Initiative for Statistics and its Applications. The event was chaired by Steve Brooks and brought together over 100 people to discuss all aspects of data: from collection and analysis through to visualisation and communication.
![]() |
| Building interactive relationships with data and colleagues |
The programme was very good with a variety of talks such as How data collection from smart phones can improve agronomic decision making in potato crops by Robert Allen or Spatial data and analysis in the improvement of aquatic ecosystem health and drinking water quality by Nick Palling. I also liked Richard Everson's presentation on Visualising and understanding multi-criterion league tables, which showed new ideas to create rankings.
However, my highlight was Alan Smith's talk on Information for the Masses: Using Visualisation to Engage the Public. Alan heads up the Data Visualisation Unit at the Office for National Statistics and they created some fantastic online visualisation tools. He presented some interactive examples of the Census 2011 data set. Alan mentioned the hilarious story of a young lady, who had moved from Leeds to Elmbridge and used the Census data to find out why her new home was so dull compared to her old.
![]() |
| Screen shot of the 2011 Census comparator |
The screen shot shows the age distribution of Leeds (left) and Elmbridge (right). Focus on the 20-24 year old age group and you'll get the joke.
R package development
Some concepts may appear foreign or like red tape, yet many of them evolved over time for a reason. They help to stay organise, collaborate more effectively with others and write better code.
So, here are my slides of the R package development workshop at Lancaster University.
![]() |
| R package development |
For a detailed and authoritative reference on R package development see the Writing R Extensions manual on CRAN.
Interactive slides with googleVis on shiny
![]() |
| googleVis on shiny |
Again, I wrote my slides in RMarkdown and I used slidify to create the HTML5 presentation. Unfortunately you may have to reload the slides that use googleVis on shiny as the JavaScript code in the background is potentially not ideal. Any pointers, which could help to improve the performance will be much appreciated.
Many of the examples in my slides are taken from my post First steps of using googleVis on shiny, however the presentation also demonstrates that it is possible to inject JavaScript code into a googleVis chart to trigger a shiny event, see also the example below.
Interactive presentation with slidify and googleVis
![]() |
| Introduction to googleVis |
Separating content from layout is always a good idea. Markup languages such as TeX/LaTeX or HTML are built on this principle. Ramnath Vaidyanathan has done a fantastic job with slidify, as it is very straightforward to create presentations with R. There are a couple of advantages compared to traditional presentation software packages:
- RMarkdown helps me to focus on the content
- Integration of R code is build in
- HTML5 allows me to embed interactive content, such as
publish('mages', 'Introduction_to_googleVis').I will give a half-day tutorial on googleVis with Diego de Castillo at useR2013! in Albacete on 9 July 2013. I hope to see some of you there.
Using R in Insurance, Presentation at GIRO 2012
This year's conference is in Brussels from 18 - 21 September 2012. Despite the fact that Brussels is actually in Belgium the UK actuaries will travel all the way to enjoy good beer and great talks.
On Wednesday morning I will run a session on Using R in insurance. It would be great to see some of you there.
I prepared the slides with R, RStudio, knitr, pandoc and slidy again. My title page shows a word cloud about the GIRO conference. It uses the wordcloud package and was inspired by Ian Fellows' post on FellStats.
The last slide shows the output of sessionInfo(). I am sure it will become helpful one day, when I have to remind myself how I actually created the slides and which packages and versions I used.
Interactive web graphs with R - Overview and googleVis tutorial
Today I feel very lucky, as I have been invited to the Royal Statistical Society conference to give a tutorial on interactive web graphs with R and googleVis.
I prepared my slides with RStudio, knitr, pandoc and slidy, similar to my Cambridge R talk. You can access the RSS slides online here and you find the original R-Markdown file on github. You will notice some HTML code in the file, which I had to use to overcome my knowledge gaps of Markdown or its limitations. However, my output format will always be HTML, so that should be ok. To convert the Rmd-file into a HTML slidy presentation execute the following statements on the command line:
Rscript -e "library(knitr); knit('googleVis_at_RSS_2012.Rmd')"
pandoc -s -S -i -t slidy --mathjax googleVis_at_RSS_2012.md
-o googleVis_at_RSS_2012.html
Dynamical systems in R with simecol
This evening I will talk about Dynamical systems in R with simecol at the LondonR meeting.
Thanks to the work by Thomas Petzoldt, Karsten Rinke, Karline Soetaert and R. Woodrow Setzer it is really straight forward to model and analyse dynamical systems in R with their deSolve and simecol packages.
I will give a brief overview of the functionality using a predator-prey model as an example.
This is of course a repeat of my presentation given at the Köln R user group meeting in March.
For a further example of a dynamical system with simecol see my post about the Hodgkin-Huxley model, which describes the action potential of a giant squid axon.
I shouldn't forget to mention the other talks tonight as well:
- Writing R for Dummies - Andrie De Vries
- News from data.table 1.6, 1.7 and 1.8 - Matthew Dowle
- Converting S Plus Applications into R - Andy Nicholls (postponed to 18 September 2012)
Interactive HTML presentation with R, googleVis, knitr, pandoc and slidy
Tonight I will give a talk at the Cambridge R user group about googleVis. Following my good experience with knitr and RStudio to create interactive reports, I thought that I should try to create the slides in the same way as well.
Christopher Gandrud's recent post reminded me of deck.js, a JavaScript library for interactive html slides, which I have used in the past, but as Christopher experienced, it is currently not that straightforward to use with R and knitr.
Thus, I decided to try slidy in combination with knitr and pandoc. And it worked nicely.
I used RStudio again to edit my Rmd-file and knitr to generate the Markdown md-file output. Following this I run pandoc on the command line to convert the md-file into a single slidy html-file:
Et volià, here is the result:pandoc -s -S -i -t slidy --mathjax Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.md -o Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.html
Addition (2 June 2012)
Oh boy, knitr and Markdown are hitting a nail. With slidify by Ramnath Vaidyanathan another project sprung up to ease the creation of web presentations.Review: Kölner R Meeting 30 March 2012
The first Kölner R user meeting was great fun. About 20 useRs had turned up to exchange their ideas, questions and experience with R. Three talks about R & Excel, ggplot2 & XeLaTeX and Dynamical systems with R & simecol had kicked off the evening, with Kölsch (beer) losing our tongues further.
Thankfully a lot of people had brought along their laptops, as unfortunately we lacked a cable to connect any of the computers to the installed projector. Never-mind, we cuddled up around the notebooks and switched slides on the speakers sign.
![]() |
| Photos: Günter Faes |
Similar to LondonR, it was a very informal event. Maybe slightly forced by myself, as I called everyone by his/her first name, which could be considered rude in Germany. But what I had noticed in London, and the same was true also in Cologne, was that people with a very diverse background and of all ages would meet to discuss matters around R, often not working in the same field. So why worry about hierarchies?
Most attendees were not R experts, but users in its pure sense, trying to solve real life problems, and I suppose that makes those meetings so special. R users are often not programmers by trade, but amateurs, who have a keen interest to extract stories and pictures from their data. And for that reason the discussions are often so engaging. Talking to people using R in social science, psychology, biology, pharma, energy, telcos, finance, insurance or actually statistics opens your mind and eyes. You realise that you are not alone, other people are weird as well. They have similar problems and challenges, but may use a different domain language and look at problems from a different angle. And this can be incredibly refreshing!
Anyhow, we agreed to meet again in about three months time. The pub was a great venue to socialise, yet a bit noisy for the talks. Hopefully we can use a room at the nearby university for the presentations next time. Promises were made already. We shall see. Günter was so kind to set up a mailing list to which you can sign up here. I will continue to use this blog to provide updates on the Cologne R user group in the future and set up a public calendar as well.
Talks
Many thanks to the speakers, who dared to give the first talks and had to improvise on the spot without a projector. Please drop me a line if you would like to speak at one of the next events.
LondonR, 6 December 2011
However, it were the speakers and their talks which attracted me:
- James Long: Easy Parallel Stochastic Simulations using Amazon's EC2 & Segue
- Chibisi Chima-Okereke: Actuarial Pricing Using General Linear Models In R
- Richard Saldanha: Practical Optimisation
Interactive presentations with deck.js
The other day I came across a presentation by Christopher Gandrud. Christopher had used deck.js, a JavaScript library for building HTML presentations by Caleb Troughton.
This looked like an interesting approach to me and fortunately the learning curve was not too steep, although I am by no means an html or JavaScript expert. So I created my first deck.js presentation based on the content of previous googleVis presentations. For the first time I can embed videos, Flash and SVG charts without using lots of different apps. I am actually quite pleased by the result, see here: Getting started with googleVis
LondonR, 7 September 2011
The first presentation was given by Lisa Wainer from UCL Department of Security and Crime Science about crime data analysis using R. Lisa presented about a project with Merseyside police, where she had built software, in R with the gWidgets package, called the Hot Products Early Warning System, that is used to help understand and characterise the acquisitive crime problem in Merseyside on an ongoing basis, detecting emerging trends in hot products.
Chris Wood gave an insightful talk about his research on sediment biogeochemical modelling in the North Sea. His model uses a set differential equations with over 20 parameters. Chris is able to analyse and fit his model to data he gathered on an expedition in the North Sea using R, the deSolve package and having access to the super-computer at the University of Southampton. How cool is this?
Jean-Robert Avettand-Fenoel talked about the Rook package and how R and Rook has helped him to roll out new applications to his colleagues faster than using Excel, VBA and C++ or RExcel. Rook allows you to build web apps with R. The package is maintained by Jeffery Horner, who also brought us the brew package. The brew allows us, in combination with Rapache, to mix html and R code in the same file. This is quite similar to the approach taken by Sweave for LaTeX and R. However, Rook provides a way to run R web applications on your desktop with the new internal R web server named Rhttpd.
The final presentation was actually given by myself talking about the googleVis package and the recent developments in version 0.2.9:












