You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blabla/WOS/wos_extract/wos_aggr_concat.ipynb

339 lines
303 KiB
Plaintext

2 years ago
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import seaborn as sns\n",
"import os\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 11,
"outputs": [],
"source": [
"agg_df = pd.DataFrame()\n",
"\n",
"workdir_path = 'aggregated_yearly_from_wos'\n",
"for root, dirs, files in os.walk(workdir_path):\n",
" for filename in files:\n",
" path=os.path.join(root, filename)\n",
" chunk = pd.read_csv(path, sep='\\t')[[\"Publication Years\",\"Record Count\"]]\n",
" chunk[\"name\"] = filename.replace(\".txt\",\"\")\n",
" agg_df = pd.concat([chunk,agg_df],ignore_index=True)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 12,
"outputs": [
{
"data": {
"text/plain": "array(['worldwide_kwds', 'eu_kwds', 'eu_all', 'eu+assoc_kwds',\n 'eu+assoc_all', 'ch_kwds', 'ch_all'], dtype=object)"
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agg_df[\"name\"].unique()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 13,
"outputs": [
{
"data": {
"text/plain": " Publication Years Record Count name region field\n0 2022 211014 worldwide_kwds worldwide kwds\n1 2021 197916 worldwide_kwds worldwide kwds\n2 2020 160472 worldwide_kwds worldwide kwds\n3 2019 142010 worldwide_kwds worldwide kwds\n4 2018 109746 worldwide_kwds worldwide kwds\n.. ... ... ... ... ...\n79 2015 393759 ch_all ch all\n80 2014 362784 ch_all ch all\n81 2013 329772 ch_all ch all\n82 2012 299804 ch_all ch all\n83 2011 263715 ch_all ch all\n\n[84 rows x 5 columns]",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Publication Years</th>\n <th>Record Count</th>\n <th>name</th>\n <th>region</th>\n <th>field</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>2022</td>\n <td>211014</td>\n <td>worldwide_kwds</td>\n <td>worldwide</td>\n <td>kwds</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2021</td>\n <td>197916</td>\n <td>worldwide_kwds</td>\n <td>worldwide</td>\n <td>kwds</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2020</td>\n <td>160472</td>\n <td>worldwide_kwds</td>\n <td>worldwide</td>\n <td>kwds</td>\n </tr>\n <tr>\n <th>3</th>\n <td>2019</td>\n <td>142010</td>\n <td>worldwide_kwds</td>\n <td>worldwide</td>\n <td>kwds</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2018</td>\n <td>109746</td>\n <td>worldwide_kwds</td>\n <td>worldwide</td>\n <td>kwds</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>79</th>\n <td>2015</td>\n <td>393759</td>\n <td>ch_all</td>\n <td>ch</td>\n <td>all</td>\n </tr>\n <tr>\n <th>80</th>\n <td>2014</td>\n <td>362784</td>\n <td>ch_all</td>\n <td>ch</td>\n <td>all</td>\n </tr>\n <tr>\n <th>81</th>\n <td>2013</td>\n <td>329772</td>\n <td>ch_all</td>\n <td>ch</td>\n <td>all</td>\n </tr>\n <tr>\n <th>82</th>\n <td>2012</td>\n <td>299804</td>\n <td>ch_all</td>\n <td>ch</td>\n <td>all</td>\n </tr>\n <tr>\n <th>83</th>\n <td>2011</td>\n <td>263715</td>\n <td>ch_all</td>\n <td>ch</td>\n <td>all</td>\n </tr>\n </tbody>\n</table>\n<p>84 rows × 5 columns</p>\n</div>"
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agg_df[\"region\"] = agg_df[\"name\"].apply(lambda x: x.split(\"_\")[0])\n",
"agg_df[\"field\"] = agg_df[\"name\"].apply(lambda x: x.split(\"_\")[-1])\n",
"agg_df"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 34,
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 1.0, 'Number of WOS indexed piublications')"
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAl4AAAHHCAYAAABuoFaQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACXiElEQVR4nOzdd1xT1//H8VfCXmHIRgREREFxb9wD/andtbW2VTus1k5ra5e1y1lr7fhaW/v92mlb7a57D3DUvbcoCCI4GCIzOb8/ItEIKlggjM/z8eChueck90NCyJt7zz1Ho5RSCCGEEEKICqe1dAFCCCGEELWFBC8hhBBCiEoiwUsIIYQQopJI8BJCCCGEqCQSvIQQQgghKokELyGEEEKISiLBSwghhBCikkjwEkIIIYSoJBK8hBBCCCEqiQQvIaqotWvXotFo+OWXXyxdSqmcPXuW++67jzp16qDRaJg5c6alSypX3bp1o1u3blX+McvTsGHDCA4OLrfHK/qZXrt27W3ftzTvh5Lq1mg0vP3222Xe779V3s+hqP4keIla7euvv0aj0WBvb09SUlKx9m7dutGkSRMLVFb9vPjiiyxbtozXXnuN7777jr59+xbro9fr0el03HnnncXaPvroIzQaDUOHDi3W9tZbb6HRaDhy5IjZ9ri4OO6++258fH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1tbqueeeM7V37dpVRUZGmm7Hx8crQM2dO7fYYwFqwoQJptsTJkxQgBoxYoRpW2Fhoapbt67SaDRqypQppu0XL15UDg4OaujQoaZta9asUYAKCAhQmZmZpu3z589XgPr444+VUkoZDAYVFhamYmJilMFgMPW7fPmyCgkJUb179y5W0+DBg0v1/LzwwgsKUBs2bDBty8rKUiEhISo4OFjp9Xqz73/06NGletw2bdqo0NBQ0+2nnnpKde/eXSml1CuvvKLatGljarvvvvuUo6OjKigoUEoptWvXLgWo559//qb7iIqKUh4eHqbb//3vfxWgbG1tVffu3dX48ePVhg0bzL6Hm+natavq2rWr6XbR69O4cWOVl5dn2v7xxx8rQO3du1cppVR+fr7y9vZWzZs3N+v35ZdfKsDsMb/77jul1WrNnm+llJo9e7YCVFxcnGnbsmXLFKDef/99deLECeXs7KzuuusuU3tWVpZyc3NTTz75pNljpaSkKFdXV7PtzZs3V35+fio9Pd20bfny5QpQQUFBt3xugoKCFKB+/fVX07aMjAzl5+enWrRoUew5W7Nmjdl9r/25L3Kj5/tW7wellBo6dGixuq9/fz766KNKq9WqrVu3Ftt30fsoNze32M9HfHy8srOzU++++65p29atW2/4e+H6Wv744w/T63at++67T2k0GnXs2DGzmm1tbc227d69WwHq008/NW1zdXUt9XtPWJ4c8RLiivr16/PII4/w5ZdfcubMmXJ73CeeeML0fysrK1q3bo1Siscff9y03c3NjfDwcE6cOFHs/o8++iguLi6m2/fddx9+fn4sXrwYMJ6KO3r0KA899BDnz5/n3LlznDt3juzsbHr27Mn69euLDe4dOXJkqWpfvHgxbdu2NTvN5+zszIgRIzh58iQHDhwo3ZNwnejoaI4fP05KSgpgPKpVNBC+U6dO7Ny503TUIS4ujnbt2pkGRmdlZQGYPSclcXFxITMz03T7scceY+nSpXTr1o3Y2Fjee+89OnfuTFhYWImD/Utr+PDhZqcvO3fuDGB6Lbdt20ZqaiojR4406zds2DBcXV3NHmvBggU0btyYRo0amV7Hc+fO0aNHDwDWrFlj6tunTx+eeuop3n33Xe655x7s7e3NTq2uWLGC9PR0Bg8ebPZYVlZWtGvXzvR
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.lineplot(agg_df[agg_df[\"field\"]==\"all\"],x=\"Publication Years\" ,y=\"Record Count\", hue=\"region\")\n",
"g.ticklabel_format(style='plain', axis='y',useOffset=False)\n",
"g.set_title(\"Number of WOS indexed piublications\")"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 33,
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 1.0, 'AI-related publications')"
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlUAAAHHCAYAAACWQK1nAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACji0lEQVR4nOzdeVhU1RvA8e+wzLDvu6IgKgqKu0TuSWKpZZtLVm5lllpqmVpp2qZZlvmrtFVbtMwWMzULcUsld1xQURR3FkVg2GFm7u+PydEJF1BwAN/P88wjc8+5574zIPNyzrnnqBRFURBCCCGEEDfFytIBCCGEEELUBpJUCSGEEEJUAkmqhBBCCCEqgSRVQgghhBCVQJIqIYQQQohKIEmVEEIIIUQlkKRKCCGEEKISSFIlhBBCCFEJJKkSQgghhKgEklQJISxi2rRpqFQqS4dh5vjx46hUKhYuXHjLr71w4UJUKhU7duy4bt2uXbvStWtX03NLxv3fWIS4nUlSJcRt4pNPPkGlUhEZGXnVOiqVitGjR9/CqG7MJ598YpEE4nZ14MABpk2bxvHjxy0dihDVmo2lAxBC3BqLFi0iKCiIbdu2kZycTMOGDS0d0g375JNP8PLyYsiQIZYOpVqoX78+hYWF2NraVkn7Bw4cYPr06XTt2pWgoCCzsr/++qtKrilETSQ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Mnn3ySkSNH8tBDD3H33XezZ88e/vzzT7y8vG64zfKYO3cuHTt2pHXr1owYMYL
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.lineplot(agg_df[agg_df[\"field\"]==\"kwds\"],x=\"Publication Years\" ,y=\"Record Count\", hue=\"region\")\n",
"g.set_title(\"AI-related publications\")"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 36,
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 1.0, 'AI-related publications\\n(without worldwide trend)')"
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAHcCAYAAADLKJ4jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACssklEQVR4nOzdd3xTVR/H8U860j0YXYxSNpRNgVKmSqVqERGUoewlCMiSpUwVGYoiIiCoVAVEcAGyZM+yyl5lFYpA2W0pLR3Jef7I00hogRbSpi2/9+uV19Pce3LOL2kf8vXec8/VKKUUQgghhBDikawsXYAQQgghRH4goUkIIYQQIgskNAkhhBBCZIGEJiGEEEKILJDQJIQQQgiRBRKahBBCCCGyQEKTEEIIIUQWSGgSQgghhMgCCU1CCCGEEFkgoUkIYXbjx49Ho9FYugwT58+fR6PREBYWlutjh4WFodFo2Ldv32PbPvfcczz33HPG55as+8FahHjWSWgSogCYNWsWGo2GwMDAh7bRaDT0798/F6t6MrNmzbJIQHhWHT9+nPHjx3P+/HlLlyJEnmdj6QKEEE9v4cKF+Pn5sWfPHs6cOUO5cuUsXdITmzVrFkWLFqVr166WLiVPKFWqFElJSdja2uZI/8ePH2fChAk899xz+Pn5mez7559/cmRMIfIrOdIkRD4XFRXFzp07+eKL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bNolGjRiafec+ePenTpw9t2rThxRdf5NChQ6xdu5aiRYs+cZ9ZMWPGDBo1akTt2rXp3bs3pUuX5vz586xcuZK
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.lineplot(agg_df[((agg_df[\"field\"]==\"kwds\")&(agg_df[\"region\"]!=\"worldwide\"))],x=\"Publication Years\" ,y=\"Record Count\", hue=\"region\")\n",
"g.set_title(\"AI-related publications\\n(without worldwide trend)\")"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 55,
"outputs": [],
"source": [
"agg_df_p = agg_df[agg_df[\"field\"]==\"kwds\"].merge(\n",
" agg_df[agg_df[\"field\"]==\"all\"].rename(columns={\"Record Count\":\"All\"}),\n",
" on=[\"Publication Years\",\"region\"]).merge(\n",
" agg_df[agg_df[\"region\"]==\"worldwide\"][[\"Publication Years\",\"Record Count\"]].rename(columns={\"Record Count\":\"Worldwide\"}),\n",
" on=\"Publication Years\")\n",
"agg_df_p[\"percent\"] = agg_df_p[\"Record Count\"]/agg_df_p[\"All\"]\n",
"agg_df_p[\"share\"] = agg_df_p[\"Record Count\"]/agg_df_p[\"Worldwide\"]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 56,
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 1.0, 'Focus on AI-related publications\\n(percent of publications of the yearly output)')"
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAAHcCAYAAAA+1hWTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACYGklEQVR4nOzdd1gUVxfA4d8uvaMUUUQBRcWKs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5UoUYKIiAjt40GDBvH777/Tvn17nJ2dadu2LV27dqVdu3Y5ik0ULZIACZEPntUS9PTATJVKxYYNGzh8+DB///0327dv54MPPmDWrFkcPnwYS0vLPInHwMAgy/InE4RnyRjr06RJkyyX37x5E3d39yyXzZw5kylTpmgfly9fXmccTVYzvjQaDW3atOGzzz7LcpsZH+ZZGTp0KMuWLWPEiBE0atQIGxsbVCoV3bt3z9YU74w6K1euzDJRMDR89f8ys/ta0ocbN27QunVrqlSpwuzZs3FxccHY2JitW7cyZ86cfJ1Wn+FZr+0nOTo6cvr0abZv384///zDP//8w7Jly+jduze//vprvscoCiZJgIQg/YMZ0gflPu3y5cvY29tjYWGBmZkZ1tbWnD9//rnbK1GiBJA+mymjmwvI1DKToWHDhjRs2JBvvvmGNWvW0LNnT9auXcuAAQNeGO+TyUdycjK3bt3Cx8fnufFl161btzh06BBDhgzB29tbZ5lGo6FXr16sWbOGCRMmZLl+7969adq0qfZ
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.lineplot(agg_df_p,x=\"Publication Years\" ,y=\"percent\", hue=\"region\")\n",
"g.set_title(\"Focus on AI-related publications\\n(percent of publications of the yearly output)\")"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 61,
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 1.0, 'Share of publications of the worldwide AI-related output')"
},
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkgAAAHHCAYAAABEEKc/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACpE0lEQVR4nOzdeXwM9x/H8ddu7jsip0gkIY64JYS6K66ipRSt1lGlFy1pq9VDqS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sbKwCKDY2NsrFixcNy/fs2aMAyvDhww3LWrZsqbRs2TLPPvr166dUqlTpkfb56aefKnf/qlSqVEnp16+f4f6oUaMUQFm+fHmeY+t0OkVRFCU7O1vJyMgwWnfr1i3Fw8NDefnllw3Lrl27pgDKp59+mmdfd9dy8OBBBVBeeeUVo+3effddBVA2b95sVDOgbN++3bDs6tWripWVlfLOO+8YltWtW1fp1KlTnmM/iCne+/u9Fv369VMA5bPPPjNaXr9+fSU4ONhwf8eOHQqgLFiwwGi79evX57v8bjVr1lR69uxpuN+gQQPlueeeUwDl+PHjiqIoyvLlyxVAOXTokKIoj/a+rF+/Ps+x7/45y32N9+zZY1h29epVxcnJSQGU2NhYwzJA+f777xVFUZSEhARFq9Uqzz33nOLh4WF47FtvvaW4uLgYfkZzfy9++eUXwzb16tVTvLy8lISEBMOyP/74QwGMfqce93VWFEVZunSpAiinT59WFEVRkpKSFGtra+Wbb74x2i63zi+//PKB+8z
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.lineplot(agg_df_p,x=\"Publication Years\" ,y=\"share\", hue=\"region\")\n",
"g.set_title(\"Share of publications of the worldwide AI-related output\")"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 54,
"outputs": [
{
"data": {
"text/plain": " Publication Years Record Count name_x region field_x All \n0 2021 43927 eu_kwds eu kwds 914776 \\\n1 2021 55254 eu+assoc_kwds eu+assoc kwds 1136750 \n2 2021 63992 ch_kwds ch kwds 748798 \n3 2022 43361 eu_kwds eu kwds 800220 \n4 2022 54467 eu+assoc_kwds eu+assoc kwds 986893 \n5 2022 79078 ch_kwds ch kwds 801793 \n6 2020 34956 eu_kwds eu kwds 886298 \n7 2020 43969 eu+assoc_kwds eu+assoc kwds 1104653 \n8 2020 49861 ch_kwds ch kwds 668057 \n9 2019 31006 eu_kwds eu kwds 890256 \n10 2019 38935 eu+assoc_kwds eu+assoc kwds 1116403 \n11 2019 42111 ch_kwds ch kwds 630002 \n12 2018 23854 eu_kwds eu kwds 833011 \n13 2018 29913 eu+assoc_kwds eu+assoc kwds 1043953 \n14 2018 30454 ch_kwds ch kwds 534539 \n15 2017 18429 eu_kwds eu kwds 752558 \n16 2017 22878 eu+assoc_kwds eu+assoc kwds 945964 \n17 2017 21664 ch_kwds ch kwds 474295 \n18 2016 16178 eu_kwds eu kwds 741454 \n19 2016 19724 eu+assoc_kwds eu+assoc kwds 928272 \n20 2016 17436 ch_kwds ch kwds 439134 \n21 2015 14628 eu_kwds eu kwds 717129 \n22 2015 17655 eu+assoc_kwds eu+assoc kwds 901491 \n23 2015 14191 ch_kwds ch kwds 393759 \n24 2014 12615 eu_kwds eu kwds 695713 \n25 2014 15308 eu+assoc_kwds eu+assoc kwds 871908 \n26 2014 12000 ch_kwds ch kwds 362784 \n27 2013 10979 eu_kwds eu kwds 659641 \n28 2013 13136 eu+assoc_kwds eu+assoc kwds 834592 \n29 2013 9424 ch_kwds ch kwds 329772 \n30 2012 9626 eu_kwds eu kwds 631054 \n31 2012 11557 eu+assoc_kwds eu+assoc kwds 798881 \n32 2012 8547 ch_kwds ch kwds 299804 \n33 2011 9293 eu_kwds eu kwds 610960 \n34 2011 11044 eu+assoc_kwds eu+assoc kwds 773469 \n35 2011 7382 ch_kwds ch kwds 263715 \n\n name_y field_y Worldwide percent share \n0 eu_all all 197916 0.048019 0.221948 \n1 eu+assoc_all all 197916 0.048607 0.279179 \n2 ch_all all 197916 0.085460 0.323329 \n3 eu_all all 211014 0.054186 0.205489 \n4 eu+assoc_all all 211014 0.055190 0.258120 \n5 ch_all all 211014 0.098626 0.374752 \n6 eu_all all 160472 0.039440 0.217832 \n7 eu+assoc_all all 160472 0.039803 0.273998 \n8 ch_all all 160472 0.074636 0.310715 \n9 eu_all all 142010 0.034828 0.218337 \n10 eu+assoc_all all 142010 0.034875 0.274171 \n11 ch_all all 142010 0.066843 0.296535 \n12 eu_all all 109746 0.028636 0.217356 \n13 eu+assoc_all all 109746 0.028654 0.272566 \n14 ch_all all 109746 0.056972 0.277495 \n15 eu_all all 81974 0.024488 0.224815 \n16 eu+assoc_all all 8197
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Publication Years</th>\n <th>Record Count</th>\n <th>name_x</th>\n <th>region</th>\n <th>field_x</th>\n <th>All</th>\n <th>name_y</th>\n <th>field_y</th>\n <th>Worldwide</th>\n <th>percent</th>\n <th>share</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>2021</td>\n <td>43927</td>\n <td>eu_kwds</td>\n <td>eu</td>\n <td>kwds</td>\n <td>914776</td>\n <td>eu_all</td>\n <td>all</td>\n <td>197916</td>\n <td>0.048019</td>\n <td>0.221948</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2021</td>\n <td>55254</td>\n <td>eu+assoc_kwds</td>\n <td>eu+assoc</td>\n <td>kwds</td>\n <td>1136750</td>\n <td>eu+assoc_all</td>\n <td>all</td>\n <td>197916</td>\n <td>0.048607</td>\n <td>0.279179</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2021</td>\n <td>63992</td>\n <td>ch_kwds</td>\n <td>ch</td>\n <td>kwds</td>\n <td>748798</td>\n <td>ch_all</td>\n <td>all</td>\n <td>197916</td>\n <td>0.085460</td>\n <td>0.323329</td>\n </tr>\n <tr>\n <th>3</th>\n <td>2022</td>\n <td>43361</td>\n <td>eu_kwds</td>\n <td>eu</td>\n <td>kwds</td>\n <td>800220</td>\n <td>eu_all</td>\n <td>all</td>\n <td>211014</td>\n <td>0.054186</td>\n <td>0.205489</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2022</td>\n <td>54467</td>\n <td>eu+assoc_kwds</td>\n <td>eu+assoc</td>\n <td>kwds</td>\n <td>986893</td>\n <td>eu+assoc_all</td>\n <td>all</td>\n <td>211014</td>\n <td>0.055190</td>\n <td>0.258120</td>\n </tr>\n <tr>\n <th>5</th>\n <td>2022</td>\n <td>79078</td>\n <td>ch_kwds</td>\n <td>ch</td>\n <td>kwds</td>\n <td>801793</td>\n <td>ch_all</td>\n <td>all</td>\n <td>211014</td>\n <td>0.098626</td>\n <td>0.374752</td>\n </tr>\n <tr>\n <th>6</th>\n <td>2020</td>\n <td>34956</td>\n <td>eu_kwds</td>\n <td>eu</td>\n <td>kwds</td>\n <td>886298</td>\n <td>eu_all</td>\n <td>all</td>\n <td>160472</td>\n <td>0.039440</td>\n <td>0.217832</td>\n </tr>\n <tr>\n <th>7</th>\n <td>2020</td>\n <td>43969</td>\n <td>eu+assoc_kwds</td>\n <td>eu+assoc</td>\n <td>kwds</td>\n <td>1104653</td>\n <td>eu+assoc_all</td>\n <td>all</td>\n <td>160472</td>\n <td>0.039803</td>\n <td>0.273998</td>\n </tr>\n <tr>\n <th>8</th>\n <td>2020</td>\n <td>49861</td>\n <td>ch_kwds</td>\n <td>ch</td>\n <td>kwds</td>\n <td>668057</td>\n <td>ch_all</td>\n <td>all</td>\n <td>160472</td>\n <td>0.074636</td>\n <td>0.310715</td>\n </tr>\n <tr>\n <th>9</th>\n <td>2019</td>\n <td>31006</td>\n <td>eu_kwds</td>\n <td>eu</td>\n <td>kwds</td>\n <td>890256</td>\n <td>eu_all</td>\n <td>all</td>\n <td>142010</td>\n <td>0.034828</td>\n <td>0.218337</td>\n </tr>\n <tr>\n <th>10</th>\n <td>2019</td>\n <td>38935</td>\n <td>eu+assoc_kwds</td>\n <td>eu+assoc</td>\n <td>kwds</td>\n <td>1116403</td>\n <td>eu+assoc_all</td>\n <td>all</td>\n <td>142010</td>\n <td>0.034875</td>\n <td>0.274171</td>\n </tr>\n <tr>\n <th>11</th>\n <td>2019</td>\n <td>42111</td>\n <td>ch_kwds</td>\n <td>ch</td>\n <td>kwds</td>\n <td>630002</td>\n <td>ch_all</td>\n <td>all</td>
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agg_df_p"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 60,
"outputs": [
{
"data": {
"text/plain": " Record Count Worldwide share\n0 43927 197916 0.221948\n1 55254 197916 0.279179\n2 63992 197916 0.323329\n3 43361 211014 0.205489\n4 54467 211014 0.258120\n5 79078 211014 0.374752\n6 34956 160472 0.217832\n7 43969 160472 0.273998\n8 49861 160472 0.310715\n9 31006 142010 0.218337\n10 38935 142010 0.274171\n11 42111 142010 0.296535\n12 23854 109746 0.217356\n13 29913 109746 0.272566\n14 30454 109746 0.277495\n15 18429 81974 0.224815\n16 22878 81974 0.279088\n17 21664 81974 0.264279\n18 16178 68538 0.236044\n19 19724 68538 0.287782\n20 17436 68538 0.254399\n21 14628 59591 0.245473\n22 17655 59591 0.296270\n23 14191 59591 0.238140\n24 12615 51174 0.246512\n25 15308 51174 0.299136\n26 12000 51174 0.234494\n27 10979 42229 0.259987\n28 13136 42229 0.311066\n29 9424 42229 0.223164\n30 9626 37054 0.259783\n31 11557 37054 0.311896\n32 8547 37054 0.230663\n33 9293 33189 0.280002\n34 11044 33189 0.332761\n35 7382 33189 0.222423",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Record Count</th>\n <th>Worldwide</th>\n <th>share</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>43927</td>\n <td>197916</td>\n <td>0.221948</td>\n </tr>\n <tr>\n <th>1</th>\n <td>55254</td>\n <td>197916</td>\n <td>0.279179</td>\n </tr>\n <tr>\n <th>2</th>\n <td>63992</td>\n <td>197916</td>\n <td>0.323329</td>\n </tr>\n <tr>\n <th>3</th>\n <td>43361</td>\n <td>211014</td>\n <td>0.205489</td>\n </tr>\n <tr>\n <th>4</th>\n <td>54467</td>\n <td>211014</td>\n <td>0.258120</td>\n </tr>\n <tr>\n <th>5</th>\n <td>79078</td>\n <td>211014</td>\n <td>0.374752</td>\n </tr>\n <tr>\n <th>6</th>\n <td>34956</td>\n <td>160472</td>\n <td>0.217832</td>\n </tr>\n <tr>\n <th>7</th>\n <td>43969</td>\n <td>160472</td>\n <td>0.273998</td>\n </tr>\n <tr>\n <th>8</th>\n <td>49861</td>\n <td>160472</td>\n <td>0.310715</td>\n </tr>\n <tr>\n <th>9</th>\n <td>31006</td>\n <td>142010</td>\n <td>0.218337</td>\n </tr>\n <tr>\n <th>10</th>\n <td>38935</td>\n <td>142010</td>\n <td>0.274171</td>\n </tr>\n <tr>\n <th>11</th>\n <td>42111</td>\n <td>142010</td>\n <td>0.296535</td>\n </tr>\n <tr>\n <th>12</th>\n <td>23854</td>\n <td>109746</td>\n <td>0.217356</td>\n </tr>\n <tr>\n <th>13</th>\n <td>29913</td>\n <td>109746</td>\n <td>0.272566</td>\n </tr>\n <tr>\n <th>14</th>\n <td>30454</td>\n <td>109746</td>\n <td>0.277495</td>\n </tr>\n <tr>\n <th>15</th>\n <td>18429</td>\n <td>81974</td>\n <td>0.224815</td>\n </tr>\n <tr>\n <th>16</th>\n <td>22878</td>\n <td>81974</td>\n <td>0.279088</td>\n </tr>\n <tr>\n <th>17</th>\n <td>21664</td>\n <td>81974</td>\n <td>0.264279</td>\n </tr>\n <tr>\n <th>18</th>\n <td>16178</td>\n <td>68538</td>\n <td>0.236044</td>\n </tr>\n <tr>\n <th>19</th>\n <td>19724</td>\n <td>68538</td>\n <td>0.287782</td>\n </tr>\n <tr>\n <th>20</th>\n <td>17436</td>\n <td>68538</td>\n <td>0.254399</td>\n </tr>\n <tr>\n <th>21</th>\n <td>14628</td>\n <td>59591</td>\n <td>0.245473</td>\n </tr>\n <tr>\n <th>22</th>\n <td>17655</td>\n <td>59591</td>\n <td>0.296270</td>\n </tr>\n <tr>\n <th>23</th>\n <td>14191</td>\n <td>59591</td>\n <td>0.238140</td>\n </tr>\n <tr>\n <th>24</th>\n <td>12615</td>\n <td>51174</td>\n <td>0.246512</td>\n </tr>\n <tr>\n <th>25</th>\n <td>15308</td>\n <td>51174</td>\n <td>0.299136</td>\n </tr>\n <tr>\n <th>26</th>\n <td>12000</td>\n <td>51174</td>\n <td>0.234494</td>\n </tr>\n <tr>\n <th>27</th>\n <td>10979</td>\n <td>42229</td>\n <td>0.259987</td>\n </tr>\n <tr>\n <th>28</th>\n <td>13136</td>\n <td>42229</td>\n <td>0.311066</td>\n </tr>\n <tr>\n <th>29</th>\n <td>9424</td>\n <td>42229</td>\n <td>0.223164</td>\n </tr>\n <tr>\n <th>30</th>\n <td>9626</td>\n <td>37054</td>\n <td>0.259783</td>\n </tr>\n <tr>\n <th>31</th>\n <td>11557</td>\n <td>37054</td>\n <td>0.311896</td>\n </tr>\n <tr>\n <th>32</th>\n <td>8547</td>\n <td>37054</td>\n <td>0.230663</td>\n </tr>\n <tr
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agg_df_p[[\"Record Count\",\"Worldwide\",\"share\"]]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}