Skip to content

Commit

Permalink
update top7_barplot_sum figure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bai-Li-NOAA committed Jul 1, 2024
1 parent 5501818 commit f0a239b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TextAnalysis/top7_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ sum_by_group <- aggregate(value ~ keyword+keyword_id+group+Region, data = data_m
sum_by_group <- sum_by_group[order(sum_by_group$keyword_id),]
group <- unique(sum_by_group$group)
sum_by_group$group <- factor(sum_by_group$group, levels = group)
# jpeg(filename = here::here("TextAnalysis", "top7_barplot_sum.jpg"), width=200, height=150, units="mm", res=1200)
jpeg(filename = here::here("TextAnalysis", "top7_barplot_sum.jpg"), width=200, height=300, units="mm", res=1200)
ggplot(sum_by_group, aes(fill=Region, y=value, x=keyword_id)) +
geom_bar(position="dodge", stat="identity") +
facet_wrap(~group, scales = "free_x", ncol = 1) +
Expand All @@ -246,8 +246,8 @@ ggplot(sum_by_group, aes(fill=Region, y=value, x=keyword_id)) +
panel.background = NULL,
panel.grid.major.x = element_blank(),
panel.grid.major.y = element_blank())
ggsave(here::here("TextAnalysis", "top7_barplot_sum.jpg"))
# dev.off()
# ggsave(here::here("TextAnalysis", "top7_barplot_sum.jpg"))
dev.off()

mean_by_group <- aggregate(value ~ keyword+keyword_id+group+Region, data = data_merge, mean)
mean_by_group <- mean_by_group[order(mean_by_group$keyword_id),]
Expand Down
Binary file modified TextAnalysis/top7_barplot_sum.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f0a239b

Please sign in to comment.