Home » Posts tagged 'data visualization'
Tag Archives: data visualization
What is an Infographic?
Information graphics or infographics are graphic visual representations of information, data or knowledge intended to present complex information quickly and clearly. They can improve cognition by utilizing graphics to enhance the human visual system’s ability to see patterns and trends. The process of creating infographics can be referred to as data visualization, information design, or information architecture.
What is Infogr.am?
It Create infographics and interactive online charts. It’s free and super-easy!
Login using Twitter or Facebook
Use Infogr.am to make inforgraphics easily!
I like the visual appeal of commits by users over time at Github. For example, we can see Hadley Wickham is committed. But you already knew that. Nice to see a calender heat map being used effectively.
Now if we could only do that to CRAN (?) commits. Come on , Brian- you are not too old for this.
WP.com made a cool change to WP- Stats , its default analytics program, It now counts visitors as well as visits. This is especially useful to writers like me who like to customize content based on analytics ( GA Analytics does not work on WordPress.com hosted sites) and who dont want to bother with hosting /hacking (WP.com is much more hassle free than self-hosted , or even Rackspace hosted in my experience).
Of course the guy DOS-ing my poetry blog (via Yahoo Image Service) needs to use Tor to hide. Unless they dont want to hide and just want to click on my Roses poem 200 times (passing a subliminal message?) . Of course GA Analytics loves line charts and WP Stats loves Bar Charts, but we wont get into that.
The Google Visualization API is a great way for people to make dashboards with slick graphics based on data without getting into the fine print of the scripting language itself. It utilizes the same tools as Google itself does, and makes visualizing data using API calls to the Visualization API. Thus a real-time customizable dashboard that is publishable to the internet can be created within minutes, and more importantly insights can be much more easily drawn from graphs than from looking at rows of tables and numbers.
- There are 41 gadgets (including made by both Google and third-party developers ) available in the Gadget Gallery ( https://developers.google.com/chart/interactive/docs/gadgetgallery)
- There are 12 kinds of charts available in the Chart Gallery (https://developers.google.com/chart/interactive/docs/gallery) .
- However there 26 additional charts in the charts page at https://developers.google.com/chart/interactive/docs/more_charts )
Building and embedding charts is simplified to a few steps
- Load the AJAX API
- Load the Visualization API and the appropriate package (like piechart or barchart from the kinds of chart)
- Set a callback to run when the Google Visualization API is loaded
- Within the Callback – It creates and populates a data table, instantiates the particular chart type chosen, passes in the data and draws it.
- Create the data table with appropriately named columns and data rows.
- Set chart options with Title, Width and Height
- Instantiate and draw the chart, passing in some options including the name and id
- Finally write the HTML/ Div that will hold the chart
You can simply copy and paste the code directly from https://developers.google.com/chart/interactive/docs/quick_start without getting into any details, and tweak them according to your data, chart preference and voila your web dashboard is ready!
That is the beauty of working with API- you can create and display genius ideas without messing with the scripting languages and code (too much). If you like to dive deeper into the API, you can look at the various objects at https://developers.google.com/chart/interactive/docs/reference
First launched in Mar 2008, Google Visualization API has indeed come a long way in making dashboards easier to build for people wanting to utilize advanced data visualization . It came about directly as a result of Google’s 2007 acquisition of GapMinder (of Hans Rosling fame).
As invariably and inevitably computing shifts to the cloud, visualization APIs will be very useful. Tableau Software has been a pioneer in selling data visualizing to the lucrative business intelligence and business dashboards community (you can see the Tableau Software API at http://onlinehelp.tableausoftware.com/v7.0/server/en-us/embed_api.htm ), and Google Visualization can do the same and capture business dashboard and visualization market , if there is more focus on integrating it from Google in it’s multiple and often confusing API offerings.
However as of now, this is quite simply the easiest way to create a web dashboard for your personal needs. Google guarantees 3 years of backward compatibility with this API and it is completely free.
The amazing tabplot package creates the tableplot feature for visualizing huge chunks of data. This is a great example of creative data visualization that is resource lite and extremely fast in a first look at the data. (note- The tabplot package is being used and table plot function is being used . The TABLEPLOT package is different and is NOT being used here).
visualizing a 50000 row by 10 variable dataset in 0.7 s is fast !!
click on screenshot to see it
and some say R is slow ;)
Note I used a free Windows Amazon EC2 Instance for it-
See screenshot for hardware configuration
the best thing is there is a handy GTK GUI for this package. You can check it out at
This is a continuation of the previous post on using Google Analytics .
Now that we have downloaded and plotted the data- we try and fit time series to the website data to forecast future traffic.
1) Google Analytics has 0 predictive analytics, it is just descriptive analytics and data visualization models (including the recent social analytics). However you can very well add in basic TS function using R to the GA API.
Why do people look at Website Analytics? To know today’s traffic and derive insights for the Future
2) Web Data clearly follows a 7 day peak and trough for weekly effects (weekdays and weekends), this is also true for hourly data …and this can be used for smoothing historic web data for future forecast.
3) On an advanced level, any hugely popular viral posts can be called a level shift (not drift) and accoringly dampened.
Test and Control!
Similarly using ARIMAX, we can factor in quantity and tag of posts as X regressor variables.
and now the code-( dont laugh at the simplicity please, I am just tinkering and playing with data here!)
You need to copy and paste the code at the bottom of this post http://www.decisionstats.com/using-google-analytics-with-r/ if you want to download your GA data down first.
Note I am using lubridate ,forecast and timeSeries packages in this section.
#Plotting the Traffic plot(ga.data$data[,2],type="l")
#Using package lubridate to convert character dates into time library(lubridate) ga.data$data[,1]=ymd(ga.data$data[,1]) ls() dataset1=ga.data$data names(dataset1) <- make.names(names(dataset1)) str(dataset1) head(dataset1) dataset2 <- ts(dataset1$ga.visitors,start=0,frequency = frequency(dataset1$ga.visitors), names=dataset1$ga.date) str(dataset2) head(dataset2) ts.test=dataset2[1:200] ts.control=dataset2[201:275] #Note I am splitting the data into test and control here fitets=ets(ts.test) plot(fitets) testets=ets(ts.control,model=fitets) accuracy(testets) plot(testets) spectrum(ts.test,method='ar') decompose(ts.test) library("TTR") bb=SMA(dataset2,n=7)#We are doing a simple moving average for every 7 days. Note this can be 24 hrs for hourly data, or 30 days for daily data for month # to month comparison or 12 months for annual #We notice that Web Analytics needs sommethening for every 7 thday as there is some relation to traffic on weekedays /weekends /same time last week head(dataset2,40) head(bb,40) par(mfrow=c(2,1)) plot(bb,type="l",main="Using Seven Day Moving Average for Web Visitors") plot(dataset2,main="Original Data")
Though I still wonder why the R query, gA R code /package could not be on the cloud (why it needs to be downloaded)– cloud computing Gs?
Also how about adding some MORE predictive analytics to Google Analytics, chaps!
To be continued-
auto.arima() and forecasts!!!
and adapting the idiosyncratic periods and cycles of web analytics to time series !!