-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
how to extend ggplot2 while drowning
- Loading branch information
Showing
9 changed files
with
2,929 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,224 changes: 1,224 additions & 0 deletions
1,224
2024-10-29-asa-cowy-fall-2024/asa-cowy-fall-2024.html
Large diffs are not rendered by default.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
2024-10-30-packcircles-in-script-geom/packcircles-in-script-geom.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: "another experiment" | ||
author: "Evangeline Reynolds" | ||
date: "`r Sys.Date()`" | ||
output: | ||
html_document: | ||
toc: TRUE | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE) | ||
options(tidyverse.quiet = TRUE) | ||
``` | ||
|
||
|
||
|
||
|
||
## Intro Thoughts | ||
|
||
|
||
## Status Quo | ||
|
||
```{r} | ||
library(tidyverse) | ||
``` | ||
|
||
## Experiment | ||
|
||
```{r} | ||
library(tidyverse) | ||
library(packcircles) | ||
compute_panel_circlepack <- function(data, scales){ | ||
data_w_id <- data |> | ||
mutate(id = row_number()) | ||
data_w_id |> | ||
pull(area) |> | ||
packcircles::circleProgressiveLayout( | ||
sizetype = 'area') |> | ||
packcircles::circleLayoutVertices(npoints = 50) |> | ||
left_join(data_w_id) |> | ||
mutate(group = id) | ||
} | ||
geom_packcircles <- function(...){ | ||
StatTemp <- ggproto("StatTemp", Stat, | ||
compute_panel = compute_panel_circlepack) | ||
geom_polygon(stat = StatTemp, ...) | ||
} | ||
gapminder::gapminder |> | ||
filter(year == 2002) |> | ||
ggplot() + | ||
aes(area = pop/1000000) + | ||
geom_packcircles() + | ||
aes(fill = continent) | ||
last_plot() + | ||
facet_wrap(facet = vars(continent)) + | ||
coord_equal() | ||
ggcalendar::ggcalendar(dates_df = ggcalendar::df_month(month = 11)) | ||
ggcalendar::ggcalendar(dates_df = ggcalendar::df_month(month = 12)) | ||
``` | ||
|
||
|
||
|
||
## Closing remarks, Other Relevant Work, Caveats |
477 changes: 477 additions & 0 deletions
477
2024-10-30-packcircles-in-script-geom/packcircles-in-script-geom.html
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
2024-11-01-packcircles-in-script-geom/packcircles-in-script-geom.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: "another experiment" | ||
author: "Evangeline Reynolds" | ||
date: "`r Sys.Date()`" | ||
output: | ||
html_document: | ||
toc: TRUE | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE) | ||
options(tidyverse.quiet = TRUE) | ||
``` | ||
|
||
|
||
|
||
|
||
## Intro Thoughts | ||
|
||
|
||
## Status Quo | ||
|
||
```{r} | ||
library(tidyverse) | ||
``` | ||
|
||
## Experiment | ||
|
||
```{r} | ||
``` | ||
|
||
|
||
|
||
## Closing remarks, Other Relevant Work, Caveats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters