Your first Shiny app

What is Shiny? Shiny is an R package (install.packages("shiny")) for making your outputs interactive. Furthermore, Shiny creates web apps meaning your work can be shared online with people who don’t use R. In other words: with Shiny, R people can make websites without ever learning Javascript etc. I am completely obsessed with Shiny and these days I end up presenting most of my work in a Shiny app. If it’s not worth putting in a Shiny app it’s not worth doing.

Continue reading

Get data from ggplot()

ggplot includes built in and seamless functionality that summarises your data before plotting it. As shown in the example below, ggplot_build() can be used to access the summarised dataset. fill y count prop x PANEL group ... #D7301F 0.2147239 35 1 1 1 4 ... #FC8D59 0.6871166 77 1 1 1 3 ... #FDCC8A 0.9570552 44 1 1 1 2 ... #FEF0D9 1.0000000 7 1 1 1 1 ... #D7301F 0.

Continue reading

R: ISO codes and country names

install.packages(‘maps’) iso = maps::iso3166 > str(iso) 'data.frame': 269 obs. of 5 variables: $ a2 : chr "AW" ... $ a3 : chr "ABW" ... $ ISOname : chr "Aruba" .. $ mapname : chr "Aruba" ... $ sovereignty: chr "Netherlands" ...

Continue reading

https://gist.github.com/riinuots/25817167cfd397cacecdf6f38b473392 <img src="https://riinudata.files.wordpress.com/2016/04/rplot.png" alt="Rplot" height="267" class="alignnone size-full wp-image-302" width="999" />

Continue reading

Author's picture

Riinu Ots

if it aint broke, you’re outdated

Data Manager

Edinburgh, UK