HAPPINESS DATA

Size is family

library(ggplot2)
library(gganimate)
happiness <- read.csv('happiness_project.csv', sep=",", header=TRUE)

ggplot(happiness, aes(happiness_score, economy_gdp_per_capita, size = family, color = country)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_size(range = c(2, 12)) +
  scale_x_log10() +
  facet_wrap(~region) +
  labs(title = 'Year: {frame_time}', x = 'Happiness Score', y = 'Economy: GDP Per Capita') +
  transition_time(year) +
  ease_aes('linear')

Size is health life expectancy

ggplot(happiness, aes(happiness_score, economy_gdp_per_capita, size = health_life_expectancy, color = country)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_size(range = c(2, 12)) +
  scale_x_log10() +
  facet_wrap(~region) +
  labs(title = 'Year: {frame_time}', x = 'Happiness Score', y = 'Economy: GDP Per Capita') +
  transition_time(year) +
  ease_aes('linear')

MOVIE DATA

movies <- read.csv('everything_MoviesUSA.csv', sep=",", header=TRUE)

ggplot(movies, aes(budget, gross,size=votes, color=rating)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_size(range = c(2, 8)) +
  scale_x_log10() +
  facet_wrap(~genre) +
  labs(title = 'Year: {current_frame}', x = 'Budget',  y = 'Gross') +
  transition_manual(year)
## nframes and fps adjusted to match transition

Still toying with this one

ggplot(movies, aes(votes,percProf,size=budget, color=rating)) +
  geom_point(alpha = 0.7, show.legend = FALSE) +
  scale_size(range = c(2, 8)) +
  scale_x_log10() +
  facet_wrap(~genre) +
  labs(title = 'Year: {current_frame}', x = 'Budget',  y = 'Gross') +
  transition_manual(year)
## nframes and fps adjusted to match transition

Fin.