Skip to content

Instantly share code, notes, and snippets.

View mitrad's full-sized avatar

Woosung Yang mitrad

View GitHub Profile
@mitrad
mitrad / .Rprofile
Last active August 29, 2015 14:17
My .Rprofile
## Don't ask me for my CRAN mirror every time
#options("repos" = c(CRAN = "http://cran.revolutionanalytics.com/"))
options("repos" = c(CRAN = "http://cran.rstudio.com/"))
options(digits.secs=3) # show sub-second time stamps
options(max.print=1000) # do not print more than 1000 lines
options(digits=4, show.signif.stars=FALSE)
# From http://kevinushey.github.io/blog/2015/02/02/rprofile-essentials/
# warn on partial matches
@mitrad
mitrad / newstapa_leaks.R
Last active November 26, 2020 04:43
뉴스타파에서 공개한 국정원 의심 계정의 트윗 데이터 분석
library(KoNLP)
library(wordcloud)
library(plyr)
library(ggplot2)
library(scales)
tw <- read.delim('./data/NIS.csv', header=T, sep=',', stringsAsFactors=F)
tw.RT <- read.delim('./data/NIS_RT.csv', header=T, sep=',', stringsAsFactors=F)
tw.all <- read.delim('./data/NIS_withRT.csv', header=T, sep=',',
stringsAsFactors=F)
@mitrad
mitrad / Openfights.R
Last active December 11, 2017 09:11
OpenFlights 데이터를 이용한 데이터 시각화
library(ggmap)
# OpenFlights에서 데이터 불러오기
# 2015.9.19 url 수정 (by David)
## 공항정보 불러오기
#url <- "http://openflights.svn.sourceforge.net/viewvc/openflights/openflights/data/airports.dat"
url <- "https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat"
airport <- read.csv(url, header = F, stringsAsFactor = F)
## 항공노선 정보 불러오기
#url <- "http://openflights.svn.sourceforge.net/viewvc/openflights/openflights/data/routes.dat"
## 최종 수정일: 2013/5/29
## 작성자 : 양 우성
## 데이터 불러오기
better <- read.csv("Better Life Index.csv", header=T)
names(better) <- c("Title", "2011", "2012", "2013")
## Barplot의 색 지정
col <- ifelse(better[,2:4] >= 5, "#42cc0a", "#bb0d4f")