Monday, May 16, 2011

My first 'R' plot

Started learning 'R'.
My first attempt was to plot data from Forbes 1000 list (refer to the exercise posted by Prasoon sharma)

Here is a bubble chart showing Forbes top 25 companies by Market Capitalization

Source code:
## read the csv file
FORBES.DF <- read.csv("forbes2000list_for_2011.csv")

## assign titles
names(FORBES.DF)<- c("Rank", "Company", "Country", "Industry", "Sales", "Profits", "Assets", "MarketCap")

## create a smaller vector
Forbes100ByMC <- FORBES.DF[order(-FORBES.DF$MarketCap),][1:100,]
Forbes25 <- Forbes100ByMC[1:25, ]

## plot the bubble chart using 'symbols'
radius <- sqrt(Forbes25$MarketCap/pi)
sales <- as.numeric(as.character(Forbes25$Sales))
profits <- as.numeric(as.character(Forbes25$Profits))

symbols(sales, profits, circles=radius, inches=0.9, fg="white", bg="light blue", xlab="Sales($'Billions)", ylab="Profits($'Billions)", main="Forbes 25 By Market Capitalization", xlim=c(min(range(sales))-50, max(range(sales))+50), ylim=c(min(range(profits))-2, max(range(profits))+2))
## print the names of companies
text(sales, profits, Forbes25$Company, cex=0.6, col="dark red") 
Any feedback toward writting better 'R' code is welcome.

Wednesday, May 4, 2011


How do you approach the most critical objective of your organization?

Probably you would start by qualifying this objective and start a project to accomplish it. Break it down to smaller goals, milestones and put some planning around it? May be you would further break down the goals into small actionable items and schedule some activities. Some of you would setup a rhythm to periodically accomplish the smaller tasks in order to realize your grand objective.

No matter whatever process or methodology you follow, you would certainly NOT leave your most critical objective to chance..certainly NOT by adopting an ad-hoc approach.

My moment of epiphany arrived when I realized "Continuous Self Learning" is the most critical aspect of my career. Probably the same applies to most of the readers of this blog.

So, how to you approach your personal 'Learning'? Is there a method? Or is it left to chance?