Skip to content

Commit

Permalink
Tinkering
Browse files Browse the repository at this point in the history
...but not sure if I'm doing what's trying to be done with geom_col
  • Loading branch information
jdavelar committed Feb 14, 2021
1 parent 66feb1a commit 7e91b7e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Lab3.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,20 @@ ggplot(purifiedhoney, aes(year, prodsimpler)) +
regional_honey_production <- left_join(purifiedhoney, census_regions) %>%
group_by(state, Region) %>%
summarise(totalprod = mean(totalprod)) %>%
mutate(Region = as.factor(Region)) %>%
# mutate(Region = fct_reorder(Region,
# "Midwest",
# "West",
# "South",
# "Northeast"))
arrange(Region)
ungroup() %>%
mutate(Region = as.factor(Region))
ggplot(regional_honey_production, aes(state, totalprod, color = Region)) +
geom_col(aes(group = Region))
# Leaving this in case we need it
fct_reorder(Region,
"Midwest",
"West",
"South",
"Northeast"))
```

```{r bar plot showing average honey production, with color indicating region}
ggplot(regional_honey_production, aes(reorder(state, -totalprod), totalprod, fill = Region)) +
geom_col(aes(group = Region))
```

```{r heatmap of average production by region}
Expand Down

0 comments on commit 7e91b7e

Please sign in to comment.