Loading...
Loading...
Create publication-quality charts and graphs for economics papers.
npx skill4agent add meleantonio/awesome-econ-ai-stuff econ-visualization# ============================================
# Publication-Quality Figure in R
# ============================================
library(tidyverse)
df <- read_csv("data.csv")
ggplot(df, aes(x = year, y = gdp_per_capita, color = country)) +
geom_line(size = 1) +
scale_y_continuous(labels = scales::comma) +
labs(
title = "GDP per Capita Over Time",
x = "Year",
y = "GDP per Capita (USD)",
color = "Country"
) +
theme_minimal(base_size = 12) +
theme(
legend.position = "bottom",
panel.grid.minor = element_blank()
)
ggsave("figures/gdp_per_capita.pdf", width = 7, height = 4, dpi = 300)ggplot2scalesdplyrmatplotlibseaborn