library(tidyverse)
<- tidytuesdayR::tt_load(2023, week = 03) tuesdata
Looking at making slopes for the #30DayCahrtChallenge 2023 - day 5
<- tuesdata$artists
artists %>%head artists
%>%DataExplorer::profile_missing()%>%arrange(-pct_missing) artists
413 Artistis,
ggplot(artists)+
geom_point(aes(x = artist_unique_id,y=artist_nationality))+
facet_wrap(~artist_race)
ggplot(artists,aes(x = year, y = space_ratio_per_page_total, group = artist_unique_id)) +
geom_line()+
facet_wrap(~artist_gender)
%>%
artists filter(artist_gender=="Female") %>%
ggplot(aes(x = year, y = space_ratio_per_page_total, group = artist_unique_id)) +
geom_line()+
facet_wrap(~artist_nationality)
%>%
artists filter(artist_gender=="Female",
=="French",
artist_nationality=="White") %>%
artist_raceggplot(aes(x = year, y = space_ratio_per_page_total, group = artist_unique_id)) +
geom_line()+
facet_wrap(~book)
Giorgio de Chirico space_ratio_per_page_total along the time.
%>%
artistsfilter(artist_name=="Giorgio de Chirico") %>%
ggplot(
aes(x = year, y = space_ratio_per_page_total, group = artist_unique_id)) +
geom_point()+
geom_smooth(method = "lm")
geom_abline(slope=-0.000050,intercept = mean(artists$space_ratio_per_page_total))
ggplot(artists,
aes(x = year, y = space_ratio_per_page_total, group = artist_unique_id)) +
geom_line()+
facet_wrap(vars(artist_nationality))
%>%
artistsfilter(artist_nationality=="Italian")%>%#count(year)
mutate(year=as.integer(year)) %>%
ggplot(
aes(x = year, y = space_ratio_per_page_total,
group = artist_name,
fill=artist_name,
color=artist_name,
label=artist_name)) +
geom_point(shape=21,
stroke=0.5,
alpha=0.5,
show.legend = FALSE)+
::geom_textsmooth(method = "lm",
geomtextpathse=FALSE,
family="Roboto Condensed",
show.legend = FALSE)+
scale_color_viridis_d()+
scale_x_continuous(limits = c(1945,2035),n.breaks = 5,expand = c(0,0))+
facet_wrap(~book,scales = "free") +
labs(y="Space Ratio per Page Total",
x="Year",
title="Male Italian Artists",
subtitle="how much space their work took up in each textbook",
caption = "DataSource: #TidyTuesday 2023 week3 Art history\nDataViz: Federica Gazzelloni #30DayChartChallenge 2023 Day5 - slope\n")+
::theme_ipsum_rc(plot_title_size = 28,
hrbrthemescaption_face = "bold",
caption_family = "Roboto Condensed",
base_family = "Roboto Condensed"
+
)theme(strip.background = element_blank(),
strip.placement = "outside",
strip.clip = "off",
strip.text = element_text(hjust=0.5,size=20),
plot.margin = unit(c(5,10,5,5),units = "pt"))
ggsave("w3_Arhd.png",
bg="white",
width = 9,height = 5)