Basic Data Summary

The following documents is a run a basic data summary on the dataset. There are total of 743 records across 23 attributes.

library(RColorBrewer)
library(rsconnect)
library(colorRamps)
setwd("C:/Parth/Personal/Data Mining/Global Voices")
ad <- read.csv("Data/Preview/advox_dt1.csv")

# Frequency by years
# ----------------
p <- as.Date(ad$Main.source.publication.date, "%d-%m-%Y")
yr <- format.Date(p, "%Y")
yr[is.na(yr)] <- 0
y <- table(yr)
barplot(y)

# Seasonality Frequency by months
# ----------------
mn <- format.Date(p, "%b")
mn[is.na(mn)] <- "NA"
m <- table(mn)
barplot(m, col=brewer.pal(12,"Set3"), las=2)

# Frequency by country  [71 countries]
# ----------------
ct <- ad$Where.did.the.instance.take.place.   # 71
c <- table(ct)
barplot(c, col = blue2green2red(71), las =2)   # to fit for axis labels

# Type of Judicial Action [20 Categories]
# ----------------
th <- ad$THREAT.GROUP.4..A..What.type.of.judicial.action.occurred. # 20
t <- table(th)
barplot(t, col = blue2green2red(20), las =2)