import%20marimo%0A%0A__generated_with%20%3D%20%220.18.0%22%0Aapp%20%3D%20marimo.App(width%3D%22full%22)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20A%20quick%20country-level%20bibliometric%20survey%20of%20architecture%20and%20built%20environment%20research%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%20%20%20%20import%20pandas%20as%20pd%0A%20%20%20%20import%20matplotlib.pyplot%20as%20plt%0A%20%20%20%20import%20plotly.express%20as%20px%0A%20%20%20%20return%20mo%2C%20pd%2C%20plt%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20While%20browsing%20feeds%20from%20journals%20in%20my%20main%20research%20fields%2C%20architecture%20and%20the%20built%20environment%2C%20I%20have%20noticed%20a%20very%20strong%20trend%3A%20the%20proportion%20of%20studies%20from%20China%20appears%20to%20be%20rising%20quickly.%20I%20decided%20to%20investigate%20further%20and%20assemble%20some%20numbers%20and%20graphs%2C%20without%20attempting%20to%20produce%20a%20full%20bibliometric%20study.%0A%0A%20%20%20%20The%20first%20step%20was%20compiling%20a%20list%20of%20journals%20that%2C%20not%20being%20exhaustive%2C%20could%20be%20representative.%20This%20was%20my%20take%3A%0A%0A%20%20%20%20-%20Frontiers_of_Architectural_Research%0A%20%20%20%20-%20Urban_Forestry_Urban_Greening%0A%20%20%20%20-%20Building_and_Environment%0A%20%20%20%20-%20Energy_and_Buildings%0A%20%20%20%20-%20Urban_Climate%0A%20%20%20%20-%20Applied_Energy%0A%20%20%20%20-%20Renewable_and_Sustainable_Energy_Reviews%0A%20%20%20%20-%20Sustainable_Cities_and_Society%0A%20%20%20%20-%20Journal_of_Cleaner_Production%0A%0A%20%20%20%20It%20is%20worth%20noting%20that%20these%20journals%20are%20not%20guardians%20of%20truth%20but%20brand-driven%20outlets.%20They%20publish%20at%20high%20volume%2C%20process%20large%20numbers%20of%20submissions%2C%20and%20reject%20most%20of%20them.%20Although%20they%20are%20peer%20reviewed%2C%20novelty%20and%20fashionable%20terminology%20often%20outweigh%20everything%20else.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(pd)%3A%0A%20%20%20%20df%20%3D%20pd.read_csv(%22..%2Fdata%2Fbuilt_environment_dataset_scopus.csv%22)%0A%20%20%20%20return%20(df%2C)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20European%20countries%20are%20grouped%20together%2C%20including%20non-EU%20Switzerland.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(df)%3A%0A%20%20%20%20eu_countries%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%22Austria%22%2C%20%22Belgium%22%2C%20%22Bulgaria%22%2C%20%22Croatia%22%2C%20%22Cyprus%22%2C%20%22Czech%20Republic%22%2C%0A%20%20%20%20%20%20%20%20%22Denmark%22%2C%20%22Estonia%22%2C%20%22Finland%22%2C%20%22France%22%2C%20%22Germany%22%2C%20%22Greece%22%2C%0A%20%20%20%20%20%20%20%20%22Hungary%22%2C%20%22Ireland%22%2C%20%22Italy%22%2C%20%22Latvia%22%2C%20%22Lithuania%22%2C%20%22Luxembourg%22%2C%0A%20%20%20%20%20%20%20%20%22Malta%22%2C%20%22Netherlands%22%2C%20%22Poland%22%2C%20%22Portugal%22%2C%20%22Romania%22%2C%20%22Slovakia%22%2C%0A%20%20%20%20%20%20%20%20%22Slovenia%22%2C%20%22Spain%22%2C%20%22Sweden%22%2C%0A%20%20%20%20%20%20%20%20%22Norway%22%2C%20%22Switzerland%22%20%20%23%20non-EU%20but%20often%20included%20in%20%E2%80%9CEuropean%20research%E2%80%9D%0A%20%20%20%20%5D%0A%0A%20%20%20%20%23%20Apply%20grouping%0A%20%20%20%20df%5B%22Country_grouped%22%5D%20%3D%20df%5B%22Country%22%5D.apply(lambda%20x%3A%20%22Europe%22%20if%20x%20in%20eu_countries%20else%20x)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(df)%3A%0A%20%20%20%20%23print(df.head())%0A%20%20%20%20%23%20Select%20the%20top%20N%20countries%20to%20avoid%20clutter%0A%20%20%20%20top_countries%20%3D%20(%0A%20%20%20%20%20%20%20%20df.groupby(%22Country_grouped%22)%5B%22Count%22%5D.sum()%0A%20%20%20%20%20%20%20%20%20%20.sort_values(ascending%3DFalse)%0A%20%20%20%20%20%20%20%20%20%20.head(8)%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20adjust%20as%20needed%0A%20%20%20%20%20%20%20%20%20%20.index%0A%20%20%20%20)%0A%0A%20%20%20%20df_top%20%3D%20df%5Bdf%5B%22Country_grouped%22%5D.isin(top_countries)%5D%0A%20%20%20%20return%20(df_top%2C)%0A%0A%0A%40app.cell%0Adef%20_(df_top)%3A%0A%20%20%20%20%23%20Aggregate%20by%20year%20and%20country%0A%20%20%20%20pivot%20%3D%20(%0A%20%20%20%20%20%20%20%20df_top.groupby(%5B%22Year%22%2C%20%22Country_grouped%22%5D)%5B%22Count%22%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20.sum()%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20.unstack(fill_value%3D0)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20.sort_index()%0A%20%20%20%20)%0A%20%20%20%20return%20(pivot%2C)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20First%2C%20we%20can%20plot%20the%20number%20of%20papers%20by%20country%20for%20each%20journal.%20Not%20all%20journals%20cover%20the%20same%20time%20span.%20What%20is%20clear%20is%20that%2C%20for%20journals%20with%20data%20from%20before%20COVID-19%2C%20publication%20volume%20rose%20sharply%20after%20the%20pandemic.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(df_top%2C%20plt)%3A%0A%20%20%20%20%23%20List%20of%20journals%20in%20the%20order%20you%20want%20to%20plot%0A%20%20%20%20journals%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%22Frontiers_of_Architectural_Research%22%2C%0A%20%20%20%20%20%20%20%20%22Building_and_Environment%22%2C%0A%20%20%20%20%20%20%20%20%22Urban_Forestry_Urban_Greening%22%2C%0A%20%20%20%20%20%20%20%20%22Energy_and_Buildings%22%2C%0A%20%20%20%20%20%20%20%20%22Urban_Climate%22%2C%0A%20%20%20%20%20%20%20%20%22Renewable_and_Sustainable_Energy_Reviews%22%2C%0A%20%20%20%20%20%20%20%20%22Sustainable_Cities_and_Society%22%2C%0A%20%20%20%20%20%20%20%20%22Applied_Energy%22%2C%0A%20%20%20%20%20%20%20%20%22Journal_of_Cleaner_Production%22%0A%20%20%20%20%5D%0A%0A%20%20%20%20%23%20Set%20up%203x3%20grid%0A%20%20%20%20fig%2C%20axes%20%3D%20plt.subplots(3%2C%203%2C%20figsize%3D(10%2C%2010))%0A%20%20%20%20axes%20%3D%20axes.flatten()%0A%20%20%20%20fig.suptitle(%0A%20%20%20%20%20%20%20%20%22Global%20contributions%20to%20architecture%20and%20built%20environment%20research%20over%20time%22%2C%0A%20%20%20%20%20%20%20%20fontsize%3D16%2C%0A%20%20%20%20%20%20%20%20y%3D1.01%20%20%23%20slightly%20below%20the%20top%20of%20the%20figure%0A%20%20%20%20)%0A%0A%20%20%20%20country_order%20%3D%20%5B%22Europe%22%2C%20%22United%20States%22%2C%20%22China%22%2C%20%22United%20Kingdom%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Australia%22%2C%20%22Canada%22%2C%20%22India%22%2C%20%22South%20Korea%22%5D%0A%0A%20%20%20%20%23%20Reserve%20space%20at%20the%20bottom%20for%20x-axis%20labels%2C%20legend%2C%20and%20attribution%0A%20%20%20%20fig.subplots_adjust(left%3D0.07%2C%20right%3D0.95%2C%20top%3D0.95%2C%20bottom%3D0.28%2C%20hspace%3D0.5%2C%20wspace%3D0.3)%0A%0A%20%20%20%20for%20ax%2C%20journal%20in%20zip(axes%2C%20journals)%3A%0A%20%20%20%20%20%20%20%20df_j%20%3D%20df_top%5Bdf_top%5B%22journal%22%5D%20%3D%3D%20journal%5D%0A%0A%20%20%20%20%20%20%20%20%23%20Pivot%20by%20year%20and%20country%0A%20%20%20%20%20%20%20%20df_plot%20%3D%20df_j.groupby(%5B%22Year%22%2C%20%22Country_grouped%22%5D)%5B%22Count%22%5D.sum().unstack(fill_value%3D0)%0A%0A%20%20%20%20%20%20%20%20%23%20Ensure%20all%20countries%20exist%0A%20%20%20%20%20%20%20%20for%20c%20in%20country_order%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20c%20not%20in%20df_plot.columns%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20df_plot%5Bc%5D%20%3D%200%0A%20%20%20%20%20%20%20%20df_plot%20%3D%20df_plot%5Bcountry_order%5D%0A%0A%20%20%20%20%20%20%20%20%23%20Ensure%20Year%20is%20numeric%20and%20sorted%0A%20%20%20%20%20%20%20%20df_plot.index%20%3D%20df_plot.index.astype(int)%0A%20%20%20%20%20%20%20%20df_plot%20%3D%20df_plot.sort_index()%0A%0A%20%20%20%20%20%20%20%20%23%20Stackplot%0A%20%20%20%20%20%20%20%20data%20%3D%20%5Bdf_plot%5Bc%5D.values%20for%20c%20in%20df_plot.columns%5D%0A%20%20%20%20%20%20%20%20ax.stackplot(df_plot.index%2C%20data%2C%20labels%3Ddf_plot.columns)%0A%0A%20%20%20%20%20%20%20%20%23%20Titles%20and%20labels%0A%20%20%20%20%20%20%20%20ax.set_title(journal.replace(%22_%22%2C%20%22%20%22)%2C%20fontsize%3D12)%0A%20%20%20%20%20%20%20%20ax.set_xlabel(%22Year%22)%0A%20%20%20%20%20%20%20%20ax.set_ylabel(%22Number%20of%20papers%22)%0A%0A%20%20%20%20%20%20%20%20%23%20Tight%20margins%20inside%20axes%0A%20%20%20%20%20%20%20%20ax.margins(x%3D0%2C%20y%3D0)%0A%0A%20%20%20%20%23%20Remove%20empty%20subplots%0A%20%20%20%20for%20ax%20in%20axes%5Blen(journals)%3A%5D%3A%0A%20%20%20%20%20%20%20%20ax.axis(%22off%22)%0A%0A%20%20%20%20%23%20Get%20handles%20and%20labels%20from%20the%20first%20axes%0A%20%20%20%20handles%2C%20labels%20%3D%20axes%5B0%5D.get_legend_handles_labels()%0A%0A%20%20%20%20%23%20Global%20legend%20above%20x-axis%20labels%0A%20%20%20%20fig.legend(handles%2C%20labels%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20loc%3D'lower%20center'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20bbox_to_anchor%3D(0.5%2C%200.18)%2C%20%20%23%20slightly%20higher%20than%20before%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ncol%3D4%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20fontsize%3D9%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20frameon%3DFalse)%0A%0A%20%20%20%20%23%20Attribution%20below%20legend%0A%20%20%20%20fig.text(%0A%20%20%20%20%20%20%20%200.5%2C%20%20%20%20%20%20%23%20horizontal%20center%0A%20%20%20%20%20%20%20%200.15%2C%20%20%20%20%20%23%20just%20above%20bottom%0A%20%20%20%20%20%20%20%20%22(Data%20from%20Scopus%C2%AE%2C%20used%20under%20licence%20and%20analysed%20by%20aleix.alva%40upc.edu)%22%2C%0A%20%20%20%20%20%20%20%20ha%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20va%3D%22bottom%22%2C%0A%20%20%20%20%20%20%20%20fontsize%3D10%2C%0A%20%20%20%20%20%20%20%20color%3D%22grey%22%0A%20%20%20%20)%0A%0A%20%20%20%20plt.gca()%0A%20%20%20%20return%20(country_order%2C)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20next%20plot%20aggregates%20all%20journals%20and%20shows%20the%20relative%20contribution%20by%20country.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(country_order%2C%20pivot%2C%20plt)%3A%0A%20%20%20%20pivot_prop%20%3D%20pivot.div(pivot.sum(axis%3D1)%2C%20axis%3D0)%20%20%23%20row-wise%20percentage%0A%20%20%20%20pivot_prop%5Bcountry_order%5D.plot.area(figsize%3D(6%2C4))%0A%20%20%20%20plt.ylabel(%22Proportion%20of%20papers%22)%0A%20%20%20%20plt.title(%22Architecture%20and%20built%20environment%3A%20relative%20contribution%20by%20country%20over%20time%22)%0A%20%20%20%20%23%20Attribution%0A%20%20%20%20plt.figtext(%0A%20%20%20%20%20%20%20%200.5%2C%0A%20%20%20%20%20%20%20%20-0.02%2C%0A%20%20%20%20%20%20%20%20%22(Data%20from%20Scopus%C2%AE%2C%20used%20under%20licence%20and%20analysed%20by%20aleix.alva%40upc.edu)%22%2C%0A%20%20%20%20%20%20%20%20ha%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20va%3D%22bottom%22%2C%0A%20%20%20%20%20%20%20%20fontsize%3D10%2C%0A%20%20%20%20%20%20%20%20color%3D%22grey%22%0A%20%20%20%20)%0A%20%20%20%20plt.margins(x%3D0%2C%20y%3D0)%0A%20%20%20%20plt.tight_layout(pad%3D1.0)%0A%20%20%20%20plt.legend(fontsize%3D8%2C%20loc%3D'lower%20left'%2C%20ncol%3D2)%20%20%23%20smaller%20text%2C%20multiple%20columns%0A%20%20%20%20plt.gca()%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20I%20cannot%20comment%20on%20these%20trends%20beyond%20what%20is%20obvious%20from%20the%20plots.%20The%20broader%20causes%20lie%20outside%20the%20scope%20of%20this%20analysis.%20One%20concern%2C%20though%2C%20is%20that%20given%20China%E2%80%99s%20rise%2C%20national%20qualification%20agencies%20should%20revise%20their%20criteria%20for%20evaluating%20researchers.%20Publishing%20in%20Q1%20journals%20has%20become%20markedly%20more%20difficult%2C%20so%20evaluation%20systems%20need%20adjustment.%20Not%20everyone%20can%20be%20in%20the%20first%20quartile%2C%20and%20if%20criteria%20are%20recalibrated%20accordingly%2C%20this%20is%20unproblematic.%0A%0A%20%20%20%20I%20also%20fail%20to%20see%20why%20publishers%20such%20as%20MDPI%20are%20routinely%20labelled%20predatory%20when%20these%20Elsevier%20journals%20have%20also%20expanded%20their%20volumes%20and%20charge%20substantial%20amounts%20of%20public%20money.%20I%20do%20not%20see%20a%20significant%20difference%20between%20the%20two%20giants.%0A%0A%0A%20%20%20%20This%20is%20a%20good%20moment%20to%20recall%20Goodhart%E2%80%99s%20law%3A%20'When%20a%20measure%20becomes%20a%20target%2C%20it%20ceases%20to%20be%20a%20good%20measure.'%20When%20impact%20becomes%20the%20target%2C%20researchers%20game%20the%20system%20by%20chasing%20fads%2C%20buzzwords%20and%20extreme%20specificity%2C%20often%20at%20the%20expense%20of%20socially%20important%20and%20urgent%20topics.%0A%0A%20%20%20%20Data%20from%20Scopus%C2%AE%20(Elsevier)%2C%20used%20under%20licence%20and%20analysed%20by%20the%20author.%0A%0A%20%20%20%20Dataset%20available%20%5Bhere%5D(data%2Fbuilt_environment_dataset_scopus.csv)%0A%20%20%20%20Marimo%20notebook%20available%20%5Bhere%5D(src%2Fbuilt_environment_bibliometrics.py)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
0ea9b262b589f35bf09116695352a3fd