Not important for production deployments, but a little wonky when testing.
library(ggplot2)
r1$month <- as.Date(r1$month)
r1$trips <- as.numeric(r1$trips)
p <- ggplot(r1, aes(x=month, y=trips)) +
geom_col(fill="steelblue", width=20) +
geom_text(aes(label=trips), vjust=-0.5) +
scale_x_date(date_labels="%b %Y", breaks=r1$month) +
labs(title="NYC Taxi Trips per Month", x="Month", y="Number of trips") +
theme_minimal()
ggsave("/tmp/trips_per_month.png", p, width=6, height=4, dpi=120)
p
#> [33m! [39m in callr subprocess.
#> [1mCaused by error [22m in `dyn.load(dll_path)`:
#> [33m! [39m unable to load shared object '/var/folders/vf/8ns_0t1s66g_m36bwyhdgd2r0000gp/T//R...
#> dlopen(/var/folders/vf/8ns_0t1s66g_m36bwyhdgd2r0000gp/T//RtmplYOHIw/pkgload57a71c7953cf/con
Not important for production deployments, but a little wonky when testing.