diff --git a/manuscript/article.qmd b/manuscript/article.qmd index 439eff1..361e405 100644 --- a/manuscript/article.qmd +++ b/manuscript/article.qmd @@ -593,6 +593,7 @@ the overall output volume strongly increased during this period. ```{python} #| label: fig-publications-per-year #| fig-cap: Publications per year +from typing import cast df_study_years = ( df.groupby(["author", "year", "title"]) @@ -602,6 +603,8 @@ df_study_years = ( ["year"].value_counts() .sort_index() ) +df_study_years = cast(pd.DataFrame, df_study_years) # fix potential type errors + # use order to ensure all years are displayed, even ones without values years_range = list(range(df_study_years.index.min(), df_study_years.index.max()+1)) ax = sns.barplot(df_study_years, order=years_range)