Data Visualization with R

22
Slide 1 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng Introduction to data visualization with R. Use-cases from a real life [email protected], @lc0d3r DATA VISUALIZATION WITH R

description

Introduction to data visualization with R. Use-cases from a real life

Transcript of Data Visualization with R

Page 1: Data Visualization with R

Slide 1 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

Introduction to data visualization with R. Use-cases from a real life

[email protected], @lc0d3r

DATA VISUALIZATION WITH R

Page 2: Data Visualization with R

AGENDA

Slide 2 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

1. Twitter word cloud

2. User activity: The story of your data

3. Foursquare: Places visited

Page 3: Data Visualization with R

POPULARITY OF R

Page 4: Data Visualization with R

Slide 4 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

POPULARITY OF R

257

184

140

139

121

83

73

59

45

35

4

70

7

0 50 100 150 200 250 300

R

SQL

Python

Java

SAS

MATLAB

C/C++

Unix shell/awk/gawk/sed

Perl

Hadoop/Pig/Hive

Lisp

Other

None

Page 5: Data Visualization with R

Slide 5 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

SMM DATA FROM TWITTER

Page 6: Data Visualization with R

Slide 6 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

TWITTER WORD CLOUD Fancy word cloud or inspiration for community?

Page 7: Data Visualization with R

Slide 7 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

FIXING TWITTER OAUTH

• TwitteR

• Error in twInterfaceObj$doAPICall(paste("users", "show", sep = "/"), params = params, : OAuth authentication is required with Twitter's API v1.1

Page 8: Data Visualization with R

Slide 8 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

WORD CLOUD

Page 9: Data Visualization with R

Slide 9 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

TWITTER FOLLOWER MAP

Page 10: Data Visualization with R

Slide 10 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

USER ACTIVITY: THE STORY OF YOUR DATA

Page 11: Data Visualization with R

Slide 11 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

RMYSQL

• RMySQL

• RMySQL binary

• MySQL C Connector

• libmysql.dll into MySQL bin folder

• Sys.setenv(MYSQL_HOME="c:\\Program Files\\MySQL\\MySQL Server 5.5")

Page 12: Data Visualization with R

Slide 12 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

BUT WE HAVE ONLY IP

Page 13: Data Visualization with R

Slide 13 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

FIRST MAP

Page 14: Data Visualization with R

Slide 14 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

MAKE IT MOVING

• ImageMagic

• MPG - convert -quality 100 -delay 100 *.png stylight-signups.mpg

• GIF - convert -quality 100 -delay 100 *.png -loop 0 stylight-signups.gif

• library(animation)

saveGIF({ for (i in 1:10) plot(runif(10), ylim = 0:1) })

Page 15: Data Visualization with R

Slide 15 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

ANIMATE IT!

Page 16: Data Visualization with R

Slide 16 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

FOURSQUARE: PLACES VISITED

Page 17: Data Visualization with R

length(table(foursquareData$country)) [1] 8 > table(foursquareData$country) France Germany Monaco Montenegro Russia Switzerland 9 449 2 18 15 3 The Netherlands Ukraine 3 138

Page 18: Data Visualization with R

Slide 18 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

RGOOGLEMAPS

Page 19: Data Visualization with R

Slide 19 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

RGOOGLEMAPS

Page 20: Data Visualization with R

Slide 20 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

THANKS FOR YOUR ATTENTION! Questions?

Page 21: Data Visualization with R

Sergii Khomenko Data Scientist STYLIGHT GmbH [email protected] @lc0d3r http://www.stylight.com Nymphenburger Straße 86 80636 Munich, Germany

Slide 21 | STYLIGHT | Proud to bleed purple | @lc0d3r and @stylight_eng

Page 22: Data Visualization with R

REFERENCE LIST

• Thoughts in plain text http://lc0.github.io/

• Stack Overflow Tag Trends http://hewgill.com/~greg/stackoverflow/stack_overflow/tags/#!r+sas+data+visualization

• KDnuggets: Top Languages for analytics, data mining, data science http://www.kdnuggets.com/2013/08/languages-for-analytics-data-mining-data-science.html