
这个图中,其实比例直方图就可以实现,但是这里把简单的直方图变成华夫饼图,提升了美观程度。整体实现代码如下:
library(wesanderson)library(tidyverse)library(cowplot)library(waffle)library(scales)#### Data ####wildlife_impacts <-read_csv("data/data_2019-07-23.csv", col_types = "Tcccccccccdddcdddcccd") %>%mutate(phase_of_flt = str_to_title(phase_of_flt))levels_phase_of_flt <- c("Parked", "Taxi", "Take-Off Run", "Climb", "En Route","Descent", "Approach", "Landing Roll")levels_damage <- c("None", "Minor", "Damaged", "Substantial", "Unknown")color_damag










