── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.0.4
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(gganimate)library(gifski)library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
Rows: 17272 Columns: 50
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): country
dbl (48): agricultural_land%, forest_land%, land_area, avg_precipitation, t...
date (1): date
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Land_CO <- V_Countries |>ggplot(aes(x = GDP_Per_capita, y = Pop_M, color = country, size = political_stability_estimate)) +geom_point() +scale_x_log10()+labs(title ='Visualizing Global Trends: US vs Latin Countries Year: {frame_time}', x ='GDP per Capita', y ='Population (In Millions)',color ="Countries",size ="Political Stability",caption ="Source: World Bank Database") +transition_time(date) +ease_aes('linear') +theme(plot.title=element_text(size=9))+theme_bw() +scale_color_manual(values =c("United States"='#68228B',"Mexico"='#EE2C2C',"Brazil"='#76EE00',"Peru"='#EE1289',"Colombia"='#EE1',"Argentina"='#00688B'))#animation <- animate(Land_CO, height = 450, fps = 9, resolution = 1500, renderer = gifski_renderer())#animation#anim_save("Land_CO_Animated_Bubble_Chart.gif", animation = animation)