최근 KOICA 전문가 파견으로 베트남에 사업 예비조사를 다녀왔습니다. 보고서 작성 중 베트남 축산의 통계자료를 찾는데 예쁘게 시각화된 최신 자료(~2018)를 찾기가 힘들어 직접 시각화를 하였습니다. 자료 출처는 General Statistics Office of Vietnam입니다. 분석에 사용한 data는 Github repository를 참고하시길 바랍니다.

library(tidyverse)
library(janitor)

df <- readxl::read_excel("animal-head.xlsx")
df <- df %>% janitor::clean_names()

df1 <- readxl::read_excel("product.xlsx")
df1 <- janitor::clean_names(df1)
df1 <- df1 %>%
  mutate_if(is.numeric, round, 0)

Buffaloe population and live weight changes in Vietnam

df %>%
  ggplot() +
  geom_col(aes(year, buffaloes), fill = "#d15a7c") +
  geom_line(aes(year, living_weight_of_buffaloes*30), color = "black", data = df1) +
  geom_point(aes(year, living_weight_of_buffaloes*30), color = "black", data = df1) +
  geom_text(aes(year, living_weight_of_buffaloes*30, label = living_weight_of_buffaloes), vjust = -1, color = "black", size = 3, data = df1) +
  scale_x_continuous(breaks = 1990:2018) +
  ggthemes::theme_clean() +
  theme(axis.text.x=element_text(angle=45, hjust=1)) +
  labs(
    title = "Buffaloe population and live weight changes in Vietnam",
    subtitle = "Line is total live weight changes of buffaloe (1,000 tons)",
    x = "Years",
    y = "Buffaloes (1,000 heads)", 
    caption = "(Data from General Statistics Office of Vietnam; Visualized by KU)"
  )

Cattle population and live weight changes in Vietnam

df %>%
  ggplot(aes(year, cattle)) +
  geom_col(fill = "#347474") +
  geom_line(aes(year, living_weight_of_cattle*18), color = "black", data = df1) +
  geom_point(aes(year, living_weight_of_cattle*18), color = "black", data = df1) +
  geom_text(aes(year, living_weight_of_cattle*18, label = living_weight_of_cattle), vjust = -1, color = "black", size = 3, data = df1) +
  scale_x_continuous(breaks = 1990:2018) +
  ggthemes::theme_clean() +
  theme(axis.text.x=element_text(angle=45, hjust=1)) +
  labs(
    title = "Cattle population and live weight changes in Vietnam",
    subtitle = "Line is total live weight changes of cattle (1,000 tons)",
    x = "Years",
    y = "Cattle (1,000 heads)", 
    caption = "(Data from General Statistics Office of Vietnam; Visualized by KU)"
  )

Horese population changes in Vietnam

df %>%
  ggplot(aes(year, horses)) +
  geom_col(fill = "#5f6caf") +
  ggthemes::theme_clean() +
  theme(axis.text.x=element_text(angle=45, hjust=1)) +
  labs(
    title = "Horese population changes in Vietnam",
    x = "Years",
    y = "Horse (1,000 heads)", 
    caption = "(Data from General Statistics Office of Vietnam; Visualized by KU)"
  )