Wednesday, 6 July 2016

Visualising Game of Thrones using R

Exploratory analysis of GAME OF THRONES

Are you afraid? Good. You’re in the great game now – and the great game is terrifying.”

World of GOT >> several royal families desire the Iron Throne to gain control of Westeros. Whilst kingdoms fight each other for power, a sinister force lurks beyond the Wall in the North.


I have tried to find some insights about the complicated political landscape of this fantasy world using the visualization power of R.




Number of  houses Attack/Defend

Houses in GOT do not believe in the policy of defence being the strongest offense.



How often are there more than one Attacker/Defender

This clearly suggests that quite often of it is only one house who the shield's its post against the attack from multiple houses.


Number of Commanders leading their respective side

There is no significant difference between the commander on both the sides.




Major deaths by years

Most numbers of major deaths occurred in the year 299 which is not surprising as the most numbers of battles were also fought during this period.




Impact of Army Size on the outcome

It is clear that a bigger army for the defending side is not of a great help.The attacker mostly wins if he has a bigger army barring a few exceptions. The attacking side found themselves on the losing side even with the largest army ever in the history, in the Battle of Castle Black.(Stannis Baratheon V/S Mance Rayder)





Which pair fought the most number of battles(Houses)






Types of Battles/Region/Location

We see that most of the battles were fought in Riverland and the North.

SankeyID832470635a39
Data: data1 • Chart ID: SankeyID832470635a39googleVis-0.5.10
R version 3.1.2 (2014-10-31) • Google Terms of UseDocumentation and Data Policy



Proportion of Battles won by the attackers/Defenders

A Large proportion of  the battles were won by the attacking side.


Who is the strongest of them all

Lannisters are the strongest followed by the starks.House Greyjoy has faced a relatively lesser number of battles but has the has won 8 out of 11 battles.





Relation of survival and number of dead relatives

I was of the pretention that if the number of dead relatives is high then the chance of that person being dead will also be high but the relationship is exactly opposite of that.

Relation of Age popularity and no. of dead relations

The regression plane clearly indicates that a higher popularity is achieved if one is in the age group of 20-60 and has a good number of dead relatives.

Number of known characters in the series

Clearly house Lannister and stark has the most number of characters to it.Most of the known character come from a noble family. I am not surprised that the Nights Watch has a huge number of non-noble characters.

Gender imbalance in GOT

Currently, in the series, we may be witnessing female dominance when it comes to the popular character but in the whole series, there are very few know female characters.


Conclusion

Given ,every episode has a new twist and at the end, one finds his favourite character dead,it would be difficult for me to reach a certain conclusion . But having said that through my exploratory analysis I can surely say the TV series is no longer following the books.

R codes

https://www.dropbox.com/s/yf2cljr2g3q8jbd/GOT.R?dl=0

Saturday, 14 May 2016

Lets create magic with Tableau

I have tried to create a coxcomb chart in tableau .All my steps have been constructed after going through the worksheet and blog provided by Bora Beran. Please check the video  given below to see the steps and feel free to ask any questions.



Hope it helps.Keep calm and lets do analytics

Lets create magic with Tableau

Lets create magic with Tableau

I have tried to create a coxcomb chart in tableau .All my steps have been constructed after going through the worksheet and blog provided by Bora Beran. Please check the video link given below to see the steps and feel free to ask any questions.

https://youtu.be/R1TO7Pf0erY

Hope it helps.Keep calm and lets do analytics

Saturday, 23 April 2016

Curriculum Vitae

Resume-> Please download the workbook and then view the Resume, otherwise due the small screen size things do start overlapping ...  :)



Thursday, 24 March 2016

Battle among Titans

Epic Superhero Battles

Whole world is going crazy for the upcoming battle of Batman and Superman on the big screen ,so I just thought of other characters which can be poised in front of each other. All the superhero powers and abilities was boiled down to six attributes i.e. Combat , Intelligence , Power , Strength , Speed and Durability. An overall score has also been given to the characters. All the scores have been obtained from www.superherodb.com. Please check the visualization below and decide the winners of the battles by yourself.

Monday, 21 March 2016

Story of Olympics (1896-2008)

Visualizing Olympics (1896-2008)


Since the Modern Olympics began in 1896, there has been 26 Summer Olympic 
Games held in 21 different cities. In addition, three summer of the Games were scheduled to take place but were later cancelled due to war: Berlin in 1916, Tokyo and London in 1944. Five cities have been chosen by the IOC to host upcoming Olympic Games: London for 2012 Summer Olympic, Rio de Janeiro for the 2016 Summer Olympics, Pyeongchang for the 2018 Winter Olympics, Tokyo for the 2020 Summer Olympics, and Beijing for the 2022 Winter Olympics.

Olympic Hosts

Los Angles, London, Paris and Athens are the only four cities who have hosted Olympics twice

No. of countries participating

Today IOC's strength is of 204 countries. There are 193 members of United Nation. While there are 300+ countries in the world. If membership of IOC keeps on increasing at the current rate, all the countries of the world would be playing in Olympics 2040.
1980 Summer Olympics Boycott-> The movement spurred by President Jimmy Carter influenced 66 countries to boycott Moscow Olympics

Top Ten countries based on medals

The word cloud shows the overall top ten countries in Olympics. The fight for the top positions has always been between US, Russia and Germany. Lately, Australia is also giving these countries a tough fight.

Top Ten Countries based on Medals (Male and Female)

Olympics had its own share of criticism. One of the biggest criticism faced by Olympics is that it’s always male dominated .We see that there is hardly any difference in the basket of countries between the overall and male focused picture while the difference is stark when we compare the overall picture with the female focused picture. China enters the basket of Top ten countries (Female) in 1984 and grew gradually since then.

Timeline of Sport Events

Aquatics, Athletics, Cycling, Fencing and Gymnastics are the most played sports in Olympics .Cricket was also played in the year 1900.

Top Ten most played Games

Athletics, Aquatics and Shooting are the most played games. Judo as a sport is also gaining popularity. Apart from the above mentioned games Wrestling, Weightlifting and Boxing seems to be more popular in the male section, while Gymnastics and cycling seems to be more popular among females.

No. of Athletes participating

On an average Athlete Participation is increasing at the rate of 4.34%.We see three major dips in the participation over the past 112 years-1932, 1956 and 1980.
1932-> Because of the economic effects of the Great Depression, competitors from only 37 nations—with less than half the number of participants that competed in Amsterdam—travelled to Los Angeles for the 1932 Summer Olympics
1956-> The Suez Crisis caused Egypt, Iraq and Lebanon to back down from participation in Olympics. Soviet Union's iron hand on the Hungarian revolutionaries led to the withdrawal of Netherlands, Spain, and Switzerland .The People's Republic of China chose to boycott the event because the Republic of China had been allowed to compete. Although the number of countries participating (67) was almost the same as in 1952 (69), the number of athletes competing dropped sharply, from 4,925 to 3,342. (This figure does not include the 158 athletes from 29 countries who took part in the Stockholm equestrian competition)
1980 -> Approximately half of the 24 countries that boycotted the 1976 Summer Olympics (in protest against the IOC not expelling New Zealand who sanctioned a rugby tour of apartheid South Africa) participated in the Moscow Games, the 1980 Summer Olympics were disrupted by another, even larger, boycott led by the United States in protest at the 1979 Soviet war in Afghanistan.

Proportion of Males/Female

We see that the proportion of Female Events to Male Events is gradually increasing and in 2008 its almost equally proportioned.

No. of Female and Male athletes participating

There were huge fluctuations in male participants over the past but unlike female the number male participants fell down from  6797 in 1996 to 6305 in 2008.The participation of Females rocketed post 1980

Country Medal Ranking

An Olympic Games is a measurable test of a nation´s sporting power. Medal counts are the object of intense scrutiny after every Olympics. Most countries celebrate any medal with national glee, since 60% of competing countries will win none. The top ten countries in the medal tally account for 35% of the World's GDP.
Total Gold Medals with US > Gold Medals with Germany + Gold Medals with Russia.

Top Three Athletes

This chart shows top three athletes for each year

Top Ten Athletes (Male and Female)

Of the top ten players ever in Olympics only two are females. Latynina Larisa followed by Michael Phelps holds the record of highest number of medals .Unlike females, males have a higher degree of competition for the top position. 

Medal Count by Year

  • In 1904 USA recorded the highest number of medals i.e. 394
  • This record was broken by Russia in 1980 Olympics i.e. 442 


The Olympics provide us with a singular opportunity to observe the changing situations of men and women and the relationship between them. In the space of two or three generations, women’s presence in society, and consequently also in sport, has increased enormously. This is undoubtedly a very positive development and something for which I am are very glad.


**Since my dataset contains observations till 2008 Summer Olympics, all the analysis are constrained by it