library("ggplot2")
df = read.csv("F990_clean.csv", header = TRUE)

Organizational age

summary(df$age)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    3.00   25.00   34.00   38.39   45.00  209.00     223
boxplot(df$age)

ggplot(df, aes(x=age)) + geom_histogram(aes(y=..density..), binwidth=5, col="black", fill="white") +
  geom_density(alpha=.2, fill="#FF6666")
## Warning: Removed 223 rows containing non-finite values (stat_bin).
## Warning: Removed 223 rows containing non-finite values (stat_density).

Distribution by state

table(df$state)
## 
##      AK  AL  AR  AZ  CA  CO  CT  DC  DE  FL  GA  HI  IA  ID  IL  IN  KS 
##   1  36  67  34  77 473  79  86  41  20 200 144  26  57  24 181  92  40 
##  KY  LA  MA  MD  ME  MI  MN  MO  MS  MT  NC  ND  NE  NH  NJ  NM  NV  NY 
##  65  62 163  87  33 148 130  94  31  31 151  20  37  35 100  49  28 293 
##  OH  OK  OR  PA  PR  Pu  RI  SC  SD  TN  TX  UT  VA  VI  VT  WA  WI  WV 
## 174  49  71 250  24   1  22  55  16  89 175  29  92   2  34 142 102  35 
##  WY 
##  18
ggplot(df) + 
  geom_bar(mapping=aes(x=state, y = ..count.., group =1)) + # ..count..
  theme_bw(base_size = 10) +  #To control the room for the labels at the bottom
  theme(axis.text.x=element_text(angle=90,hjust=1)) #To control the angle of the text

Number of volunteers

summary(df$vlntr)
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
##      0.0     13.0     75.0    733.1    400.0 300400.0      628
boxplot(df$vlntr)

ggplot(df, aes(x=vlntr)) + geom_histogram(aes(y=..density..), binwidth=5, col="black", fill="white") +
  geom_density(alpha=.2, fill="#FF6666")
## Warning: Removed 628 rows containing non-finite values (stat_bin).
## Warning: Removed 628 rows containing non-finite values (stat_density).

Number of employees

summary(df$empl)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##     0.0    13.0    36.0   155.7   115.0 37700.0      54
boxplot(df$empl)

ggplot(df, aes(x=empl)) + geom_histogram(aes(y=..density..), binwidth=5, col="black", fill="white") +
  geom_density(alpha=.2, fill="#FF6666")
## Warning: Removed 54 rows containing non-finite values (stat_bin).
## Warning: Removed 54 rows containing non-finite values (stat_density).

Number of board members

summary(df$board)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    8.00   12.00   13.03   16.00  225.00      30
boxplot(df$board)

ggplot(df, aes(x=board)) + geom_histogram(aes(y=..density..), binwidth=5, col="black", fill="white") +
  geom_density(alpha=.2, fill="#FF6666")
## Warning: Removed 30 rows containing non-finite values (stat_bin).
## Warning: Removed 30 rows containing non-finite values (stat_density).

Revenue

summary(df$tt_revenue)
##       Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
##   -3456000     653900    1829000    9573000    6510000 4639000000 
##       NA's 
##          6
boxplot(df$tt_revenue)

expense

summary(df$tt_expense)
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max.      NA's 
## 0.000e+00 6.334e+05 1.745e+06 9.134e+06 6.217e+06 4.257e+09        10
boxplot(df$tt_expense)