MatthewBJane / ThemePark

Fun ggplot themes for popular culture
http://matthewbjane.com/ThemePark/
MIT License
196 stars 13 forks source link

Adds some example data (Barbie's box office) #32

Closed christopherkenny closed 1 year ago

christopherkenny commented 1 year ago

I think it'd be nice to have some built-in data for use in examples. Thoughts on this @MatthewBJane and @lukepilling? I could have opened an issue, but it seemed easiest to make the PR and show what I was thinking.

lcpilling commented 1 year ago

This is a fantastic idea. Just playing around with the data to make a really nice simple example:

barbie_box_office |> 
    mutate(daily=daily/1000000) |>
    ggplot(aes(x = day, y = daily)) +
        geom_smooth(method = 'loess', 
            color = barbie_theme_colors["dark"],
            fill = barbie_theme_colors["light"]) +
        geom_point(color = barbie_theme_colors["medium"]) +
        labs(title = "Barbie Scatter Plot",
            subtitle="Daily box office takings",
            caption="Source: www.boxofficemojo.com",
            x="Days since release",
            y="Box office takings (million USD)") +
        theme_barbie()

image