install.packages(20172280.Rproj)
install.packages("C:\Users\Admin\Desktop\20172280\Leva")
install.packages("C:\Users\Admin\Desktop\20172280\Leva")
install.packages("C:/Users/Admin/Desktop/20172280/Leva")
/20172280/Leva")
install.packages("Home/20172280/Leva.xls")
library(Leva.xls)
install.packages("C:\Users\Admin\Documents\20172280")
install.packages("C:/Users/Admin/Documents/20172280")
library(Leva.xls)
install.packages("C:/Users/Admin/Documents/20172280/Leva.xls")
library(Leva.xls)
install.packages("C:/Users/Admin/Documents/20172280/Leva.xls")
install.packages("C:/Users/Admin/Documents/20172280/Leva.xls")
install.packages("C:/Users/Admin/Documents/Leva.xls")
library(Leva.xls)
install.packages("C:/Users/Admin/Documents/20172280/Leva")
library(Leva.xls)
install.packages("C:/Users/Admin/Documents/20172280/Leva")
View(Leva)
library(Leva)
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva)
View(Leva)
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva")
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva")
View(Leva)
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva")
View(Leva)
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva.xls")
install.packages("readxl")
library(readxl)
df_exam <-read_excel("C:/Users/Admin/Documents/20172280/Leva.xls")
View(Leva)
View(df_exam)
Leva <-read_excel("C:/Users/Admin/Documents/20172280/Leva.xls")
View(Leva
)
mean(Leva$시군명)
mean(Leva$SIGUN_NM)
install.packages("dplyr")
library(dplyr)
install.(ggplot2)
install.packages("ggplot2")
library(ggplot2)
library(ggplot2)
Leva <- rename(Leva,
시군명 = SIGUN_NM,
시군코드 = SIGUN_CD,
구/읍면동명 = EMD_NM,
사고구분명 = ACDNT_DIV_NM,
발생건수 = OCCUR_CNT,
사상자수 = CASLT_CNT,
사망자수 = DPRS_CNT,
중상자수 = SERINJRY_INDVDL_CNT,
경상자수 = SLTINJRY_INDVDL_CNT,
)
View(OCCIR_CNT)
Leva <- rename(Leva,
시군명 = SIGUN_NM,
시군코드 = SIGUN_CD,
구/읍면동명 = EMD_NM,
사고구분명 = ACDNT_DIV_NM,
발생건수 = OCCUR_CNT,
사상자수 = CASLT_CNT,
사망자수 = DPRS_CNT,
중상자수 = SERINJRY_INDVDL_CNT,
경상자수 = SLTINJRY_INDVDL_CNT,
)
Leva <- rename(Leva,
시군명 = SIGUN_NM,
시군코드 = SIGUN_CD,
구/읍면동명 = EMD_NM,
사고구분명 = ACDNT_DIV_NM,
발생건수 = OCCUR_CNT,
사상자수 = CASLT_CNT,
사망자수 = DPRS_CNT,
중상자수 = SERINJRY_INDVDL_CNT,
경상자수 = SLTINJRY_INDVDL_CNT)
Leva <- rename(Leva,
시군명 = SIGUN_NM,
시군코드 = SIGUN_CD,
구/읍면동명 = EMD_NM,
사고구분명 = ACDNT_DIV_NM,
발생건수 = OCCUR_CNT,
사상자수 = CASLT_CNT,
사망자수 = DPRS_CNT,
중상자수 = SERINJRY_INDVDL_CNT,
경상자수 = SLTINJRY_INDVDL_CNT)
Leva <- rename(Leva,
시군명 = SIGUN_NM,
시군코드 = SIGUN_CD,
구/읍면동명 = EMD_NM,
사고구분명 = ACDNT_DIV_NM,
발생건수 = OCCUR_CNT,
사상자수 = CASLT_CNT,
사망자수 = DPRS_CNT,
중상자수 = SERINJRY_INDVDL_CNT,
경상자수 = SLTINJRY_INDVDL_CNT)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_COD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
View(EMD_NM)
Leva <- View(EMD_NM)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
View(df_exam)
Leva <-read_excel("C:/Users/Admin/Documents/20172280/Leva.xls")
View(Leva)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드 ,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
Leva <- rename(Leva,
SIGUN_NM = 시군명,
SIGUN_CD = 시군코드,
EMD_NM = 구/읍면동명,
ACDNT_DIV_NM = 사고구분명,
OCCUR_CNT = 발생건수,
CASLT_CNT = 사상자수,
DPRS_CNT = 사망자수,
SERINJRY_INDVDL_CNT = 중상자수,
SLTINJRY_INDVDL_CNT = 경상자수)
View(Leva)
Leva$시군명
class(Leva$시군명)
table(Leva$발새발생건수)
table(Leva$발생건수)
ggplot(data = Leva, aes(x = 시군명, y= 발생건수)) + geom_col()
ggplot(data = Leva, aes(x = 구/읍면동명, y = 사상자수)) +geom_line()
ggplot(data = Leva, aes(x = 시군, y = 사상자수)) +geom_line()
ggplot(data = Leva, aes(x = 시군명, y = 사상자수)) +geom_line()
ggplot(data = Leva, aes(x = 시군명, y = 사상자수)) +geom_col()
Leva_map <- map_data("Leva")
library(ggplot2)
install.packages("ggplot2")
install.packages("ggplot2")
library(ggplot2)
Leva_map <- map_data("Leva")
install.packages("map_data")
install.packages("ggiraphExtra")
library(ggiraphExtra)
Leva_map <- map_data("Leva")
Leva_map <- map_data("Leva")
str(Leva)
ggChoropleth(data = Leva,
aes(fill = 발생건수
map_id = 시군명),
map = 위도,
interactive = T)
ggChoropleth(data = Leva,
aes(fill = 발생건수,
map_id = 시군명),
map = 위도,
interactive = T)
(interactive = T)
map_id = 시군명)
ggChoropleth(data = Leva,
aes(fill = 발생건수,
map_id = 시군명)
map = kormap1)
ggplot(data = Leva, aes(x = 시군명, y= 발생건수)) + geom_col()
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
SIGUN_NM = 시군명)
ggChoropleth(data = Leva,
aes(fill = 발생건수,
map_id = 시군명)
map = kormap1)
ggChoropleth(data = Leva,
aes(fill = 발생건수,
map_id = 시군명)
map = kormap1)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
SIGUN_NM = 시군명)
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
시군명 = SIGUN_NM)
Leva <- rename(Leva,
발생건수 = OCCUR_CNT,
시군명 = SIGUN_NM)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
Leva <- rename(Leva,
발생건수 = OCCUR_CNT,
시군명 = SIGUN_NM)
Leva <- rename(Leva,
발생건수 = OCCUR_CNT,
시군명 = SIGUN_NM)
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
SIGUN_NM = 시군명)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
install.packages("ggiraphExtra")
install.packages("ggiraphExtra")
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
Leva <- rename(Leva,
발생건수 = OCCUR_CNT,
시군명 = SIGUN_NM)
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
SIGUN_NM = 시군명)
str(changeCode(Leva))
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
install.packages("stringi")
install.packages("devtools")
devtools::install_github("cardiomoon/kormaps2014")
livrary(kormaps2014)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
install.packages("devtools")
devtools::install_github("cardiomoon/kormaps2014")
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
Leva <- rename(Leva,
발생건수 = OCCUR_CNT,
시군명 = SIGUN_NM)
Leva <- rename(Leva,
OCCUR_CNT = 발생건수,
SIGUN_NM = 시군명)
install.packages("devtools")
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
install.packages("stringi")
install.packages("devtools")
devtools::install_github("cardiomoon/kormaps2014")
livrary(kormaps2014)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
ggChoropleth(data = Leva,
aes(fill = OCCUR_CNT,
map_id = SIGUN_NM)
map = kormap1)
View(Leva)
View(Leva)
library(readxl)
