This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

require(ggplot2)
## Loading required package: ggplot2
library(ggplot2)

week8academy<-read.csv('c:/temp/week8AcademyAwards.csv',header=TRUE)

str(week8academy)
## 'data.frame':    10137 obs. of  11 variables:
##  $ Year           : Factor w/ 83 levels "1927/28 (1st)",..: 83 83 83 83 83 83 83 83 83 83 ...
##  $ Category       : Factor w/ 40 levels "Acting (other)",..: 2 2 2 2 2 3 3 3 3 3 ...
##  $ Nominee        : Factor w/ 6001 levels "'38'","'Crocodile' Dundee",..: 1929 1938 1952 872 1906 818 1995 1947 2434 1442 ...
##  $ Additional.Info: Factor w/ 6425 levels "","'Made by Fred Zinnemann with the cooperation of Paramount Pictures Corporation for the Los Angeles Orthopaedic Hospital'",..: 1010 5977 5799 5671 43 5585 6328 5825 5668 5672 ...
##  $ Won.           : Factor w/ 16 levels " and Tails\" numbers from Top Hat [came in 2nd]\"",..: 15 15 15 16 15 16 15 15 15 15 ...
##  $ X              : Factor w/ 6 levels ""," D.B. \"Don\" Keele and Mark E. Engebretson has resulted in the over 20-year dominance of constant-directivity",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ X.1            : Factor w/ 5 levels ""," direct radiator bass style cinema loudspeaker systems. [Sound]\"",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ X.2            : Factor w/ 4 levels ""," kindly"," while requiring no dangerous solvents. [Systems]\"",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ X.3            : Factor w/ 3 levels ""," understanding comedy genius - Mack Sennett.\"\"",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ X.4            : Factor w/ 2 levels "","*": 1 1 1 1 1 1 1 1 1 1 ...
##  $ X.5            : Factor w/ 2 levels "","*": 1 1 1 1 1 1 1 1 1 1 ...
summary(week8academy)
##           Year                 Category                 Nominee     
##  1941 (14th): 192   Writing        : 888   Meryl Streep     :   16  
##  1942 (15th): 190   Music (Scoring): 748   Titanic          :   14  
##  1943 (16th): 188   Cinematography : 572   A Star Is Born   :   13  
##  1944 (17th): 181   Art Direction  : 552   Cleopatra        :   13  
##  1945 (18th): 163   Best Picture   : 485   Jack Nicholson   :   12  
##  1940 (13th): 162   Sound          : 460   Katharine Hepburn:   12  
##  (Other)    :9061   (Other)        :6432   (Other)          :10057  
##               Additional.Info
##                       :1126  
##  Metro-Goldwyn-Mayer  :  60  
##  Walt Disney, Producer:  57  
##  Warner Bros.         :  42  
##  John Williams        :  37  
##  France               :  35  
##  (Other)              :8780  
##                                                                                                                                                                                            Won.     
##  NO                                                                                                                                                                                          :7168  
##  YES                                                                                                                                                                                         :2955  
##   and Tails" numbers from Top Hat [came in 2nd]"                                                                                                                                             :   1  
##   as well as 3D prosthetic appliances ranging in size from small wounds to entire torsos. They utilize self-adhesive material that features an unprecedented combination of tissue-thin edges:   1  
##   complex cloth could be achieved efficiently and robustly. Their work provided the conceptual foundation for many cloth simulation systems in use today. [Digital Imaging Technology]"      :   1  
##   deforming objects. [Digital Imaging Technology]"                                                                                                                                           :   1  
##  (Other)                                                                                                                                                                                     :  10  
##                                                                                                             X        
##                                                                                                              :10126  
##   D.B. "Don" Keele and Mark E. Engebretson has resulted in the over 20-year dominance of constant-directivity:    1  
##   discoverer of stars                                                                                        :    1  
##   error-prone measurements on sets. [Digital Imaging Technology]"                                            :    1  
##   resilience                                                                                                 :    1  
##  *                                                                                                           :    7  
##                                                                                                                      
##                                                                X.1       
##                                                                  :10125  
##   direct radiator bass style cinema loudspeaker systems. [Sound]":    1  
##   flexibility and water resistance                               :    1  
##   sympathetic                                                    :    1  
##  *                                                               :    9  
##                                                                          
##                                                                          
##                                                  X.2       
##                                                    :10134  
##   kindly                                           :    1  
##   while requiring no dangerous solvents. [Systems]":    1  
##  *                                                 :    1  
##                                                            
##                                                            
##                                                            
##                                              X.3        X.4      
##                                                :10135    :10136  
##   understanding comedy genius - Mack Sennett."":    1   *:    1  
##  *                                             :    1            
##                                                                  
##                                                                  
##                                                                  
##                                                                  
##  X.5      
##   :10136  
##  *:    1  
##           
##           
##           
##           
## 
library(RPostgreSQL)
## Loading required package: DBI
con=dbConnect(PostgreSQL(),user="postgres",password="jinguds123",dbname="academyAwards")
out=dbGetQuery(con,'select * from "awardCategory"')
out
##          Year
## 1  2010      
## 2  2010      
## 3  2010      
## 4  2010      
## 5  2010      
## 6  2010      
## 7  2010      
## 8  2010      
## 9  2010      
## 10 2010      
## 11 2010      
## 12 2010      
## 13 2010      
## 14 2010      
## 15 2010      
## 16 2010      
## 17 2010      
## 18 2010      
## 19 2010      
## 20 2010      
## 21 2010      
## 22 2010      
## 23 2010      
##                                                                                           CatergoryName
## 1  AActor - Supporting Role                                                                            
## 2  Actress Supporting Role                                                                             
## 3  Animated Featured Film                                                                              
## 4  Art Direction                                                                                       
## 5  Cinematography                                                                                      
## 6  Costume Design                                                                                      
## 7  Directing                                                                                           
## 8  Documentary (Feature)                                                                               
## 9  Documentary (Short Subject)                                                                         
## 10 Film Editing                                                                                        
## 11 Foreign Language Film                                                                               
## 12 Makeup                                                                                              
## 13 Music(Scoring)                                                                                      
## 14 Music(Song)                                                                                         
## 15 Best Picture                                                                                        
## 16 ShortFilm(Animated)                                                                                 
## 17 ShortFile(live Action)                                                                              
## 18 Sound                                                                                               
## 19 Sound Editing                                                                                       
## 20 Visual Effects                                                                                      
## 21 Writing                                                                                             
## 22 Actor Leading Role                                                                                  
## 23 Actress-Leading Role                                                                                
##    CategoryId
## 1         111
## 2         112
## 3         113
## 4         114
## 5         115
## 6         116
## 7         117
## 8         118
## 9         119
## 10        120
## 11        121
## 12        122
## 13        123
## 14        124
## 15        125
## 16        126
## 17        127
## 18        128
## 19        129
## 20        130
## 21        131
## 22        132
## 23        133