Revolutionary R – Making Sense of Data

What the fuRk is R?

R is a language. It is a (R)evolutionary statistical programming language, where you write functions and scripts as commands to analyse your data instead of traditional methods of ‘point and click’. It is also a software tool and environment used for data analysis and visualisation by Data Analysts worldwide.

R originated in New Zealand, when two teachers decided to provide a statistical computing platform for their students based on S. Over time it has evolved into a world-wide used tool for cutting edge statistical models and predictive modelling. Go Team Kiwis! Now, at the heart of R is ‘R Core’, a group of 20 developers who guide R’s evolution.

R is “free, open source, powerful and highly extensible”.

Data: Extraction  >  Exploration    >  Visualisation   >    Sharing

How to get Started

To learn how to use R I visited ‘Try R-Code School‘ and was guided through an 8 step tutorial. The site breaks down how to use the programming language in 8 simple chapters with a navigation menu to show how far you have progressed:

  1. Using R Basics
  2. Vectors
  3. Matrices
  4. Statistics
  5. Factors
  6. Data Frames
  7. Real World Data
  8. Completion of course

At the end of each chapter it rewards you with badges and the final chapter displays the TRY R badge.

R code
Learning how to use R statistical programming language

Using R Studio

After spending several years overseas I have returned to Ireland and the main topic of conversation seems to loom around commitment. The questions on everyone’s lips are ‘do you think its time to settle down now?’ and ‘do you think it might be time to put your foot on the property ladder?’. So, for that reason, I’m going to use R to analyse the trends in the property market over time to see if its a good time to purchase and if I should give in to peer pressure or continue to be a commitment phobe.

  1. To begin, I downloaded R Studio open source software for Windows from the website.
  2. In the background I sourced my property price csv data from the CSO website so I have a data-set I can work with. (Note: The time data was in the row and the type of property was in the column; I needed this vice versa. In order to do this I copied the data and transposed it in the excel sheet). Now I’m set to go..
  3. I imported the csv into R Studio (identifying the headers ).
  4. I viewed the property file i.e. > view(Propertyprice)
  5. To call the function date in a format that R can understand I update R: > rdate <-as.Date(Propertyprice$Date,”%m/%y)
  6. Following from this I plot the graph. >plot(Propertyprice$Dublinhouses~rdate, type=”l”, col=”red”)
  7. I insert a box around it by calling box()
  8. To provide an axis X I submit axis(rdate,%m-%y)
  9. My map displays the date data highlighting property prices in Dublin specifically for houses based on an increase/decrease from Jan05-February2016.