plot_action_state_type <- action_state_type |>select(State, Total =`Treaty Action Count`, Derogation, Other) |>pivot_longer(cols =-State, names_to ="type", values_to ="count") |>arrange(desc(type), desc(count)) |>mutate(State =fct_inorder(State))panels <- plot_action_state_type |>filter(type =="Total") |>mutate(panel =ifelse(row_number() <=21, 1, 2)) |>select(State, panel)plot_action_state_type |>filter(type !="Total") |>left_join(panels, by =join_by(State)) |>ggplot(aes(x = count, y =fct_rev(State), fill =fct_rev(type)) ) +geom_col() +scale_fill_manual(values = clrs[c(3, 6)], guide =guide_legend(reverse =TRUE)) +labs(x ="Total treaty actions between March 2020–June 2021", y =NULL, fill =NULL) +facet_wrap(vars(panel), scales ="free_y") +theme_pandem() +theme(strip.text =element_blank())
Treaty actions by treaty
Code
action_treaty |>mutate(Treaty =fct_reorder(Treaty, `Number of Actions`)) |>group_by(`Number of Actions`) |>summarize(Treaties =str_flatten(Treaty, collapse ="; ")) |>ungroup() |>arrange(desc(`Number of Actions`)) |>tt(width =c(0.2, 0.8)) |>style_tt(j =1:2, align ="l") |>style_tt(bootstrap_class ="table table-sm" )
Table 1
Number of Actions
Treaties
111
ICCPR
8
CED
7
UN CRC Optional Protocol on the Involvement of Children in Conflict
3
CRPD OP; ICESCR OP
2
CAT; CRPD; ICCPR OP Abolition of Death Penalty; UN CRC Optional Protocol on the Sale of Chldren, Child Pornography, and Child Prostitution; UN CRC Optional Protocol Communications Procedure
1
CEDAW; CEDAW Amendment; CEDAW OP; CMW; Convention on the Non-Applicability of Statutory Limitations to War Crimes and Crimes Against Humanity; ICESCR; UN CRC
Code
action_treaty |>mutate(Treaty =fct_reorder(Treaty, `Number of Actions`)) |>mutate(panel =ifelse(row_number() >=11, 1, 2)) |>ggplot(aes(x =`Number of Actions`, y = Treaty)) +geom_col(fill = clrs[5]) +scale_y_discrete(labels =label_wrap(35)) +labs(x ="Number of actions", y =NULL) +facet_wrap(vars(panel), scales ="free_y") +theme_pandem() +theme(strip.text =element_blank())
Non-derogation actions
Code
action_non_derog |>mutate(Action =fct_reorder(`Treaty Action`, Count)) |>ggplot(aes(x = Count, y = Action)) +geom_col(fill = clrs[3]) +labs(x ="Number of non-derogation actions", y =NULL) +theme_pandem()