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/PATSTAT/patstat_analysis_demo.ipynb

1268 lines
2.0 MiB
Plaintext

2 years ago
{
"cells": [
{
"cell_type": "code",
2 years ago
"execution_count": 161,
2 years ago
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import os\n",
"import pandas as pd\n",
"import janitor\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"from matplotlib.ticker import MaxNLocator\n",
"import math\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
2 years ago
"execution_count": 162,
2 years ago
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"C:\\Users\\radvanyi\\PycharmProjects\\ZSI_analytics\\PATSTAT\n"
]
}
],
"source": [
"print(os.getcwd())"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 163,
2 years ago
"outputs": [],
"source": [
2 years ago
"outdir=\"EU_CH_scope/v2_\"\n",
2 years ago
"\n",
"appln = pd.read_csv(f\"{outdir}/tls_201_scope.csv\")\n",
"\n",
"appln_title = pd.read_csv(f\"{outdir}/tls_202_scope.csv\")\n",
"\n",
"pers = pd.read_csv(f\"{outdir}/tls_206_scope.csv\")\n",
"\n",
"appln_pers = pd.read_csv(f\"{outdir}/tls_207_scope.csv\")\n",
"\n",
"appln_cpc = pd.read_csv(f\"{outdir}/tls_224_scope.csv\")\n",
"\n",
2 years ago
"cpc_desc = pd.read_csv(r\"CPC_data/cpc_defs.csv\")\n",
2 years ago
"\n",
"country_defs = pd.read_csv(f\"{outdir}/table_tls801.csv\").rename(columns={\"st3_name\":\"Country\"})"
],
"metadata": {
"collapsed": false
}
},
2 years ago
{
"cell_type": "code",
2 years ago
"execution_count": 164,
2 years ago
"outputs": [],
"source": [
"ch_codes = [\"CN\",\"HK\",\"MO\",\"TW\"]\n",
"ch_names = country_defs[country_defs[\"ctry_code\"].isin(ch_codes)][\"Country\"].unique()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
2 years ago
{
"cell_type": "code",
2 years ago
"execution_count": 165,
2 years ago
"outputs": [
{
"data": {
"text/plain": " ctry_code iso_alpha3 Country organisation_flag \n0 unknown Y \\\n1 AD AND Andorra \n2 AE ARE United Arab Emirates \n3 AF AFG Afghanistan \n4 AG ATG Antigua and Barbuda \n.. ... ... ... ... \n237 YE YEM Yemen \n238 YU YUG Yugoslavia/Serbia and Montenegro \n239 ZA ZAF South Africa \n240 ZM ZMB Zambia \n241 ZW ZWE Zimbabwe \n\n continent eu_member epo_member oecd_member discontinued \n0 NaN \n1 Europe \n2 Asia \n3 Asia \n4 North America \n.. ... ... ... ... ... \n237 Asia \n238 Europe Y \n239 Africa \n240 Africa \n241 Africa \n\n[242 rows x 9 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>ctry_code</th>\n <th>iso_alpha3</th>\n <th>Country</th>\n <th>organisation_flag</th>\n <th>continent</th>\n <th>eu_member</th>\n <th>epo_member</th>\n <th>oecd_member</th>\n <th>discontinued</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td></td>\n <td></td>\n <td>unknown</td>\n <td>Y</td>\n <td>NaN</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>1</th>\n <td>AD</td>\n <td>AND</td>\n <td>Andorra</td>\n <td></td>\n <td>Europe</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>2</th>\n <td>AE</td>\n <td>ARE</td>\n <td>United Arab Emirates</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>3</th>\n <td>AF</td>\n <td>AFG</td>\n <td>Afghanistan</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>4</th>\n <td>AG</td>\n <td>ATG</td>\n <td>Antigua and Barbuda</td>\n <td></td>\n <td>North America</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>237</th>\n <td>YE</td>\n <td>YEM</td>\n <td>Yemen</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>238</th>\n <td>YU</td>\n <td>YUG</td>\n <td>Yugoslavia/Serbia and Montenegro</td>\n <td></td>\n <td>Europe</td>\n <td></td>\n <td></td>\n <td></td>\n <td>Y</td>\n </tr>\n <tr>\n <th>239</th>\n <td>ZA</td>\n <td>ZAF</td>\n <td>South Africa</td>\n <td></td>\n <td>Africa</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>240</th>\n <td>ZM</td>\n <td>ZMB</td>\n <td>Zambia</td>\n <td></td>\n <td>Africa</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr>\n <th>241</th>\n <td>ZW</td>\n <td>ZWE</td>\n <td>Zimbabwe</td>\n <td></td>\n <td>Africa</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n </tbody>\n</table>\n<p>242 rows × 9 columns</p>\n</div>"
},
2 years ago
"execution_count": 165,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"country_defs"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 166,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_id appln_auth appln_nr appln_kind appln_filing_date \n0 330225325 EP 11150195 A 2011-01-05 \\\n1 330322632 EP 11150485 A 2011-01-10 \n2 330350961 EP 11150683 A 2011-01-12 \n3 330374780 WO 2011050339 W 2011-01-12 \n4 330424360 WO 2011050199 W 2011-01-10 \n\n appln_filing_year appln_nr_original ipr_type receiving_office \n0 2011 11150195 PI \\\n1 2011 11150485 PI \n2 2011 11150683 PI \n3 2011 EP2011/050339 PI EP \n4 2011 EP2011/050199 PI EP \n\n internat_appln_id ... earliest_publn_date earliest_publn_year \n0 0 ... 2011-07-13 2011 \\\n1 0 ... 2012-07-11 2012 \n2 0 ... 2012-07-18 2012 \n3 0 ... 2011-07-21 2011 \n4 0 ... 2012-07-19 2012 \n\n earliest_pat_publn_id granted docdb_family_id inpadoc_family_id \n0 335277427 Y 43754737 330225325 \\\n1 364719889 Y 43991052 330322632 \n2 364923578 N 43881056 330350961 \n3 335927718 N 43923624 330374780 \n4 365345607 N 43533009 330424360 \n\n docdb_family_size nb_citing_docdb_fam nb_applicants nb_inventors \n0 4 16 1 1 \n1 2 5 1 2 \n2 7 12 2 5 \n3 2 8 5 4 \n4 4 13 3 2 \n\n[5 rows x 26 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>appln_id</th>\n <th>appln_auth</th>\n <th>appln_nr</th>\n <th>appln_kind</th>\n <th>appln_filing_date</th>\n <th>appln_filing_year</th>\n <th>appln_nr_original</th>\n <th>ipr_type</th>\n <th>receiving_office</th>\n <th>internat_appln_id</th>\n <th>...</th>\n <th>earliest_publn_date</th>\n <th>earliest_publn_year</th>\n <th>earliest_pat_publn_id</th>\n <th>granted</th>\n <th>docdb_family_id</th>\n <th>inpadoc_family_id</th>\n <th>docdb_family_size</th>\n <th>nb_citing_docdb_fam</th>\n <th>nb_applicants</th>\n <th>nb_inventors</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>330225325</td>\n <td>EP</td>\n <td>11150195</td>\n <td>A</td>\n <td>2011-01-05</td>\n <td>2011</td>\n <td>11150195</td>\n <td>PI</td>\n <td></td>\n <td>0</td>\n <td>...</td>\n <td>2011-07-13</td>\n <td>2011</td>\n <td>335277427</td>\n <td>Y</td>\n <td>43754737</td>\n <td>330225325</td>\n <td>4</td>\n <td>16</td>\n <td>1</td>\n <td>1</td>\n </tr>\n <tr>\n <th>1</th>\n <td>330322632</td>\n <td>EP</td>\n <td>11150485</td>\n <td>A</td>\n <td>2011-01-10</td>\n <td>2011</td>\n <td>11150485</td>\n <td>PI</td>\n <td></td>\n <td>0</td>\n <td>...</td>\n <td>2012-07-11</td>\n <td>2012</td>\n <td>364719889</td>\n <td>Y</td>\n <td>43991052</td>\n <td>330322632</td>\n <td>2</td>\n <td>5</td>\n <td>1</td>\n <td>2</td>\n </tr>\n <tr>\n <th>2</th>\n <td>330350961</td>\n <td>EP</td>\n <td>11150683</td>\n <td>A</td>\n <td>2011-01-12</td>\n <td>2011</td>\n <td>11150683</td>\n <td>PI</td>\n <td></td>\n <td>0</td>\n <td>...</td>\n <td>2012-07-18</td>\n <td>2012</td>\n <td>364923578</td>\n <td>N</td>\n <td>43881056</td>\n <td>330350961</td>\n <td>7</td>\n <td>12</td>\n <td>2</td>\n <td>5</td>\n </tr>\n <tr>\n <th>3</th>\n <td>330374780</td>\n <td>WO</td>\n <td>2011050339</td>\n <td>W</td>\n <td>2011-01-12</td>\n <td>2011</td>\n <td>EP2011/050339</td>\n <td>PI</td>\n <td>EP</td>\n <td>0</td>\n <td>...</td>\n <td>2011-07-21</td>\n <td>2011</td>\n <td>335927718</td>\n <td>N</td>\n <td>43923624</td>\n <td>330374780</td>\n <td>2</td>\n <td>8</td>\n <td>5</td>\n <td>4</td>\n </tr>\n <tr>\n <th>4</th>\n <td>330424360</td>\n <td>WO</td>\n <td>2011050199</td>\n <td>W</td>\n <td>2011-01-10</td>\n <td>2011</td>\n <td>EP2011/050199</td>\n <td>PI</td>\n <td>EP</td>\n <td>0</td>\n <td>...</td>\n <td>2012-07-19</td>\n <td>2012</td>\n <td>365345607</td>\n <td>N</td>\n <td>43533009</td>\n <td>330424360</td>\n <td>4</td>\n <td>13</td>\n <td>3</td>\n <td>2</td>\n </tr>\n </tbody>\n</table>\n<p>5 rows × 26 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 166,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"appln.head()"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 166,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 167,
2 years ago
"outputs": [
{
"data": {
"text/plain": "appln_id 64266\nappln_nr 63242\nappln_nr_original 62651\ndtype: int64"
},
2 years ago
"execution_count": 167,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"appln[[\"appln_id\",\"appln_nr\",\"appln_nr_original\"]].nunique()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 168,
"outputs": [],
"source": [
" # only first submissions\n",
"appln = appln[appln[\"appln_nr\"]==appln[\"appln_nr_original\"]]\n",
"appln_pers = appln_pers[appln_pers[\"appln_id\"].isin(appln[\"appln_id\"])]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 169,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " person_id appln_id applt_seq_nr invt_seq_nr Country Country_Type\n0 1 340314532 1 0 Finland EU\n1 1 413601768 1 0 Finland EU\n2 128 332888018 1 0 Finland EU\n3 128 333546132 1 0 Finland EU\n4 128 334765473 1 0 Finland EU\n... ... ... ... ... ... ...\n106442 65263479 504779814 2 0 Latvia EU\n106443 65263479 544264361 2 0 Latvia EU\n106444 69866789 481190056 2 0 Latvia EU\n106445 80730412 554759601 2 0 Latvia EU\n106446 84881241 569497458 0 1 Latvia EU\n\n[106447 rows x 6 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>person_id</th>\n <th>appln_id</th>\n <th>applt_seq_nr</th>\n <th>invt_seq_nr</th>\n <th>Country</th>\n <th>Country_Type</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n <td>340314532</td>\n <td>1</td>\n <td>0</td>\n <td>Finland</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1</td>\n <td>413601768</td>\n <td>1</td>\n <td>0</td>\n <td>Finland</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>2</th>\n <td>128</td>\n <td>332888018</td>\n <td>1</td>\n <td>0</td>\n <td>Finland</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>3</th>\n <td>128</td>\n <td>333546132</td>\n <td>1</td>\n <td>0</td>\n <td>Finland</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>4</th>\n <td>128</td>\n <td>334765473</td>\n <td>1</td>\n <td>0</td>\n <td>Finland</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>106442</th>\n <td>65263479</td>\n <td>504779814</td>\n <td>2</td>\n <td>0</td>\n <td>Latvia</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>106443</th>\n <td>65263479</td>\n <td>544264361</td>\n <td>2</td>\n <td>0</td>\n <td>Latvia</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>106444</th>\n <td>69866789</td>\n <td>481190056</td>\n <td>2</td>\n <td>0</td>\n <td>Latvia</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>106445</th>\n <td>80730412</td>\n <td>554759601</td>\n <td>2</td>\n <td>0</td>\n <td>Latvia</td>\n <td>EU</td>\n </tr>\n <tr>\n <th>106446</th>\n <td>84881241</td>\n <td>569497458</td>\n <td>0</td>\n <td>1</td>\n <td>Latvia</td>\n <td>EU</td>\n </tr>\n </tbody>\n</table>\n<p>106447 rows × 6 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 169,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"appln_ctry = appln_pers.merge(pers[[\"person_id\",\"person_ctry_code\"]],\n",
" on=\"person_id\").merge(country_defs[[\"Country\",\"ctry_code\"]],\n",
" left_on=\"person_ctry_code\", right_on=\"ctry_code\").drop(columns=[\"ctry_code\",\"person_ctry_code\"])\n",
"appln_ctry[\"Country_Type\"] = \"EU\"\n",
"appln_ctry.loc[appln_ctry[\"Country\"].isin(ch_names),\"Country_Type\"] = \"CH\"\n",
"appln_ctry"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 170,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 0, 'Year')"
},
2 years ago
"execution_count": 170,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAHHCAYAAABeLEexAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABmD0lEQVR4nO3deVhUZf8G8HuGYYZ1BtlBkEVExV3ccF9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9SpU/H555/XuwSjVCrh6upabzbYqlWrTFbPN998g5KSEv3zH3/8EZcvX8a4ceMAAKGhoWjfvj3ef/99lJaW1nv/9dO5m+quu+7CwYMHkZiYqH+trKwMa9asgb+/P0JCQpr8mRMnToQgCPpFDq9X10Ny1113AUC92398+OGHAIDIyEgAgJeXF8LDww0e19NoNPj888/1z6urq/H555/Dzc0NoaGhAP7prbm+d+bAgQMGxwwAdnZ2AOqHYXd3dwwfPhyff/55g2PPbvf829vb19sXABQUFBg8d3BwQFBQUKOXIyASC3uIiFqgl19+Gd9++y1SUlLQpUsXg22zZ8/G22+/jdmzZ6NPnz7YtWuXvtfBFJydnTF48GBERUUhNzcXH3/8MYKCgvTT5aVSKb788kuMGzcOXbp0QVRUFNq2bYuLFy8iLi4OSqUSmzdvvq19v/jii/jhhx8wbtw4PPPMM3B2dsbXX3+NjIwM/PTTT5BKm/4734gRIzBt2jR88sknSE1NxdixY6HT6bB7926MGDECc+fORY8ePTBjxgysWbM
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2 years ago
"data = appln.groupby([\"appln_filing_year\"], as_index=False)[\"appln_id\"].count()\n",
2 years ago
"data\n",
2 years ago
"g = sns.lineplot(data, x=\"appln_filing_year\", y=\"appln_id\", marker=\"o\")\n",
"g.set_title(\"Number of co-patents\")\n",
2 years ago
"g.set_ylabel(\"Count\")\n",
"g.set_xlabel(\"Year\")"
],
"metadata": {
2 years ago
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
2 years ago
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 171,
2 years ago
"outputs": [],
"source": [
2 years ago
"\n",
"eu_invt = appln_ctry[((appln_ctry[\"Country_Type\"]==\"EU\") & (appln_ctry['invt_seq_nr']>0))][\"appln_id\"].unique()\n",
"eu_applt = appln_ctry[((appln_ctry[\"Country_Type\"]==\"EU\") & (appln_ctry['applt_seq_nr']>0))][\"appln_id\"].unique()\n",
"ch_invt = appln_ctry[((appln_ctry[\"Country_Type\"]==\"CH\" )& (appln_ctry['invt_seq_nr']>0))][\"appln_id\"].unique()\n",
"ch_applt = appln_ctry[((appln_ctry[\"Country_Type\"]==\"CH\") & (appln_ctry['applt_seq_nr']>0))][\"appln_id\"].unique()\n",
"\n",
"appln[\"co_inventors\"] = appln[\"appln_id\"].isin(eu_invt) & appln[\"appln_id\"].isin(ch_invt)\n",
"appln[\"co_applicants\"] = appln[\"appln_id\"].isin(eu_applt) & appln[\"appln_id\"].isin(ch_applt)\n",
"\n",
"appln[\"foreign ownership (CH inventors; EU owned)\"] = (appln[\"appln_id\"].isin(eu_applt) & appln[\"appln_id\"].isin(ch_invt) &\n",
" ~appln[\"appln_id\"].isin(eu_invt) & ~appln[\"appln_id\"].isin(ch_applt))\n",
"appln[\"foreign ownership (EU inventors; CH owned)\"] = (appln[\"appln_id\"].isin(ch_applt) & appln[\"appln_id\"].isin(eu_invt) &\n",
" ~appln[\"appln_id\"].isin(ch_invt)& ~appln[\"appln_id\"].isin(eu_applt))"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 172,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x169596040a0>"
2 years ago
},
2 years ago
"execution_count": 172,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAABB4AAAHHCAYAAAAYr5tzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd1QU19sH8O/S61IEBBQBpStgxAYqoGKwxJiYWImisSVq7C0xiRBrYuyxm4AtxqhBDRoVUbArRbDQm1hQRKS3Zfe+f/Du/FxYcFFwQZ7POXuSnblz5947uy7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WigaakFIM9OhQwd88cUX2LlzZ42u+3w+HwYGBjVWn9i2bVujlWffvn0oLCzk3h89ehRZWVkYNGgQAMDFxQUdOnTAr7/+iqKiohrHv7pMY30NHjwYt27dwvXr17ltxcXF2LVrFywsLODg4FDvPD/77DMwxuDv719jn/iJ/+DBgwFUre7wqvXr1wMAhgwZAgAwMTGBl5eXxOtVlZWV2LlzJ/e+oqICO3fuhKGhIVxcXAD8r/fBq70Nbt68KVFnANDQ0ABQM+hkZGQET09P7Ny5U+rcIG/a/pqamjXOBQAvXryQeK+lpQUrKyuZlxklhBBCCCHvH+rxQEgztHTpUuzfvx+JiYno2LGjxL7JkydjzZo1mDx5Mrp27YpLly5xT9Ebg76+Pnr37o2JEyfi2bNn2LhxI6ysrLhlMBUUFLBnzx4MGjQIHTt2xMSJE9GmTRs8fvwYFy9eBJ/Px7///vtG516yZAkOHTqEQYM
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"cols = [\"co_inventors\",\"co_applicants\",\n",
" \"foreign ownership (CH inventors; EU owned)\",\n",
" \"foreign ownership (EU inventors; CH owned)\"]\n",
"\n",
"for c in cols:\n",
" data = appln[appln[c]==True].groupby([\"appln_filing_year\"], as_index=False)[\"appln_id\"].count()\n",
" g = sns.lineplot(data, x=\"appln_filing_year\", y=\"appln_id\", marker=\"o\")\n",
"g.set_title(f\"Number of co-patents\")\n",
"g.set_ylabel(\"Count\")\n",
"g.set_xlabel(\"Year\")\n",
"g.legend(handles=g.lines,labels=[\"patents with \" + c.replace(\"_\",\"-\") for c in cols], bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 173,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x16953bb12b0>"
2 years ago
},
2 years ago
"execution_count": 173,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp4AAAHHCAYAAAAWH1gxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACCYklEQVR4nO3dd3hTZf8G8Ds7XUn3oqWDVTZaBIvIhoLgxC1TEAeouEV9VfT15XVPFPmJ4EAF3KAviC1DoIJUWYWW1VIKdI90Zp7fH6GhoYNSkpy0uT/XlSvNOSc533PaJnee55znSARBEEBERERE5GRSsQsgIiIiIs/A4ElERERELsHgSUREREQuweBJRERERC7B4ElERERELsHgSUREREQuweBJRERERC7B4ElERERELsHgSUREREQuweBJRG2yefNmSCQSfPvtt2KX0ioFBQW4+eabERQUBIlEgnfeeUfskoiIPA6DJ5EbW7FiBSQSCdRqNU6dOtVo/ogRI9CnTx8RKmt/HnnkEWzYsAELFizAF198gfHjx4tdkkPV1NTgxRdfxObNm12yvg8//BArVqxwybqIqOOQi10AEV2YXq/Hf//7X7z//vtil9Jupaam4vrrr8fjjz8udilOUVNTg4ULFwKwfiFxtg8//BDBwcGYMWOG09dFRB0HWzyJ2oEBAwbg//7v/3D69GmxS3G56upqh7xOYWEh/P39HfJaRETUNgyeRO3AM888A7PZjP/+978tLpeTkwOJRNJkF6hEIsGLL75oe/ziiy9CIpHg8OHDmDJlCrRaLUJCQvCvf/0LgiDg5MmTuP7666HRaBAeHo4333yzyXWazWY888wzCA8Ph4+PD6677jqcPHmy0XI7d+7E+PHjodVq4e3tjeHDh2P79u12y9TXdPDgQdx5550ICAjA0KFDW9zm48eP45ZbbkFgYCC8vb1x5ZVX4pdffrHNrz9cQRAELF68GBKJBBKJpMXXtFgsePfdd9G3b1+o1WqEhIRg/Pjx2L17t20Zk8mEl19+GV26dIFKpUJsbCyeeeYZ6PX6Fl+7Xv1hEunp6RgyZ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qjefUtU+Xl5XbT29Ly11rnd6kKgoCjR4+iX79+AIAuXboAADQaDcaMGePQdcfExCArK6vR9MzMTNv8i9WlSxds2LABpaWlzbZ6xsTEwGKx4MiRI7bWVcB6slN5ebltvcnJyS2ezX369GlUV1fbtXoePnwYgPXMcQD49ttvER8fj++//94u6J5/KEBzITg+Ph4AoFAoHLr/WwrdgYGBmDlzJmbOnImqqioMGzYML774IoMnEbGrnai96dKlC6ZMmYKPP/64UdetRqNBcHBwo7PPP/zwQ6fV8/nnn6OystL2+Ntvv8WZM2cwYcIEAEBiYiK6dOmCN954A1VVVY2e33CYnot1zTXXYNeuXUhLS7NNq66uxtKlSxEbG4tevXpd9GtOnjwZgiDYBmNvqL7F75prrgGARpfdfOuttwAAEydOBABERERgzJgxdreGTCYTPv74Y9tjg8GAjz/+GCEhIUhMTARwrvWxYWvjzp077bYZALy9vQE0/tIRGhqKESNG4OOPP27y2OC27n8fH59G6wKAkpISu8e+vr7o2rVrq4eZIqKOjS2eRO3Qs88+iy+++AJZWVno3bu33bzZs2fjv//9L2bPno2BAwdi69attlY0ZwgMDMTQoUMxc+ZMFBQU4J133kHXrl1twyBJpVJ88sknmDBhAnr37o2ZM2eiU6dOOHXqFDZt2gSNRoO1a9e2ad1PP/00vv76a0yYMAEPPfQQAgMD8dlnnyE7OxvfffcdpNKL/249cuRITJ06Fe+99x6OHDm
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = appln.groupby([\"appln_filing_year\",\"appln_kind\"], as_index=False)[\"appln_id\"].count()\n",
"data\n",
"g = sns.lineplot(data, x=\"appln_filing_year\", y=\"appln_id\", marker=\"o\", hue=\"appln_kind\")\n",
"g.set_title(\"Number of co-patents\")\n",
"g.set_ylabel(\"Count\")\n",
"g.set_xlabel(\"Year\")\n",
"g.legend(title=None,bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 174,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(0.5, 0, 'Year')"
},
2 years ago
"execution_count": 174,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAHHCAYAAABeLEexAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACETUlEQVR4nO3dd3xN9xvA8c+9udlTthCSGLF3rRYJapS2SgcdRmn9WtWiOnShS1UXrbZUS/duKW2pkqCo2lsQsWWJ7HnvPb8/jlwiQUJyz03u8369ziu553zvOc85IffJd+oURVEQQgghhLBjeq0DEEIIIYTQmiREQgghhLB7khAJIYQQwu5JQiSEEEIIuycJkRBCCCHsniREQgghhLB7khAJIYQQwu5JQiSEEEIIuycJkRBCCCHsniREQohrEhsbi06n46efftI6lHJJSkrizjvvxM/PD51Ox3vvvad1SEIIGyIJkRA2bNGiReh0OlxcXDh16lSp41FRUbRo0UKDyKqfiRMnsmLFCqZMmcKXX35Jv379tA6pUuXm5jJt2jRiY2Otcr0PP/yQRYsWWeVaQliDQesAhBBXV1BQwBtvvMH777+vdSjV1urVq7n99tuZPHmy1qFUidzcXKZPnw6oiXJV+/DDD/H392fkyJFVfi0hrEFqiISoBtq0acMnn3zC6dOntQ7F6nJycirlPMnJyfj4+FTKuYQQNY8kREJUA8899xwmk4k33njjiuWOHj2KTqcrsylDp9Mxbdo0y+tp06ah0+k4ePAg999/P97e3gQEBPDiiy+iKAonTpzg9ttvx8vLi+DgYN5+++0yr2kymXjuuecIDg7G3d2d2267jRMnTpQqt2nTJvr164e3tzdubm706NGD9evXlyhTHNO+ffu49957qVWrFjfddNMV7/nIkSPcdddd+Pr64ubmRufOnfn9998tx4ubHRVFYe7cueh0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v766y8WLFjAu+++y8cff1yiNlIIWyMJkRDVzAsvvMBXX33FzJkzSx0r/ks+PT29xP5rqSkpr0ubRhRF4fDhw7Rq1QqABg0aAODl5UXv3r0r9dr169cnLi6u1P4DBw5YjldUgwYNWLFiBWlpaZetJapfvz5ms5lDhw5ZaqNA7eSdnp5uuW7fvn2vOLrq9OnT5OTklKglOnjwIKCO5AL46aefiIiI4JdffimRgF3apHe55CwiIgIAR0fHSn3+V0oGfX19GTVqFKNGjSI7O5vu3bszbdo0SYiETZMmMyGqmQYNGnD//fczb968Uk0wXl5e+Pv7lxoN9uGHH1ZZPF988QVZWVmW1z/99BNnzpyhf//+ALRv354GDRrw1ltvkZ2dXer9Fw/nrqhbbrmF//77j40bN1r25eTkMH/+fMLCwmjWrFmFzzlkyBAURbFMcnix4hqSW265BaDU8h/vvPMOAAMGDACgdu3a9O7du8R2MaPRyLx58yyvCwsLmTdvHgEBAbRv3x64UFtzce3Mpk2bStwzgJubG1A6GQ4MDCQqKop58+aV2ffsWp+/u7t7qWsBnD17tsRrDw8PGjZsWO7pCITQitQQCVENPf/883z55ZfExcXRvHnzEsfGjBnDG2+8wZgxY+jQoQNr16611DpUBV9fX2666SZGjRpFUlIS7733Hg0bNrQMl9fr9SxYsID+/fvTvHlzRo0aRZ06dTh16hQxMTF4eXmxdOnSa7r2s88+y7fffkv//v15/PHH8fX15fPPPychIYGff/4Zvb7if/NFR0fzwAMPMGfOHA4dOkS/fv0wm82sW7eO6OhoHnvsMVq3bs2IESOYP38+6enp9OjRg//++4/PP/+cQYMGER0dXa5rhYS
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = appln.groupby([\"appln_filing_year\",\"granted\"], as_index=False)[\"appln_id\"].count()\n",
"data\n",
"g = sns.lineplot(data, x=\"appln_filing_year\", y=\"appln_id\", hue=\"granted\", marker=\"o\")\n",
"g.set_title(\"Number of co-patents\")\n",
"g.set_ylabel(\"Count\")\n",
"g.set_xlabel(\"Year\")"
2 years ago
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 175,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x1691af2f3d0>"
2 years ago
},
2 years ago
"execution_count": 175,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAAHHCAYAAACBTv/rAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC1OklEQVR4nOzdd3gU1dfA8e/W9EIaSWhpEHrvUhI6goJYXhUVEBUVsNefDTt2sSJKE8WuqKgoUgLSeydACjW9923z/hGyEgmQhCSzSc7nefZJdubuzNndZPfs3XvP1SiKoiCEEEIIIYSoUVq1AxBCCCGEEKIhkkRbCCGEEEKIWiCJthBCCCGEELVAEm0hhBBCCCFqgSTaQgghhBBC1AJJtIUQQgghhKgFkmgLIYQQQghRCyTRFkIIIYQQohZIoi2EEEIIIUQtkERbCFEta9euRaPR8P3336sdSqWkpKRw3XXX4evri0aj4d1331U7JCGEEA2cJNpCOLBFixah0Whwdnbm9OnT5+2PioqiY8eOKkRW/zz44IP8+eefPPnkkyxZsoRRo0apHVKNKiwsZNasWaxdu7ZOzvfRRx+xaNGiOjmXEELUV3q1AxBCXFpJSQmzZ8/m/fffVzuUemv16tWMGzeORx55RO1QakVhYSHPP/88UPoBrLZ99NFH+Pn5MXny5Fo/lxBC1FfSoy1EPdC1a1c+/fRTzpw5o3Yoda6goKBGjpOamoq3t3eNHEsIIYSoDEm0hagH/ve//2G1Wpk9e/ZF2yUmJqLRaCr8Sl+j0TBr1iz79VmzZqHRaDhy5Ai33HILXl5e+Pv788wzz6AoCidPnmTcuHF4enoSGBjIW2+9VeE5rVYr//vf/wgMDMTNzY2rr76akydPntduy5YtjBo1Ci8vL1xdXRk8eDAbNmwo16YspoMHD3LzzTfTpEkTBgwYcNH7HB8fz/XXX4+Pjw+urq707duX3377zb6/bPiNoih8+OGHaDQaNBrNRY9ps9mYM2cOnTp1wtnZGX9/f0aNGsX27dvtbSwWCy+++CLh4eE4OTkREhLC//73P0pKSi567DJlw3527NhB//79cXFxITQ0lLlz55ZrZzKZePbZZ+nRowdeXl64ubkxcOBA1qxZY2+TmJiIv78/AM8//7z9Pp77fB8+fJjrrrsOHx8fnJ2d6dmzJ7/88ku5c5U9Vhs2bOChhx7C398fNzc3rrnmGtLS0uztQkJCOHDgADExMfZzlfWim81mnn/+eVq3bo2zszO+vr4MGDCAlStXVupxEUKIhkQSbSHqgdDQUG677bZa6dX+v//7P2w2G7Nnz6ZPnz689NJLvPvuuwwfPpxmzZrx2muvERERwSOPPMK6devOu/3LL7/Mb7/9xuOPP859993HypUrGTZsGEVFRfY2q1evZtCgQeTm5vLcc8/xyiuvkJ2dzZAhQ9i6det5x7z++uspLCzklVde4c4777xg7CkpKfTv358///yTe++9l5dffpni4mKuvvpqfvrpJwAGDRrEkiVLABg+fDhLliyxX7+QqVOn8sADD9CiRQtee+01nnjiCZydndm8ebO9zR133MGzzz5L9+7deeeddxg8eDCvvvoqN95448Uf8HNkZWVx5ZVX0qNHD15//XWaN2/OPffcw4IFC+xtcnNz+eyzz4iKiuK1115j1qxZpKWlMXLkSHbv3g2Av78/H3/8MQDXXHON/T5OmDABgAMHDtC3b18OHTrEE088wVtvvYWbmxvjx4+3P07nmjlzJnv27OG5557jnnvu4ddff2XGjBn2/e+++y7Nmzenbdu29nM99dRTQOmHpeeff57o6Gg++OADnnrqKVq2bMnOnTsr/bgIIUSDoQghHNbChQsVQNm2bZsSFxen6PV65b777rPvHzx4sNKhQwf79YSEBAVQFi5ceN6xAOW5556zX3/uuecUQLnrrrvs2ywWi9K8eXNFo9Eos2fPtm/PyspSXFxclEmTJtm3rVmzRgGUZs2aKbm5ufbt3377rQIoc+bMURRFUWw2m9K6dWtl5MiRis1ms7crLCxUQkNDleHDh58X00033VSpx+eBBx5QAGX9+vX2bXl5eUpoaKgSEhKiWK3Wcvd/+vTplzzm6tWrFaDc41ymLP7du3crgHLHHXeU2//II48ogLJ69epLnmfw4MEKoLz11lv2bSUlJUrXrl2VgIAAxWQyKYpS+pyUlJSUu21WVpbStGlT5fbbb7dvS0tLO+85LjN06FClU6dOSnFxcbn70r9/f6V169b2bWV/b8OGDSv3XD344IOKTqdTsrOz7ds6dOigDB48+LxzdenSRRkzZswl778QQjQG0qMtRD0RFhbGrbfeyrx580hKSqqx495xxx3233U6HT179kRRFKZOnWrf7u3tTWRkJPHx8efd/rbbbsPDw8N+/brrriMoKIjff/8dgN27d3P06FFuvvlmMjIySE9PJz09nYKCAoYOHcq6deuw2Wzljnn33XdXKvbff/+d3r17lxte4u7uzl133UViYiIHDx6s3INwjh9++AGNRsNzzz133r6yISdl9+2hhx4qt//hhx8GKDd05WL0ej3Tpk2zXzcajUybNo3U1FR27NgBlD4nRqMRKB3SkpmZicVioWfPnpXqJc7MzGT16tXccMMN5OXl2R//jIwMRo4cydGjR8+raHPXXXeVG14zcOBArFYrx48fv+T5vL29OXDgAEePHq3UYyCEEA2ZJNpC1CNPP/00FovlkmO1q6Jly5blrnt5eeHs7Iyfn99527Oyss67fevWrctd12g0REREkJiYCGBPuCZNmoS/v3+5y2effUZJSQk5OTnljhEaGlqp2I8fP05kZOR529u1a2ffX1VxcXEEBwfj4+Nz0fNqtVoiIiLKbQ8MDMTb29t+3qKiIpKTk8tdzhUcHIybm1u5bW3atAGwP34AixcvpnPnzvYxz/7+/vz222/nPW4VOXbsGIqi8Mwzz5z3+Jd9mEhNTS13m//+TTRp0gSgwuf/v1544QWys7Np06YNnTp14tFHH2Xv3r2XvJ0QQjREUt5PiHokLCyMW265hXnz5vHEE0+ct/9Ck/ysVusFj6nT6Sq1DUBRlEpG+q+y3uo33niDrl27VtjG3d293HUXF5cqn0cNl5pU+c033zBlypRy26r6GH7xxRdMnjyZ8ePH8+ijjxIQEIBOp+PVV18lLi7ukrcve/wfeeQRRo4cWWGb/35guJznf9CgQcTFxfHzzz/z119/8dlnn/HOO+8wd+7cct+eCCFEYyCJthD1zNNPP80XX3zBa6+9dt6+sp7H7Ozsctur07NbWf8dIqAoCseOHaNz584AhIeHA+Dp6cmwYcNq9NytWrUiNjb2vO2HDx+276+q8PBw/vzzTzIzMy/Yq92qVStsNhtHjx61955D6eTM7Oxs+3lHjhx50WobZ86coaCgoFyv9pEjR4DSyh4A33//PWFhYfz444/lEvv/Dm25UNIfFhYGgMFgqNHH/2IfMnx8fJgyZQpTpkwhPz+fQYMGMWvWLEm0hRCNjgwdEaKeCQ8P55ZbbuGTTz45byiCp6cnfn5+51UH+eijj2otns8//5y8vDz79e+//56kpCRGjx4NQI8ePQgPD+fNN98kPz//vNufWzauqq688kq2bt3Kpk2b7NsKCgqYN28eISEhtG/fvsrHvPbaa1EUxb74y7nKenSvvPJKgPOWcX/77bcBGDNmDABBQUEMGzas3OVcFouFTz75xH7dZDLxySef4O/vT48ePYB/e5fP7U3esmVLufsM4OrqCpz/ISsgIICoqCg++eSTCsf2V/fxd3NzO+9cABkZGeWuu7u7ExERUemyh0II0ZBIj7YQ9dBTTz3FkiVLiI2NpUOHDuX23XHHHcyePZs77riDnj17sm7dOnsvaW3w8fFhwIABTJkyhZSUFN59910iIiLsZfm0Wi2fffYZo0ePpkOHDkyZMoVmzZpx+vRp1qxZg6enJ7/++mu1zv3EE0/w1VdfMXr0aO677z58fHxYvHgxCQkJ/PDDD2i1Ve9LiI6O5tZbb+W9997j6NGjjBo1CpvNxvr164m
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = appln.groupby([\"appln_filing_year\",\"granted\",\"appln_kind\"], as_index=False)[\"appln_id\"].count()\n",
"g = sns.lineplot(data, x=\"appln_filing_year\", y=\"appln_id\", hue=\"appln_kind\",style=\"granted\", marker=\"o\")\n",
"g.set_title(\"Number of co-patents\")\n",
"g.set_ylabel(\"Count\")\n",
"g.set_xlabel(\"Year\")\n",
"g.legend(title=None,bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 176,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_filing_year granted appln_kind appln_id\n0 2011 N A 892\n1 2011 N F 6\n2 2011 N T 10\n3 2011 N U 1\n4 2011 Y A 966\n.. ... ... ... ...\n70 2021 Y F 1\n71 2021 Y U 30\n72 2022 N A 6\n73 2022 N U 1\n74 2022 Y U 4\n\n[75 rows x 4 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>appln_filing_year</th>\n <th>granted</th>\n <th>appln_kind</th>\n <th>appln_id</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>2011</td>\n <td>N</td>\n <td>A</td>\n <td>892</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2011</td>\n <td>N</td>\n <td>F</td>\n <td>6</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2011</td>\n <td>N</td>\n <td>T</td>\n <td>10</td>\n </tr>\n <tr>\n <th>3</th>\n <td>2011</td>\n <td>N</td>\n <td>U</td>\n <td>1</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2011</td>\n <td>Y</td>\n <td>A</td>\n <td>966</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>70</th>\n <td>2021</td>\n <td>Y</td>\n <td>F</td>\n <td>1</td>\n </tr>\n <tr>\n <th>71</th>\n <td>2021</td>\n <td>Y</td>\n <td>U</td>\n <td>30</td>\n </tr>\n <tr>\n <th>72</th>\n <td>2022</td>\n <td>N</td>\n <td>A</td>\n <td>6</td>\n </tr>\n <tr>\n <th>73</th>\n <td>2022</td>\n <td>N</td>\n <td>U</td>\n <td>1</td>\n </tr>\n <tr>\n <th>74</th>\n <td>2022</td>\n <td>Y</td>\n <td>U</td>\n <td>4</td>\n </tr>\n </tbody>\n</table>\n<p>75 rows × 4 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 176,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 177,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x1696b530850>"
2 years ago
},
2 years ago
"execution_count": 177,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApEAAAHHCAYAAADnFAO8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACviElEQVR4nOzdd3hT5dvA8W9W96KLDS17770RFHCBivoqW0CcgCg/wQGiAqKCuBmyRUTBgYogIntvlT1aRhmlpXulSc77x6GB2gINpD1Je3+uq1eTc3LOuZs2zZ1n3I9OURQFIYQQQgghHKDXOgAhhBBCCOF+JIkUQgghhBAOkyRSCCGEEEI4TJJIIYQQQgjhMEkihRBCCCGEwySJFEIIIYQQDpMkUgghhBBCOEySSCGEEEII4TBJIoUQQgghhMMkiRRCsH79enQ6HcuWLdM6lAK5dOkSvXv3JiQkBJ1Ox/Tp07UOSQghShxJIoUoIvPnz0en0+Hl5UVMTEye/Z06daJevXoaROZ+XnrpJVavXs3YsWNZtGgR3bt31zokp0pPT+ett95i/fr1RXK9L774gvnz5xfJtYQQxYdR6wCEKGmysrJ47733+PTTT7UOxW399ddf9OzZk1deeUXrUApFeno6EyZMANQPF4Xtiy++IDQ0lIEDBxb6tYQQxYe0RApRxBo1asTs2bM5f/681qEUubS0NKecJzY2lqCgIKecSwghxO2RJFKIIvbaa69htVp57733bvq46OhodDpdvt2MOp2Ot956y37/rbfeQqfTcezYMfr27UtgYCBhYWG8+eabKIrC2bNn6dmzJwEBAZQpU4apU6fme02r1cprr71GmTJl8PX15cEHH+Ts2bN5Hrdjxw66d+9OYGAgPj4+dOzYkS1btuR6TE5Mhw4d4sknn6RUqVK0a9fupj/zqVOnePTRRwkODsbHx4dWrVrx22+/2ffnDAlQFIXPP/8cnU6HTqe76TltNhsff/wx9evXx8vLi7CwMLp3787u3bvtj7FYLLzzzjtUrVoVT09PIiIieO2118jKyrrpuXPkDEXYs2cPbdq0wdvbm8jISGbMmJHrcWazmXHjxtG0aVMCAwPx9fWlffv2rFu3zv6Y6OhowsLCAJgwYYL9Z7z+933kyBF69+5NcHAwXl5eNGvWjBUrVuS6Vs5ztWXLFkaNGkVYWBi+vr489NBDXL582f64iIgIDh48yIYNG+zXymn9zM7OZsKECVSvXh0vLy9CQkJo164da9asKdDzIoQo3iSJFKKIRUZG0r9//0JpjXz88cex2Wy89957tGzZknfffZfp06dz9913U758eaZMmUK1atV45ZVX2LhxY57jJ06cyG+//carr77K8OHDWbNmDV27diUjI8P+mL/++osOHTqQnJzM+PHjmTRpEomJidx1113s3LkzzzkfffRR0tPTmTRpEkOHDr1h7JcuXaJNmzasXr2a5557jokTJ5KZmcmDDz7Ijz/+CECHDh1YtGgRAHfffTeLFi2y37+RwYMHM3LkSCpWrMiUKVMYM2YMXl5ebN++3f6YIUOGMG7cOJo0acJHH31Ex44dmTx5Mv/3f/938yf8OgkJCdx77700bdqU999/nwoVKvDss88yd+5c+2OSk5P56quv6NSpE1OmTOGtt97i8uXLdOvWjf379wMQFhbGl19+CcBDDz1k/xkffvhhAA4ePEirVq04fPgwY8aMYerUqfj6+tKrVy/783S9F198kQMHDjB+/HieffZZfvnlF1544QX7/unTp1OhQgVq1aplv9brr78OqB8EJkyYQOfOnfnss894/fXXqVSpEnv37i3w8yKEKMYUIUSRmDdvngIou3btUk6ePKkYjUZl+PDh9v0dO3ZU6tata78fFRWlAMq8efPynAtQxo8fb78/fvx4BVCefvpp+zaLxaJUqFBB0el0ynvvvWffnpCQoHh7eysDBgywb1u3bp0CKOXLl1eSk5Pt27/77jsFUD7++GNFURTFZrMp1atXV7p166bYbDb749LT05XIyEjl7rvvzhPTE088UaDnZ+TIkQqgbNq0yb4tJSVFiYyMVCIiIhSr1Zrr53/++edvec6//vpLAXI9zzly4t+/f78CKEOGDMm1/5VXXlEA5a+//rrldTp27KgAytSpU+3bsrKylEaNGinh4eGK2WxWFEX9nWRlZeU6NiEhQSldurTy1FNP2bddvnw5z+84R5cuXZT69esrmZmZuX6WNm3aKNWrV7dvy/l769q1a67f1UsvvaQYDAYlMTHRvq1u3bpKx44d81yrYcOGyn333XfLn18IUTJJS6QQGqhSpQr9+vVj1qxZXLhwwWnnHTJkiP22wWCgWbNmKIrC4MGD7duDgoKoWbMmp06dynN8//798ff3t9/v3bs3ZcuWZeXKlQDs37+f48eP8+STTxIfH09cXBxxcXGkpaXRpUsXNm7ciM1my3XOZ555pkCxr1y5khYtWuTq8vbz8+Ppp58mOjqaQ4cOFexJuM7y5cvR6XSMHz8+z76cbvCcn23UqFG59r/88ssAubrTb8ZoNDJs2DD7fQ8PD4YNG0ZsbCx79uwB1N+Jh4cHoHazX7lyBYvFQrNmzQrUunflyhX++usvHnvsMVJSUuzPf3x8PN26deP48eN5Zv4//fTTubr827dvj9Vq5fTp07e8XlBQEAcPHuT48eMFeg6EECWLJJFCaOSNN97AYrHccmykIypVqpTrfmBgIF5eXoSGhubZnpCQkOf46tWr57qv0+moVq0a0dHRAPZ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SrVs1emkev1/PVV1/Ro0cP6taty6BBgyhfvjwxMTGsW7eOgIAAfvnll9u69pgxY1iyZAk9evRg+PDhBAcHs2DBAqKioli+fDl6veOfeTt37ky/fv345JNPOH78ON27d8dms7Fp0yY6d+7MCy+8QMOGDRkwYACzZs0iMTGRjh07snP
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"perc = data.groupby(['appln_filing_year',\"appln_kind\"], as_index=False)[\"appln_id\"].sum().rename(columns={\"appln_id\":\"sum\"})\n",
"p_data = data.merge(perc, on = ['appln_filing_year',\"appln_kind\"])\n",
"p_data[\"percent\"] = p_data[\"appln_id\"]/p_data[\"sum\"]\n",
"# p_data\n",
"g = sns.lineplot(p_data[p_data[\"granted\"]==\"Y\"], x=\"appln_filing_year\", y=\"percent\", hue=\"appln_kind\", marker=\"o\")\n",
"g.set_title(\"Number of co-patents\")\n",
"g.set_ylabel(\"Percent of accepted co-patents\")\n",
"g.set_xlabel(\"Year\")\n",
"g.legend(title=None,bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 178,
2 years ago
"outputs": [],
"source": [
2 years ago
"for kind in sorted(appln[\"appln_kind\"].unique()):\n",
" sub_data = data[data[\"appln_kind\"]==kind]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
2 years ago
"source": [],
2 years ago
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 179,
2 years ago
"outputs": [],
"source": [
2 years ago
"# Granted patents\n",
"# granted = appln[appln[\"granted\"]==\"Y\"][\"appln_id\"].unique()\n",
"# appln_pers=[appln_pers[\"appln_id\"].isin(granted)]"
2 years ago
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 180,
2 years ago
"outputs": [],
"source": [
"patstat_collabs = appln_pers.merge(pers, on=\"person_id\")\n",
"patstat_collabs = patstat_collabs.merge(country_defs, left_on=\"person_ctry_code\", right_on=\"ctry_code\")\n",
"patstat_collabs = patstat_collabs.groupby(\"appln_id\",as_index=False)[\"Country\"].unique().explode('Country')"
2 years ago
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 181,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " Country count percent weight\n0 China 22137 0.888073 0.415765\n1 Taiwan Province Of China 2593 0.104024 0.048700\n2 Hong Kong, China 581 0.023308 0.010912\n3 Macao SAR (China) 17 0.000682 0.000319",
"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>Country</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>China</td>\n <td>22137</td>\n <td>0.888073</td>\n <td>0.415765</td>\n </tr>\n <tr>\n <th>1</th>\n <td>Taiwan Province Of China</td>\n <td>2593</td>\n <td>0.104024</td>\n <td>0.048700</td>\n </tr>\n <tr>\n <th>2</th>\n <td>Hong Kong, China</td>\n <td>581</td>\n <td>0.023308</td>\n <td>0.010912</td>\n </tr>\n <tr>\n <th>3</th>\n <td>Macao SAR (China)</td>\n <td>17</td>\n <td>0.000682</td>\n <td>0.000319</td>\n </tr>\n </tbody>\n</table>\n</div>"
2 years ago
},
2 years ago
"execution_count": 181,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"country_collab = patstat_collabs[patstat_collabs[\"Country\"].isin(ch_names)][\"Country\"].value_counts().reset_index()\n",
"country_collab[\"percent\"] = country_collab[\"count\"]/patstat_collabs[\"appln_id\"].nunique()\n",
"country_collab[\"weight\"] = country_collab[\"count\"]/patstat_collabs[\"appln_id\"].size\n",
"country_collab"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 182,
2 years ago
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAuYAAAGwCAYAAADlpqAkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABRjklEQVR4nO3deVxV1f7/8fcBGUQmFQU0RBGccUoz9eaQY5SZddXMDLNscKocMstC7ZZDDlmZDQ6YV1O7qVkW5YQlOSsOhZRevZiipiiImqKs3x/+3N9OgCKhbPX1fDzO48HZa+21P3txgDebdTYOY4wRAAAAgCLlUtQFAAAAACCYAwAAALZAMAcAAABsgGAOAAAA2ADBHAAAALABgjkAAABgAwRzAAAAwAaKFXUBwM0oOztbBw8elI+PjxwOR1GXAwAA8sEYo5MnT6pcuXJycbn+168J5sA1cPDgQYWEhBR1GQAAoAD279+v22677bofl2AOXAM+Pj6SLn5h+/r6FnE1AAAgPzIyMhQSEmL9HL/eCObANXBp+Yqvry/BHACAG0xRLUPlzZ8AAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAW6XCFxDkZH/k4tL0dwLFQBwdfburVjUJeAWxxVzAAAAwAYI5gAAAIANEMwBAAAAGyCYAwAAADZAMAcAAABsgGAOAAAA2ADBHAAAALABgjkAAABgAwRzAAAAwAYI5gAAAIANEMwBAAAAGyCYAwAAADZAMAcAAABsgGAOAAAA2ADBHAAAALABgjkAAABgAwRzAAAAwAYI5gAAAIANEMwBAAAAGyCYAwAAADZAMAcAAABsgGAOAAAA2ADBHAAAALABgjkAAABgAwRzAAAAwAYI5gAAA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LFr8mxAAD2cqWllC1atMjXcsv4+PjLtnft2jXPfz70Z1WrVr2q5Z24sfHmT9hWWFiYtmzZopYtW2rQoEGqVauW2rRpoxUrVlhXNK6F6dOn6/jx46pfv7569OihAQMGqGzZstfseAAAAJLkMPwaBhS6jIwM+fn5qUKF7XJx8SnqcgAA+bB3b8WiLgFF7NLP70v/NOp644o5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2UKyoCwBuZjt2hMrX17eoywAAADcArpgDAAAANkAwBwAAAGyAYA4AAADYAMEcAAAAsAGCOQAAAGADBHMAAADABgjmAAAAgA0QzAEAAAAbIJgDAAAANkAwBwAAAGyAYA4AAADYAMEcAAAAsAGCOQAAAGADBHMAAADABgjmAAAAgA0QzAEAAAAbIJgDAAAANkAwBwAAAGygWFEXANzMIiP/JxcXn6Iu44r27q1Y1CUAAHDL44o5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAACADRDMAQAAABsgmAMAAAA2QDAHAAAAbIBgDgAAANgAwRwAAACwAYI5AAAAYAMEcwAAAMAGCOYAAAC
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = country_collab\n",
"g = sns.barplot(data, x=\"count\", y=\"Country\", color=\"blue\")\n",
2 years ago
"g.set_xlim(0,30000)\n",
2 years ago
"g.set_ylabel(\"Country\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 183,
2 years ago
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAt0AAAGwCAYAAAB1tdnrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABRqElEQVR4nO3deVQW5f//8dcNyL65g4XigjvuZuonl9w1UjNNJUUr/aSYe3suaWaaS25p5YKZS/ZxydT0iyia+4pL4ppGKWiKgrgizO+PjvevO0CBGFF6Ps65z3FmrrnmPTMqLy6uGSyGYRgCAAAAYBq73C4AAAAAyOsI3QAAAIDJCN0AAACAyQjdAAAAgMkI3QAAAIDJCN0AAACAyQjdAAAAgMkccrsAIC9KTU3V+fPn5eHhIYvFktvlAACATDAMQ9euXVOxYsVkZ5ezY9OEbsAE58+fl5+fX26XAQAAsuG3337Tk08+maN9EroBE3h4eEj68x+tp6dnLlcDAAAyIzExUX5+ftav4zmJ0A2Y4N6UEk9PT0I3AACPGTOmhvIgJQAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJeGQiYKDDwV9nZ5fy7PgEAyC1nzvjndgmPJUa6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboBAAAAkxG6AQAAAJMRugEAAACTEboB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Jho/S4dAAD8ycPDQ5999pk+++yzDNv4+Pho3rx59+0nMjLSZtnBwUEjRozQiBEjMtynUaNGj+VUE95egkdWqVKltH//fjVu3FhDhgxR5cqV1axZM0VERGjmzJmmHXfOnDm6cuWKatSooW7duql///4qUqSIaccDAAB5H28vAUxw7+ln3l4CAMhrzpzxz+0STGPm20sY6QYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATEboBgAAAExG6AYAAABMRugGAAAATOaQ2wUAednhwyXk6emZ22UAAIBcxkg3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMkI3AAAAYDJCNwAAAGAyQjcAAABgMofcLgDIywIDf5WdnUdul/GPnTnjn9slAADwWGOkGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwAAADAZoRsAAAAwGaEbAAAAMBmhGwA
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = country_collab\n",
"data[\"percent_round\"] = (data[\"percent\"]*100).round(2)\n",
"g = sns.barplot(data, x=\"percent_round\", y=\"Country\", color=\"blue\")\n",
"g.set_xlim(0,100)\n",
"g.set_ylabel(\"Country\")\n",
"g.set_xlabel(\"Percentage of co-patents\")\n",
"for i in g.containers:\n",
" # g.bar_label(i,fmt='%.2f%%')\n",
" g.bar_label(i,fmt='%.2f')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 184,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " Country count percent weight\n0 Germany 9725 0.390139 0.182650\n1 France 4381 0.175753 0.082282\n2 Sweden 3667 0.147110 0.068872\n3 Netherlands 2900 0.116340 0.054466\n4 Finland 1644 0.065953 0.030877\n5 Belgium 1028 0.041240 0.019307\n6 Italy 1000 0.040117 0.018781\n7 Denmark 705 0.028283 0.013241\n8 Spain 678 0.027199 0.012734\n9 Austria 484 0.019417 0.009090\n10 Ireland 469 0.018815 0.008809\n11 Poland 289 0.011594 0.005428\n12 Greece 234 0.009387 0.004395\n13 Luxembourg 146 0.005857 0.002742\n14 Portugal 111 0.004453 0.002085\n15 Hungary 75 0.003009 0.001409\n16 Czechia 72 0.002888 0.001352\n17 Bulgaria 69 0.002768 0.001296\n18 Romania 68 0.002728 0.001277\n19 Slovakia 43 0.001725 0.000808\n20 Cyprus 35 0.001404 0.000657\n21 Slovenia 28 0.001123 0.000526\n22 Croatia 25 0.001003 0.000470\n23 Malta 15 0.000602 0.000282\n24 Estonia 11 0.000441 0.000207\n25 Lithuania 8 0.000321 0.000150\n26 Latvia 6 0.000241 0.000113",
"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>Country</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>Germany</td>\n <td>9725</td>\n <td>0.390139</td>\n <td>0.182650</td>\n </tr>\n <tr>\n <th>1</th>\n <td>France</td>\n <td>4381</td>\n <td>0.175753</td>\n <td>0.082282</td>\n </tr>\n <tr>\n <th>2</th>\n <td>Sweden</td>\n <td>3667</td>\n <td>0.147110</td>\n <td>0.068872</td>\n </tr>\n <tr>\n <th>3</th>\n <td>Netherlands</td>\n <td>2900</td>\n <td>0.116340</td>\n <td>0.054466</td>\n </tr>\n <tr>\n <th>4</th>\n <td>Finland</td>\n <td>1644</td>\n <td>0.065953</td>\n <td>0.030877</td>\n </tr>\n <tr>\n <th>5</th>\n <td>Belgium</td>\n <td>1028</td>\n <td>0.041240</td>\n <td>0.019307</td>\n </tr>\n <tr>\n <th>6</th>\n <td>Italy</td>\n <td>1000</td>\n <td>0.040117</td>\n <td>0.018781</td>\n </tr>\n <tr>\n <th>7</th>\n <td>Denmark</td>\n <td>705</td>\n <td>0.028283</td>\n <td>0.013241</td>\n </tr>\n <tr>\n <th>8</th>\n <td>Spain</td>\n <td>678</td>\n <td>0.027199</td>\n <td>0.012734</td>\n </tr>\n <tr>\n <th>9</th>\n <td>Austria</td>\n <td>484</td>\n <td>0.019417</td>\n <td>0.009090</td>\n </tr>\n <tr>\n <th>10</th>\n <td>Ireland</td>\n <td>469</td>\n <td>0.018815</td>\n <td>0.008809</td>\n </tr>\n <tr>\n <th>11</th>\n <td>Poland</td>\n <td>289</td>\n <td>0.011594</td>\n <td>0.005428</td>\n </tr>\n <tr>\n <th>12</th>\n <td>Greece</td>\n <td>234</td>\n <td>0.009387</td>\n <td>0.004395</td>\n </tr>\n <tr>\n <th>13</th>\n <td>Luxembourg</td>\n <td>146</td>\n <td>0.005857</td>\n <td>0.002742</td>\n </tr>\n <tr>\n <th>14</th>\n <td>Portugal</td>\n <td>111</td>\n <td>0.004453</td>\n <td>0.002085</td>\n </tr>\n <tr>\n <th>15</th>\n <td>Hungary</td>\n <td>75</td>\n <td>0.003009</td>\n <td>0.001409</td>\n </tr>\n <tr>\n <th>16</th>\n <td>Czechia</td>\n <td>72</td>\n <td>0.002888</td>\n <td>0.001352</td>\n </tr>\n <tr>\n <th>17</th>\n <td>Bulgaria</td>\n <td>69</td>\n <td>0.002768</td>\n <td>0.001296</td>\n </tr>\n <tr>\n <th>18</th>\n <td>Romania</td>\n <td>68</td>\n <td>0.002728</td>\n <td>0.001277</td>\n </tr>\n <tr>\n <th>19</th>\n <td>Slovakia</td>\n <td>43</td>\n <td>0.001725</td>\n <td>0.000808</td>\n </tr>\n <tr>\n <th>20</th>\n <td>Cyprus</td>\n <td>35</td>\n <td>0.001404</td>\n <td>0.000657</td>\n </tr>\n <tr>\n <th>21</th>\n <td>Slovenia</td>\n <td>28</td>\n <td>0.001123</td>\n <td>0.000526</td>\n </tr>\n <tr>\n <th>22</th>\n <td>Croatia</td>\n <td>25</td>\n <td>0.001003</td>\n <td>0.000470</td>\n </tr>\n <tr>\n <th>23</th>\n <td>Malta</td>\n <td>15</td>\n <td>0.000602</td>\n <td>0.000282</td>\n </tr>\n <tr>\n <th>24</th>\n <td>Estonia</td>\n <td>11</td>\n <td>0.000441</td>\n <td>0.000207</td>\n </tr>\n <tr>\n <th>25</th>\n <td>Lithuania</td>\n <td>8</td>\n <td>0.000321</td>\n <td>0.000150</td>\n </tr>\n <tr>\n <th>26</th>\n <td>Latvia</td>\n <td>6</td>\n <td>0.000241</td>\n <td>0.000113</td>\
2 years ago
},
2 years ago
"execution_count": 184,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"country_collab = patstat_collabs[~patstat_collabs[\"Country\"].isin(ch_names)][\"Country\"].value_counts().reset_index()\n",
"country_collab[\"percent\"] = country_collab[\"count\"]/patstat_collabs[\"appln_id\"].nunique()\n",
"country_collab[\"weight\"] = country_collab[\"count\"]/patstat_collabs[\"appln_id\"].size\n",
"country_collab"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 185,
2 years ago
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAo0AAAGxCAYAAAAH/Yw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4ZQpUyZL16avKB8XFydJoxBCCPEfkdu/319sT+OXKiUlhUePHvHbb7/x7bffZjlhFEIIIYT4EJI0/sccOnSIatWqUaxYMY21JD+Eq+tN2XtaiBxy44ZDhrJx48YRGBjIzz//zLRp0wDo3LkzO3fu5N69e5iYmFCpUiXGjx9PiRIllOvCw8P59ddfOXnyJCqVivLlyzNhwgTc3d0BePHiBV26dOHkyZNcvHiRunXrsmHDhk/wlEKIr8kXOxEmO6QvmP3vI6uLYWYnLy8v1Go1ly9f1lgTUgjxeQsPD2fevHka67ACyrpqFy9eVJbeqFWrFqmpqcCrVRZ8fX2xt7fn2LFjHDx4EFNTU3x8fEhJSQEgNTUVQ0NDevXqhbe39yd/NiHE10F6Gt/B19eX4OBgjbJ/L/SdnJyMnp7epwxLCPEfkpCQQMuWLVmwYAGjRo3SONepUyflbwcHB0aNGoW7u7vy3vKlS5d4/PgxI0aMUHZzGjZsGG5ubty8eRMnJyeMjY2ZM2cO8Go0IjY29pM9mxDi6yE9je+gr6+PjY2NxlGjRg169OhB7969yZcvHz4+PsCr2dGurq4YGxtjZ2dHt27dSEhIUNoKCQnB3Nycbdu24eLigomJCb6+vhk2JV+8eDGlSpVCX18fW1tbjf2rY2Nj6dChA1ZWVuTJk4fq1atz5syZT/NlCCE+SPfu3alTp847ewETExMJDg7G0dFRSRCLFy+OpaUlixYtIjk
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAo0AAAGxCAYAAAAH/YwGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAADHrklEQVR4nOzdd1RVR/fw8e+lV0EQARUEBRUNIIoaNVFUFLDEFo1dFHuLGkvQqNh7ib0DtlhiCbH33rBgeewodsSogKACwn3/8OX8vAELCm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Dhk/wlEKIr8kXOxEmO6QvmP3vI6uLYWYnLy8v1Go1ly9f1lgTUgjxeQsPD2fevHka67ACyrpqFy9eVJbeqFWrFqmpqcCrVRZ8fX2xt7fn2LFjHDx4EFNTU3x8fEhJSQEgNTUVQ0NDevXqhbe39yd/NiHE10F6Gt/B19eX4OBgjbJ/L/SdnJyMnp7epwxLCPEfkpCQQMuWLVmwYAGjRo3SONepUyflbwcHB0aNGoW7u7vy3vKlS5d4/PgxI0aMUHZzGjZsGG5ubty8eRMnJyeMjY2ZM2cO8Go0IjY29pM9mxDi6yE9je+gr6+PjY2NxlGjRg169OhB7969yZcvHz4+PsCr2dGurq4YGxtjZ2dHt27dSEhIUNoKCQnB3Nycbdu24eLigomJCb6+vhk2JV+8eDGlSpVCX18fW1tbjf2rY2Nj6dChA1ZWVuTJk4fq1atz5syZT/NlCCE+SPfu3alTp847ewETExMJDg7G0dFRSRCLFy+OpaUlixYtIjk
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = country_collab\n",
"g = sns.barplot(data, x=\"count\", y=\"Country\", color=\"blue\")\n",
2 years ago
"g.set_xlim(0,10000)\n",
2 years ago
"g.set_ylabel(\"Country\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 186,
2 years ago
"outputs": [
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAGxCAYAAADyAwe2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAADODElEQVR4nOzde1zP5//48ce7cyo5pUIpimKdFH2wOUxUaNiGYSqnzZlZWM7HYsPYGHPMjDEbZo6jiTkrchhziOTQwbEUq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SeCEdchbH/eeff5TPCQkJjBw5kl27dvHgwQPq1q3L2LFj+eCDD56vY0II8YKVqXUAiyt3ceX/HrlT1l+GFi1aoFarOX/+vMaag0KUJWlpabi4uLBgwYJ8r8fHx2scy5cvR6VSPTVRq1+/vka9/+516u/vz/nz59m8eTOnT5/m/fffp0uXLpw4caLE+iaEEC+CjAA+hY+PDytWrNA4999FoTMyMtDT03uRYQlRpvn6+uLr61vg9f/uNvDbb7/RsmXLAncuyKWjo1PoTgUHDx5k4cKFNGrUCIBx48bx9ddfExUVhZubWzF6IIQQL5eMAD6Fvr4+FhYWGkerVq0YPHgww4cPp0qVKnh7ewM5s3ydnJwwMjLCysqKgQMHkpqaqrQVFhZGhQoV2LlzJ46OjhgbG+Pj45NnQ+3ly5dTv3599PX1sbS01JhGf//+ffr27YuZmRnly5fn3Xff5eTJky/myxDiNZSYmMjWrVvp06fPU8tevHiRatWqUatWLXr06JFnl54
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = country_collab\n",
"data[\"percent_round\"] = (data[\"percent\"]*100).round(2)\n",
"g = sns.barplot(data, x=\"percent_round\", y=\"Country\", color=\"blue\")\n",
2 years ago
"g.set_xlim(0,50)\n",
2 years ago
"g.set_ylabel(\"Country\")\n",
"g.set_xlabel(\"Percentage of co-patents\")\n",
"for i in g.containers:\n",
" # g.bar_label(i,fmt='%.2f%%')\n",
" g.bar_label(i,fmt='%.2f')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"# Pivot country - year"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 187,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_id Country appln_filing_year\n0 330225325 Germany 2011\n1 330225325 China 2011\n2 330322632 Germany 2011\n3 330322632 China 2011\n4 330350961 Sweden 2011\n... ... ... ...\n53239 575355937 China 2017\n53240 575399552 Sweden 2020\n53241 575399552 China 2020\n53242 575406608 Germany 2014\n53243 575406608 China 2014\n\n[53244 rows x 3 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>appln_id</th>\n <th>Country</th>\n <th>appln_filing_year</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>330225325</td>\n <td>Germany</td>\n <td>2011</td>\n </tr>\n <tr>\n <th>1</th>\n <td>330225325</td>\n <td>China</td>\n <td>2011</td>\n </tr>\n <tr>\n <th>2</th>\n <td>330322632</td>\n <td>Germany</td>\n <td>2011</td>\n </tr>\n <tr>\n <th>3</th>\n <td>330322632</td>\n <td>China</td>\n <td>2011</td>\n </tr>\n <tr>\n <th>4</th>\n <td>330350961</td>\n <td>Sweden</td>\n <td>2011</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>53239</th>\n <td>575355937</td>\n <td>China</td>\n <td>2017</td>\n </tr>\n <tr>\n <th>53240</th>\n <td>575399552</td>\n <td>Sweden</td>\n <td>2020</td>\n </tr>\n <tr>\n <th>53241</th>\n <td>575399552</td>\n <td>China</td>\n <td>2020</td>\n </tr>\n <tr>\n <th>53242</th>\n <td>575406608</td>\n <td>Germany</td>\n <td>2014</td>\n </tr>\n <tr>\n <th>53243</th>\n <td>575406608</td>\n <td>China</td>\n <td>2014</td>\n </tr>\n </tbody>\n</table>\n<p>53244 rows × 3 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 187,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"record_col = \"appln_id\"\n",
"patstat_collabs_y=patstat_collabs.merge(appln[[record_col,\"appln_filing_year\"]], on=\"appln_id\")\n",
"patstat_collabs_y"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 188,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_filing_year Country count appln_id percent\n0 2011 China 1719 1969 0.873032\n5 2011 Taiwan Province Of China 195 1969 0.099035\n9 2011 Hong Kong, China 75 1969 0.038090\n24 2011 Macao SAR (China) 3 1969 0.001524\n27 2012 China 2101 2425 0.866392\n31 2012 Taiwan Province Of China 297 2425 0.122474\n37 2012 Hong Kong, China 60 2425 0.024742\n53 2013 China 1970 2226 0.884996\n58 2013 Taiwan Province Of China 221 2226 0.099281\n63 2013 Hong Kong, China 47 2226 0.021114\n73 2013 Macao SAR (China) 4 2226 0.001797\n79 2014 China 2172 2427 0.894932\n84 2014 Taiwan Province Of China 236 2427 0.097239\n91 2014 Hong Kong, China 39 2427 0.016069\n105 2014 Macao SAR (China) 1 2427 0.000412\n106 2015 China 2079 2378 0.874264\n111 2015 Taiwan Province Of China 275 2378 0.115643\n117 2015 Hong Kong, China 48 2378 0.020185\n130 2015 Macao SAR (China) 1 2378 0.000421\n132 2016 China 2201 2477 0.888575\n137 2016 Taiwan Province Of China 255 2477 0.102947\n144 2016 Hong Kong, China 54 2477 0.021801\n160 2016 Macao SAR (China) 2 2477 0.000807\n161 2017 China 2417 2654 0.910701\n166 2017 Taiwan Province Of China 211 2654 0.079503\n171 2017 Hong Kong, China 55 2654 0.020723\n188 2018 China 2596 2859 0.908010\n193 2018 Taiwan Province Of China 252 2859 0.088143\n199 2018 Hong Kong, China 68 2859 0.023785\n215 2019 China 2460 2725 0.902752\n220 2019 Taiwan Province Of China 269 2725 0.098716\n228 2019 Hong Kong, China 61 2725 0.022385\n238 2019 Macao SAR (China) 4 2725 0.001468\n243 2020 China 1718 1963 0.875191\n248 2020 Taiwan Province Of China 249 1963 0.126847\n254 2020 Hong Kong, China 59 1963 0.030056\n269 2020 Macao SAR (China) 2 1963 0.001019\n271 2021 China 694 813 0.853629\n274 2021 Taiwan Province Of China 133 813 0.163592\n286 2021 Hong Kong, China 13 813 0.015990\n297 2022 China 10 11 0.909091\n300 2022 Hong Kong, China 2 11 0.181818",
"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>appln_filing_year</th>\n <th>Country</th>\n <th>count</th>\n <th>appln_id</th>\n <th>percent</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>2011</td>\n <td>China</td>\n <td>1719</td>\n <td>1969</td>\n <td>0.873032</td>\n </tr>\n <tr>\n <th>5</th>\n <td>2011</td>\n <td>Taiwan Province Of China</td>\n <td>195</td>\n <td>1969</td>\n <td>0.099035</td>\n </tr>\n <tr>\n <th>9</th>\n <td>2011</td>\n <td>Hong Kong, China</td>\n <td>75</td>\n <td>1969</td>\n <td>0.038090</td>\n </tr>\n <tr>\n <th>24</th>\n <td>2011</td>\n <td>Macao SAR (China)</td>\n <td>3</td>\n <td>1969</td>\n <td>0.001524</td>\n </tr>\n <tr>\n <th>27</th>\n <td>2012</td>\n <td>China</td>\n <td>2101</td>\n <td>2425</td>\n <td>0.866392</td>\n </tr>\n <tr>\n <th>31</th>\n <td>2012</td>\n <td>Taiwan Province Of China</td>\n <td>297</td>\n <td>2425</td>\n <td>0.122474</td>\n </tr>\n <tr>\n <th>37</th>\n <td>2012</td>\n <td>Hong Kong, China</td>\n <td>60</td>\n <td>2425</td>\n <td>0.024742</td>\n </tr>\n <tr>\n <th>53</th>\n <td>2013</td>\n <td>China</td>\n <td>1970</td>\n <td>2226</td>\n <td>0.884996</td>\n </tr>\n <tr>\n <th>58</th>\n <td>2013</td>\n <td>Taiwan Province Of China</td>\n <td>221</td>\n <td>2226</td>\n <td>0.099281</td>\n </tr>\n <tr>\n <th>63</th>\n <td>2013</td>\n <td>Hong Kong, China</td>\n <td>47</td>\n <td>2226</td>\n <td>0.021114</td>\n </tr>\n <tr>\n <th>73</th>\n <td>2013</td>\n <td>Macao SAR (China)</td>\n <td>4</td>\n <td>2226</td>\n <td>0.001797</td>\n </tr>\n <tr>\n <th>79</th>\n <td>2014</td>\n <td>China</td>\n <td>2172</td>\n <td>2427</td>\n <td>0.894932</td>\n </tr>\n <tr>\n <th>84</th>\n <td>2014</td>\n <td>Taiwan Province Of China</td>\n <td>236</td>\n <td>2427</td>\n <td>0.097239</td>\n </tr>\n <tr>\n <th>91</th>\n <td>2014</td>\n <td>Hong Kong, China</td>\n <td>39</td>\n <td>2427</td>\n <td>0.016069</td>\n </tr>\n <tr>\n <th>105</th>\n <td>2014</td>\n <td>Macao SAR (China)</td>\n <td>1</td>\n <td>2427</td>\n <td>0.000412</td>\n </tr>\n <tr>\n <th>106</th>\n <td>2015</td>\n <td>China</td>\n <td>2079</td>\n <td>2378</td>\n <td>0.874264</td>\n </tr>\n <tr>\n <th>111</th>\n <td>2015</td>\n <td>Taiwan Province Of China</td>\n <td>275</td>\n <td>2378</td>\n <td>0.115643</td>\n </tr>\n <tr>\n <th>117</th>\n <td>2015</td>\n <td>Hong Kong, China</td>\n <td>48</td>\n <td>2378</td>\n <td>0.020185</td>\n </tr>\n <tr>\n <th>130</th>\n <td>2015</td>\n <td>Macao SAR (China)</td>\n <td>1</td>\n <td>2378</td>\n <td>0.000421</td>\n </tr>\n <tr>\n <th>132</th>\n <td>2016</td>\n <td>China</td>\n <td>2201</td>\n <td>2477</td>\n <td>0.888575</td>\n </tr>\n <tr>\n <th>137</th>\n <td>2016</td>\n <td>Taiwan Province Of China</td>\n <td>255</td>\n <td>2477</td>\n <td>0.102947</td>\n </tr>\n <tr>\n <th>144</th>\n <td>2016</td>\n <td>Hong Kong, China</td>\n <td>54</td>\n <td>2477</td>\n <td>0.021801</td>\n </tr>\n <tr>\n <th>160</th>\n <td>2016</td>\n
2 years ago
},
2 years ago
"execution_count": 188,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"countall = patstat_collabs_y.groupby(\"appln_filing_year\", as_index=False)[record_col].nunique()\n",
"data = patstat_collabs_y.groupby(\"appln_filing_year\", as_index=False)[\"Country\"].value_counts().merge(countall, on=\"appln_filing_year\")\n",
"data[\"percent\"] = data[\"count\"]/data[record_col]\n",
"data_ch = data[data[\"Country\"].isin(ch_names)]\n",
"data_ch"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 189,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(95.7222222222222, 0.5, '')"
},
2 years ago
"execution_count": 189,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 1000x300 with 2 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5gAAAEpCAYAAAD2wY1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAACpPElEQVR4nOzddVgV2RvA8e+lS0AkbezCwu5GZe21XVvXXjt27c611lwDu3Pt7g5EMVZRRBFQQURAen5/sF69ggpeFOT3fnzmebwzZ2bec+feubxzzpxRKYqiIIQQQgghhBBCaEkntQMQQgghhBBCCJE+SIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBBCCCGEECJFSIIphBAi1Zw4cQKVSsXWrVtTO5QkCQgI4OeffyZTpkyoVCrmzJmT2iEJIYQQaYokmEIIkc65ubmhUqkwMjLC19c3wfJq1apRpEiRVIjsxzNgwAAOHjzIiBEjWLNmDXXr1k3tkFJUeHg4Y8eO5cSJE99lfwsXLsTNze277EsIIcT3oZfaAQghhPg+IiMjmTp1KvPnz0/tUH5Yx44do1GjRgwePDi1Q/kmwsPDG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u3YtHTt2pHHjxgwZMgRbW1t0dXWZMmUKXl5eX1z/3fs/ePBgXFxcEi3zcaKszfGvUqUKXl5e7Nq1i0OHDrFs2TJmz57N4sWLNVrLv9a
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,3))\n",
"g = sns.heatmap(pd.pivot_table(data_ch,columns=\"appln_filing_year\", index=\"Country\", values=\"count\").fillna(0).astype(int),\n",
" annot=True, fmt=\".0f\",linewidth=.5)\n",
"g.set_title(\"Number of co-patents per year\")\n",
"g.set_xlabel(\"\")\n",
"g.set_ylabel(\"\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 190,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(95.7222222222222, 0.5, '')"
},
2 years ago
"execution_count": 190,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 1000x300 with 2 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA4YAAAEpCAYAAADPpjwfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAC7rElEQVR4nOzddVwVWRvA8R8gjSjSICIiNopid3fXa661dnes3d21dmG7dnd3dyMGgooJAgLz/oFcvVKXEpXnu5/7WZk5c+Y8U/eeOWfOaCmKoiCEEEIIIYQQIsXSTu4CCCGEEEIIIYRIXlIxFEIIIYQQQogUTiqGQgghhBBCCJHCScVQCCGEEEIIIVI4qRgKIYQQQgghRAonFUMhhBBCCCGESOGkYiiEEEIIIYQQKZxUDIUQQgghhBAihZOKoRBCCCGEEEKkcFIxFEIIobE9e/bg5uaGgYEBWlpavHv3LrmLJBJZxowZadmyZXIXQ83w4cPR0tJK7mIIIcQfTSqGQohksWzZMrS0tFQfAwMDsmTJQpcuXfDx8Unu4iXYrVu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hEdx7E5RhxdHRUWrRoofo7MDAw0r54/Pixoq+vr4wcOTLWeMLCwhQXFxelUqVKqn2vKOH7xMnJSalQoYJqWu3atRUDAwPlyZMnqmm3bt1SdHR0FE1+slSrVk1xdHSMNH369OkKoKxatUo1LTg4WClSpIhiYmKifPjwIdo83717p6ROnVopVKiQ2jkSEVtEXpqeR6VKlVI7fyO0aNFCrewRx7e5ubni5+enmr5161YFULZv366a1rlz5yi3T0Qepqamiq+
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,3))\n",
"g = sns.heatmap(pd.pivot_table(data_ch,columns=\"appln_filing_year\", index=\"Country\", values=\"percent\").fillna(0)*100,\n",
" annot=True, fmt=\".2f\",linewidth=.5)\n",
"g.set_title(\"Percentage of co-patents related to country per year\")\n",
"g.set_xlabel(\"\")\n",
"g.set_ylabel(\"\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 191,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_filing_year Country count appln_id percent\n1 2011 Germany 745 1969 0.378365\n2 2011 France 407 1969 0.206704\n3 2011 Netherlands 220 1969 0.111732\n4 2011 Sweden 209 1969 0.106145\n6 2011 Finland 166 1969 0.084307\n.. ... ... ... ... ...\n298 2022 Spain 4 11 0.363636\n299 2022 Germany 3 11 0.272727\n301 2022 Netherlands 2 11 0.181818\n302 2022 Italy 1 11 0.090909\n303 2022 Denmark 1 11 0.090909\n\n[262 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>appln_filing_year</th>\n <th>Country</th>\n <th>count</th>\n <th>appln_id</th>\n <th>percent</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>1</th>\n <td>2011</td>\n <td>Germany</td>\n <td>745</td>\n <td>1969</td>\n <td>0.378365</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2011</td>\n <td>France</td>\n <td>407</td>\n <td>1969</td>\n <td>0.206704</td>\n </tr>\n <tr>\n <th>3</th>\n <td>2011</td>\n <td>Netherlands</td>\n <td>220</td>\n <td>1969</td>\n <td>0.111732</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2011</td>\n <td>Sweden</td>\n <td>209</td>\n <td>1969</td>\n <td>0.106145</td>\n </tr>\n <tr>\n <th>6</th>\n <td>2011</td>\n <td>Finland</td>\n <td>166</td>\n <td>1969</td>\n <td>0.084307</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>298</th>\n <td>2022</td>\n <td>Spain</td>\n <td>4</td>\n <td>11</td>\n <td>0.363636</td>\n </tr>\n <tr>\n <th>299</th>\n <td>2022</td>\n <td>Germany</td>\n <td>3</td>\n <td>11</td>\n <td>0.272727</td>\n </tr>\n <tr>\n <th>301</th>\n <td>2022</td>\n <td>Netherlands</td>\n <td>2</td>\n <td>11</td>\n <td>0.181818</td>\n </tr>\n <tr>\n <th>302</th>\n <td>2022</td>\n <td>Italy</td>\n <td>1</td>\n <td>11</td>\n <td>0.090909</td>\n </tr>\n <tr>\n <th>303</th>\n <td>2022</td>\n <td>Denmark</td>\n <td>1</td>\n <td>11</td>\n <td>0.090909</td>\n </tr>\n </tbody>\n</table>\n<p>262 rows × 5 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 191,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_eu = data[~data[\"Country\"].isin(ch_names)]\n",
"data_eu"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 192,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(95.72222222222221, 0.5, '')"
},
2 years ago
"execution_count": 192,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 1000x1000 with 2 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1oAAANECAYAAACpfl51AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzddVwU+R/H8dciiICECggmYJ7d3Xp2t57drWe36Nkdp94ZZ59n95lYZyMG2IoiiKQIikHu7w9+7rmCAS4M7H2ej8c8Huzk+7szO8t35zvfUanVajVCCCGEEEIIIXTGQOkAQgghhBBCCKFvpKIlhBBCCCGEEDomFS0hhBBCCCGE0DGpaAkhhBBCCCGEjklFSwghhBBCCCF0TCpaQgghhBBCCKFjUtESQgghhBBCCB2TipYQQgghhBBC6JhUtIQQQgghhBBCx6SiJYQQn3H69GlUKhU7d+5UOso3CQgIoHXr1mTJkgWVSsXixYuVjiSEEEL8Z0lFSwihqPXr16NSqciQIQO+vr7xpteoUYMiRYookCzt+fnnnzl69Cjjxo1j06ZN1K9fX+lIOvX27VucnZ05ffp0imxvxYoVrF+/PkW2JYQQQv8YKh1ACCEAIiIimD17NsuWLVM6Spp18uRJmjVrxsiRI5WOkizevn3L1KlTgbgKeHJbsWIF1tbWdOvWLdm3JYQQQv/IFS0hRKpQokQJVq9ezfPnz5WOkuLevHmjk/UEBgZiZWWlk3WJtEtXx1Nye//+PbGxsUrHEEKIZCMVLSFEqjB+/HhiYmKYPXv2F+fz8vJCpVIl2KRLpVLh7Oysee3s7IxKpeLBgwd06tQJS0tLbGxsmDRpEmq1Gh8fH5o1a4aFhQV2dnYsWLAgwW3GxMQwfvx47OzsMDMzo2nTpvj4+MSb7/Lly9SvXx9LS0tMTU2pXr0658+f15rnQ6Y7d+7QsWNHMmXKRJUqVb5Y5sePH9OmTRsyZ86MqakpFS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XiUJCQjh58iRt27bl9evXmvf/xYsX1KtXj4cPH8br0bJPnz5azSurVq1KTEwMT58+/er2rKysuH37Ng8fPvym9+BTffr0wcjISPO6f//+GBoaat7z48ePExoaSocOHTRlCQ4OJl26dJQvX16rSeXH6/gWXbp0ISIiQuuRBdu2bSM6OppOnToBiXs/jY2NMTCI+1ciJiaGFy9ekDFjRgoUKJDgvuvatSsmJibf+E4JIUTaJhUtIUSqMnHiRKKjo796r1Zi5MqVS+u1paUlGTJkwNraOt74hO6VyZcvn9ZrlUpF3rx5NU24PvzD3bVrV2xsbLSGNWvWEBERQVhYmNY6HB0dvyn706dPKVCgQLzxP/zwg2Z6Ynl6epItWzYyZ878xe0aGBiQN29erfF2dnZYWVlptvvu3Tv8/f21ho9ly5YNMzMzrXH58+cH0GoCt2HDBooVK6a558nGxoZDhw7Fe98S8ujRI9RqNZMmTYr3/n+oTAYGBmot8+kxkSlTJoAE9/+npk2bRmhoKPnz56do0aKMGjUKd3f3ry73wafHU8aMGbG3t493PNWqVSteeY4dOxavLIaGhuTIkeObtl2wYEHKli2r1Xxwy5YtVKhQQbOvE/N+xsbGsmjRIvLly4exsTHW1tbY2Njg7u6e4L771uNeCCH0gXTvLoRIVZycnOjUqROrVq1i7Nix8aZ/rpOHmJiYz64zXbp03zQO0LpP5lt9uFo1b948SpQokeA8GTNm1HqdVn7V/1qnGtu2baN79+5a4xL7Hm7evJlu3brRvHlzRo0aha2tLenSpWPWrFl4enp+dfkP7//IkSOpV69egvN8WmH8nv1frVo1PD092bdvH8eOHWPNmjUsWrS
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,10))\n",
"g = sns.heatmap(pd.pivot_table(data_eu,columns=\"appln_filing_year\", index=\"Country\", values=\"count\").fillna(0).astype(int),\n",
" annot=True, fmt=\".0f\",linewidth=.5)\n",
"g.set_title(\"Number of co-patents per year\")\n",
"g.set_xlabel(\"\")\n",
"g.set_ylabel(\"\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 193,
2 years ago
"outputs": [
{
"data": {
"text/plain": "Text(95.72222222222221, 0.5, '')"
},
2 years ago
"execution_count": 193,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 1000x1000 with 2 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANECAYAAACKJQ+gAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzddVgUXRvA4d8iISGiUooFdgd2d2ILdnd3F3Zg96vyYhfWaycmFoICoiJIGJQFEkrIfn8Aqysh6K4g37mvay9l9szM8+ycmd0zc+aMRCqVShEEQRAEQRAEQRBQyewABEEQBEEQBEEQsgrRQBIEQRAEQRAEQUgkGkiCIAiCIAiCIAiJRANJEARBEARBEAQhkWggCYIgCIIgCIIgJBINJEEQBEEQBEEQhESigSQIgiAIgiAIgpBINJAEQRAEQRAEQRASiQaSIAiCIAiCIAhCItFAEgQh2zh//jyVK1cmZ86cSCQSQkNDMzskQcGKFi1K//79MzsMOdbW1kgkkswOQxAEQVAQ0UAShBTs3LkTiUQie+XMmZOSJUsyevRogoODMzu83/bkyROsra3x8/PL7FAU5v3791hZWaGpqcmmTZvYs2cP2tramR2WQt2+fRtra+s/0vALCAjA2tqaR48eKX1df0JWyGf//v2sXbs209afWc6ePYu1tXVmhyEIgpBuooEkCGlYsGABe/bsYePGjdSpU4ctW7ZQu3ZtoqKiMju03/LkyRPmz5+frRpITk5OhIeHs3DhQgYNGkTv3r1RU1PL7LAU6vbt28yfP/+PNZDmz5+frRpImZ3P/3MDaf78+ZkdhiAIQrqpZnYAgpCVtW7dmmrVqgEwePBg8uXLx+rVq/nvv//o0aPHby07KioKLS0tRYQpACEhIQDo6ellbiBChoj9QPheXF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hwoXp1KkThw4dYvXq1eTIkUNW9sCBA0ilUnr16vXT2NKz73l4eFC3bl1MTEyYPn062traHD58mI4dO3L06NFk+/nIkSMxMDBg7ty5REZGprheHR2ddMcfFRVFw4YNefPmDcOGDaNw4cLcvn2bGTNmEBgYKNclc926dbRv355evXoRExPDwYMHsbS05PTp07Rt21YuBgcHBw4fPszo0aPR19eXa9wKgpAOUkEQkrGzs5MC0suXL0vfvn0rffXqlfTgwYPSfPnySTU1NaWvX7+W+vn5SXPkyCFdvHix3Lzu7u5SVVVVuekNGzaUAtKtW7fKlf3333+lgHT16tXJYoiPj5dKpVLpzZs3pYB03759cu+fP38+2fQiRYpIAemNGzdk00JCQqQaGhrSSZMmyabZ29tLAenVq1eTrTcqKirZtGHDhkm1tLSkX758kUqlUml0dLQ0X7580urVq0tjY2Nl5Xbu3CkFpA0bNpRN27Nnj1RFRUV68+ZNuWVu3bpVCkgdHR2TrS9JTEyM1NDQUFq+fHnp58+fZdNPnz4tBaRz586VTUvaZk5OTqkuL0nfvn2lKioqKZZN+tzHjx8vBeTiDg8Pl5qamkqLFi0q/fr1a5rr8PX1lQKy+pLk3r17UkA6YcIE2bSUPvMDBw4k25Y2NjZSQOrr6ytX9lfq4u7du2XToqOjpcbGxtIuXbrIpjk5OUkBqZ2dndwyHz58KAWk9vb2aeafktT2g4zUkSJFikj79esn+/vLly/JtoWvr69UQ0NDumDBgp/mEx8fLy1RooS0ZcuWsm0vlSZsE1NTU2nz5s1l0zp27CjNmTOn1N/fXzbtyZMn0hw5ckjT83Xatm1baZEiRZJNX7t2rRSQ7t27VzYtJiZGWrt2bamOjo7006dPqS4zNDRUmitXLmnNmjXl9pGk3JKWld79qGHDhnL7b5J+/frJxZ5Uv/Plyyf98OGDbPp///0nBaSnTp2STRs
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,10))\n",
"g = sns.heatmap(pd.pivot_table(data_eu,columns=\"appln_filing_year\", index=\"Country\", values=\"percent\").fillna(0)*100,\n",
" annot=True, fmt=\".2f\",linewidth=.5)\n",
"g.set_title(\"Percentage of co-patents related to country per year\")\n",
"g.set_xlabel(\"\")\n",
"g.set_ylabel(\"\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"# Let's see about 'organizations'"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 194,
2 years ago
"outputs": [],
"source": [
"# harmonized entities (sector and country too)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 195,
2 years ago
"outputs": [],
"source": [
"pers_han = pers[[\"person_id\",\"han_id\",\"han_name\",\"psn_sector\",\"person_ctry_code\"]].drop_duplicates()\n",
"pers_han[\"psn_sector\"].fillna(\"UNKNOWN\", inplace=True)\n",
"pers_han = pers_han.sort_values(by=\"psn_sector\", ascending=True)\n",
"pers_han.drop(columns=\"person_id\", inplace=True)\n",
"pers_han = pers_han.groupby(\"han_id\", as_index=False)[[\"han_name\",\"psn_sector\",\"person_ctry_code\"]].agg(\n",
" lambda x: pd.Series.mode(x)[0])\n",
"pers_han = pers_han.merge(country_defs,left_on=\"person_ctry_code\",right_on=\"ctry_code\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 196,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " appln_id han_id han_name psn_sector Country\n0 340314532 2125445 NOKIA CORP COMPANY Finland\n1 413601768 2125445 NOKIA CORP COMPANY Finland\n2 332888018 2125445 NOKIA CORP COMPANY Finland\n3 333546132 2125445 NOKIA CORP COMPANY Finland\n4 334765473 2125445 NOKIA CORP COMPANY Finland\n... ... ... ... ... ...\n106442 504779814 3652317 VAVILOVS VALERIJS INDIVIDUAL Latvia\n106443 544264361 3652317 VAVILOVS VALERIJS INDIVIDUAL Latvia\n106444 481190056 3652317 VAVILOVS VALERIJS INDIVIDUAL Latvia\n106445 554759601 3652317 VAVILOVS VALERIJS INDIVIDUAL Latvia\n106446 569497458 184881241 ZAVORONKOVS, ALEKSANDRS UNKNOWN Latvia\n\n[106421 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>appln_id</th>\n <th>han_id</th>\n <th>han_name</th>\n <th>psn_sector</th>\n <th>Country</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>340314532</td>\n <td>2125445</td>\n <td>NOKIA CORP</td>\n <td>COMPANY</td>\n <td>Finland</td>\n </tr>\n <tr>\n <th>1</th>\n <td>413601768</td>\n <td>2125445</td>\n <td>NOKIA CORP</td>\n <td>COMPANY</td>\n <td>Finland</td>\n </tr>\n <tr>\n <th>2</th>\n <td>332888018</td>\n <td>2125445</td>\n <td>NOKIA CORP</td>\n <td>COMPANY</td>\n <td>Finland</td>\n </tr>\n <tr>\n <th>3</th>\n <td>333546132</td>\n <td>2125445</td>\n <td>NOKIA CORP</td>\n <td>COMPANY</td>\n <td>Finland</td>\n </tr>\n <tr>\n <th>4</th>\n <td>334765473</td>\n <td>2125445</td>\n <td>NOKIA CORP</td>\n <td>COMPANY</td>\n <td>Finland</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>106442</th>\n <td>504779814</td>\n <td>3652317</td>\n <td>VAVILOVS VALERIJS</td>\n <td>INDIVIDUAL</td>\n <td>Latvia</td>\n </tr>\n <tr>\n <th>106443</th>\n <td>544264361</td>\n <td>3652317</td>\n <td>VAVILOVS VALERIJS</td>\n <td>INDIVIDUAL</td>\n <td>Latvia</td>\n </tr>\n <tr>\n <th>106444</th>\n <td>481190056</td>\n <td>3652317</td>\n <td>VAVILOVS VALERIJS</td>\n <td>INDIVIDUAL</td>\n <td>Latvia</td>\n </tr>\n <tr>\n <th>106445</th>\n <td>554759601</td>\n <td>3652317</td>\n <td>VAVILOVS VALERIJS</td>\n <td>INDIVIDUAL</td>\n <td>Latvia</td>\n </tr>\n <tr>\n <th>106446</th>\n <td>569497458</td>\n <td>184881241</td>\n <td>ZAVORONKOVS, ALEKSANDRS</td>\n <td>UNKNOWN</td>\n <td>Latvia</td>\n </tr>\n </tbody>\n</table>\n<p>106421 rows × 5 columns</p>\n</div>"
2 years ago
},
2 years ago
"execution_count": 196,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"patstat_collabs = appln_pers.merge(pers, on=\"person_id\")\n",
"patstat_collabs = patstat_collabs.merge(country_defs, left_on=\"person_ctry_code\", right_on=\"ctry_code\")\n",
"org_collabs = patstat_collabs[[record_col,\"han_id\",\"han_name\",\"psn_sector\",\"Country\"]].drop_duplicates()\n",
"org_collabs[\"psn_sector\"].fillna(\"UNKNOWN\", inplace=True)\n",
"org_collabs"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 197,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " han_id count percent weight \n0 1337324 1723 0.069122 0.016190 \\\n1 3697072 270 0.010832 0.002537 \n2 62077 204 0.008184 0.001917 \n3 1912470 130 0.005215 0.001222 \n4 2607939 101 0.004052 0.000949 \n... ... ... ... ... \n29061 151900860 1 0.000040 0.000009 \n29062 151899043 1 0.000040 0.000009 \n29063 151898719 1 0.000040 0.000009 \n29064 151894061 1 0.000040 0.000009 \n29065 183287157 1 0.000040 0.000009 \n\n han_name psn_sector person_ctry_code \n0 HUAWEI TECH CO LTD COMPANY CN \\\n1 NINGBO GEELY AUTOMOBILE R&D CO LTD COMPANY CN \n2 TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD COMPANY TW \n3 MEDIATEK INC COMPANY TW \n4 SELF ELECT CO LTD COMPANY CN \n... ... ... ... \n29061 LI, FAHONG UNKNOWN CN \n29062 ZHANG, YI UNKNOWN CN \n29063 XU, EASON UNKNOWN CN \n29064 WENG, RAN INDIVIDUAL CN \n29065 LEFEBVRE, Marc René André Louis UNKNOWN MO \n\n ctry_code iso_alpha3 Country organisation_flag \n0 CN CHN China \\\n1 CN CHN China \n2 TW TWN Taiwan Province Of China \n3 TW TWN Taiwan Province Of China \n4 CN CHN China \n... ... ... ... ... \n29061 CN CHN China \n29062 CN CHN China \n29063 CN CHN China \n29064 CN CHN China \n29065 MO MAC Macao SAR (China) \n\n continent eu_member epo_member oecd_member discontinued \n0 Asia \\\n1 Asia \n2 Asia \n3 Asia \n4 Asia \n... ... ... ... ... ... \n29061 Asia \n29062 Asia \n29063 Asia \n29064 Asia \n29065 Asia \n\n org \n0 HUAWEI TECH CO LTD (CN) \n1 NINGBO GEELY AUTOMOBILE R&D CO LTD (CN) \n2 TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD (TW) \n3 MEDIATEK INC (TW) \n4 SELF ELECT CO LTD (CN) \n... ... \n29061 LI, FAHONG (CN) \n29062 ZHANG, YI (CN) \n29063 XU, EASON (CN) \n29064 WENG, RAN (CN) \n29065 LEFEBVRE, Marc René André Louis (MO) \n\n[29066 rows x 17 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>han_id</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n <th>han_name</th>\n <th>psn_sector</th>\n <th>person_ctry_code</th>\n <th>ctry_code</th>\n <th>iso_alpha3</th>\n <th>Country</th>\n <th>organisation_flag</th>\n <th>continent</th>\n <th>eu_member</th>\n <th>epo_member</th>\n <th>oecd_member</th>\n <th>discontinued</th>\n <th>org</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1337324</td>\n <td>1723</td>\n <td>0.069122</td>\n <td>0.016190</td>\n <td>HUAWEI TECH CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>HUAWEI TECH CO LTD (CN)</td>\n </tr>\n <tr>\n <th>1</th>\n <td>3697072</td>\n <td>270</td>\n <td>0.010832</td>\n <td>0.002537</td>\n <td>NINGBO GEELY AUTOMOBILE R&amp;D CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>NINGBO GEELY AUTOMOBILE R&amp;D CO LTD (CN)</td>\n </tr>\n <tr>\n <th>2</th>\n <td>62077</td>\n <td>204</td>\n <td>0.008184</td>\n <td>0.001917</td>\n <td>TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD</td>\n <td>COMPANY</td>\n <td>TW</td>\n <td>TW</td>\n <td>TWN</td>\n <td>Taiwan Province Of China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD (TW)</td>\n </tr>\n <tr>\n <th>3</th>\n <td>1912470</td>\n <td>130</td>\n <td>0.005215</td>\n <td>0.001222</td>\n <td>MEDIATEK INC</td>\n <td>COMPANY</td>\n <td>TW</td>\n <td>TW</td>\n <td>TWN</td>\n <td>Taiwan Province Of China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>MEDIATEK INC (TW)</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2607939</td>\n <td>101</td>\n <td>0.004052</td>\n <td>0.000949</td>\n <td>SELF ELECT CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>SELF ELECT CO LTD (CN)</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>29061</th>\n <td>151900860</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>LI, FAHONG</td>\n <td>UNKNOWN</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>LI, FAHONG (CN)</td>\n </tr>\n <tr>\n <th>29062</th>\n <td>151899043</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>ZHANG, YI</td>\n <td>UNKNOWN</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td
2 years ago
},
2 years ago
"execution_count": 154,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": " han_id count percent weight \n0 1337324 1723 0.069122 0.016190 \\\n1 3697072 270 0.010832 0.002537 \n2 62077 204 0.008184 0.001917 \n3 1912470 130 0.005215 0.001222 \n4 2607939 101 0.004052 0.000949 \n... ... ... ... ... \n29061 151900860 1 0.000040 0.000009 \n29062 151899043 1 0.000040 0.000009 \n29063 151898719 1 0.000040 0.000009 \n29064 151894061 1 0.000040 0.000009 \n29065 183287157 1 0.000040 0.000009 \n\n han_name psn_sector person_ctry_code \n0 HUAWEI TECH CO LTD COMPANY CN \\\n1 NINGBO GEELY AUTOMOBILE R&D CO LTD COMPANY CN \n2 TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD COMPANY TW \n3 MEDIATEK INC COMPANY TW \n4 SELF ELECT CO LTD COMPANY CN \n... ... ... ... \n29061 LI, FAHONG UNKNOWN CN \n29062 ZHANG, YI UNKNOWN CN \n29063 XU, EASON UNKNOWN CN \n29064 WENG, RAN INDIVIDUAL CN \n29065 LEFEBVRE, Marc René André Louis UNKNOWN MO \n\n ctry_code iso_alpha3 Country organisation_flag \n0 CN CHN China \\\n1 CN CHN China \n2 TW TWN Taiwan Province Of China \n3 TW TWN Taiwan Province Of China \n4 CN CHN China \n... ... ... ... ... \n29061 CN CHN China \n29062 CN CHN China \n29063 CN CHN China \n29064 CN CHN China \n29065 MO MAC Macao SAR (China) \n\n continent eu_member epo_member oecd_member discontinued \n0 Asia \\\n1 Asia \n2 Asia \n3 Asia \n4 Asia \n... ... ... ... ... ... \n29061 Asia \n29062 Asia \n29063 Asia \n29064 Asia \n29065 Asia \n\n org \n0 HUAWEI TECH CO LTD (CN) \n1 NINGBO GEELY AUTOMOBILE R&D CO LTD (CN) \n2 TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD (TW) \n3 MEDIATEK INC (TW) \n4 SELF ELECT CO LTD (CN) \n... ... \n29061 LI, FAHONG (CN) \n29062 ZHANG, YI (CN) \n29063 XU, EASON (CN) \n29064 WENG, RAN (CN) \n29065 LEFEBVRE, Marc René André Louis (MO) \n\n[29066 rows x 17 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>han_id</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n <th>han_name</th>\n <th>psn_sector</th>\n <th>person_ctry_code</th>\n <th>ctry_code</th>\n <th>iso_alpha3</th>\n <th>Country</th>\n <th>organisation_flag</th>\n <th>continent</th>\n <th>eu_member</th>\n <th>epo_member</th>\n <th>oecd_member</th>\n <th>discontinued</th>\n <th>org</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1337324</td>\n <td>1723</td>\n <td>0.069122</td>\n <td>0.016190</td>\n <td>HUAWEI TECH CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>HUAWEI TECH CO LTD (CN)</td>\n </tr>\n <tr>\n <th>1</th>\n <td>3697072</td>\n <td>270</td>\n <td>0.010832</td>\n <td>0.002537</td>\n <td>NINGBO GEELY AUTOMOBILE R&amp;D CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>NINGBO GEELY AUTOMOBILE R&amp;D CO LTD (CN)</td>\n </tr>\n <tr>\n <th>2</th>\n <td>62077</td>\n <td>204</td>\n <td>0.008184</td>\n <td>0.001917</td>\n <td>TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD</td>\n <td>COMPANY</td>\n <td>TW</td>\n <td>TW</td>\n <td>TWN</td>\n <td>Taiwan Province Of China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD (TW)</td>\n </tr>\n <tr>\n <th>3</th>\n <td>1912470</td>\n <td>130</td>\n <td>0.005215</td>\n <td>0.001222</td>\n <td>MEDIATEK INC</td>\n <td>COMPANY</td>\n <td>TW</td>\n <td>TW</td>\n <td>TWN</td>\n <td>Taiwan Province Of China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>MEDIATEK INC (TW)</td>\n </tr>\n <tr>\n <th>4</th>\n <td>2607939</td>\n <td>101</td>\n <td>0.004052</td>\n <td>0.000949</td>\n <td>SELF ELECT CO LTD</td>\n <td>COMPANY</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>SELF ELECT CO LTD (CN)</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>29061</th>\n <td>151900860</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>LI, FAHONG</td>\n <td>UNKNOWN</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td>\n <td></td>\n <td>Asia</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td>LI, FAHONG (CN)</td>\n </tr>\n <tr>\n <th>29062</th>\n <td>151899043</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>ZHANG, YI</td>\n <td>UNKNOWN</td>\n <td>CN</td>\n <td>CN</td>\n <td>CHN</td>\n <td>China</td
},
"execution_count": 197,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# China\n",
"org_collabs_ch = org_collabs[org_collabs[\"Country\"].isin(ch_names)][\"han_id\"].value_counts().reset_index()\n",
"org_collabs_ch[\"percent\"] = org_collabs_ch[\"count\"]/org_collabs[record_col].nunique()\n",
"org_collabs_ch[\"weight\"] = org_collabs_ch[\"count\"]/org_collabs[record_col].size\n",
"org_collabs_ch = org_collabs_ch.merge(pers_han, on='han_id')\n",
"org_collabs_ch[\"org\"] = org_collabs_ch[\"han_name\"].str.strip() + \" (\"+org_collabs_ch[\"person_ctry_code\"]+\")\"\n",
"org_collabs_ch"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 198,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x1690cb0b8b0>"
2 years ago
},
2 years ago
"execution_count": 155,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5cAAAGwCAYAAAA9o5FCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVzN2f8H8Ndtu+03khZatQrVWLIMFSX7MqEiRPatyBbGXlkmhbGONkPCkHUYy9TIEKKMJcpuKEx0U2j9/P7odz/fPt1765Yly/v5eHweM/ec8znL5/MpnXvO5xwewzAMCCGEEEIIIYSQ9yBX3xUghBBCCCGEEPLlo84lIYQQQgghhJD3Rp1LQgghhBBCCCHvjTqXhBBCCCGEEELeG3UuCSGEEEIIIYS8N+pcEkIIIYQQQgh5b9S5JIQQQgghhBDy3hTquwKEEEK+XOXl5Xj69Ck0NDTA4/HquzqEEEIIkQHDMHj9+jUMDAwgJ/fhxhupc0kIIaTOnj59CkNDw/quBiGEEELq4PHjx2jatOkHy486l4QQQupMQ0MDQMU/TpqamvVcG0IIIYTIIj8/H4aGhuy/4x8KdS4JIYTUmWgqbJ9VRyHPV6nn2hBCCCFfj8urR3z0Mj70Ky20oA8hhBBCCCGEfIbOnDmDvn37wsDAADweDwcOHODE83g8icfq1asBAA8ePICfnx9MTU2hoqKCZs2aYdGiRSguLmbzuH37NlxcXKCrqwtlZWWYmZlhwYIFKCkpqXV9aeSSEEIIIYQQQj5DhYWFsLOzw+jRo/HDDz+IxWdnZ3M+Hzt2DH5+fvDw8AAA3Lp1C+Xl5diyZQvMzc1x/fp1jB07Fi9fvmTPUVRUxIg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SUlnE5gWVkZoqKiEBwcDKBipdLExES0atUKFhYWaNy4MQCwU2MZhoG5ubnYtElJdf0Y9PT0pJZjaWmJW7duyZSPkpKSWD6iTrc0lpaWACpW1nVwcKg2nVAoxNOnT9mOr0hxcTHu3r37yacVZ2RkQFNTE9ra2p+0XEIIIYSIKygowJ07d9jP9+/fR3p6Oho2bAgjIyMAFesf7N27F2FhYWLni74QNzY2xk8//YQXL14AqFiMUWTnzp1QVFREy5YtwefzkZqaiqCgIHh6ekJRUbFW9aVpsYR8I6ysrFBaWiq2fcaVK1cA/K9DtHPnTjRt2hRXr15Feno6e4SFhSEmJoadHuHi4oJz587h5MmTnFE80aI+SUlJn+X7lgAwdOhQZGZm4uDBg2JxDMO893Yc9vb2aN68OcLCwlBeXi4WL+rQe3h4QFFRUeI/Bps3b0ZhYSG8vb3fqy618fz5c8TFxWHAgAEyfatJCCGEkI8rNTUVDg4O7JfVM2bMgIODAxYuXMimiY+PB8MwEv9mOHnyJO7cuYPTp0+jadOm0NfXh76+Pvt3H1DxpfnKlSvRrl07tGrVCkuWLMGUKVOwbdu2WteXRi4J+UbY2tqie/fuGD16NMLCwmBmZobbt28jICAAnp6eaNKkCYCKaRWDBg1CixYtOOcbGhoiKCgIx48fR+/evdn3LqOiovDLL7+w6ZycnNj5/pMmTRKrR1FREXJycjhhCgoKaNSo0Qdtb15enlg5GhoaUFNTw5AhQ5CQkABvb28sWLAA3bt3h46ODq5du4bw8HBMnTpV4t6hsuLxeIiOjoarqys6d+6M+fPnw9raGgUFBTh8+DBOnDiBv/76C0ZGRli1ahUCAwOhrKyM4cOHQ1FREQcPHsS8efMQGBhY40qxL168EPvCQF9fH7q6utWexzAMcnJywDAM8vLycP78eYSEhEAgEGDFihV1bjshhBBCPhxnZ+caX7cZN24cxo0bJzHO19dX4uI9+fn57Kw1T09PeHp6vnd
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x16962050640>"
},
"execution_count": 198,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5cAAAGwCAYAAAA9o5FCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVzN2f8H8Ndtu+03khZatQrVWLIMFSX7MqEiRPatyBbGXlkmhbGONkPCkHUYy9TIEKKMJcpuKEx0U2j9/P7odz/fPt1765Yly/v5eHweM/ec8znL5/MpnXvO5xwewzAMCCGEEEIIIYSQ9yBX3xUghBBCCCGEEPLlo84lIYQQQgghhJD3Rp1LQgghhBBCCCHvjTqXhBBCCCGEEELeG3UuCSGEEEIIIYS8N+pcEkIIIYQQQgh5b9S5JIQQQgghhBDy3hTquwKEEEK+XOXl5Xj69Ck0NDTA4/HquzqEEEIIkQHDMHj9+jUMDAwgJ/fhxhupc0kIIaTOnj59CkNDw/quBiGEEELq4PHjx2jatOkHy486l4QQQupMQ0MDQMU/TpqamvVcG0IIIYTIIj8/H4aGhuy/4x8KdS4JIYTUmWgqbJ9VRyHPV6nn2hBCCCFfj8urR3z0Mj70Ky20oA8hhBBCCCGEfIbOnDmDvn37wsDAADweDwcOHODE83g8icfq1asBAA8ePICfnx9MTU2hoqKCZs2aYdGiRSguLmbzuH37NlxcXKCrqwtlZWWYmZlhwYIFKCkpqXV9aeSSEEIIIYQQQj5DhYWFsLOzw+jRo/HDDz+IxWdnZ3M+Hzt2DH5+fvDw8AAA3Lp1C+Xl5diyZQvMzc1x/fp1jB07Fi9fvmTPUVRUxIgRI/Ddd99BS0sLV69exdixY1FeXo6QkJBa1ZdGLgn5wvn6+mLAgAFi4UlJSeDxeMjLywMAxMTEQEtLS2Iekr4JAwB3d3fIy8vj0qVLbNitW7fA4/GQkpLCSdu+fXsoKyvj3bt3bNi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yacVZ2RkQFNTE9ra2p+0XEIIIYSIKygowJ07d9jP9+/fR3p6Oho2bAgjIyMAFesf7N27F2FhYWLni74QNzY2xk8//YQXL14AqFiMUWTnzp1QVFREy5YtwefzkZqaiqCgIHh6ekJRUbFW9aVpsYR8I6ysrFBaWiq2fcaVK1cA/K9DtHPnTjRt2hRXr15Feno6e4SFhSEmJoadHuHi4oJz587h5MmTnFE80aI+SUlJn+X7lgAwdOhQZGZm4uDBg2JxDMO893Yc9vb2aN68OcLCwlBeXi4WL+rQe3h4QFFRUeI/Bps3b0ZhYSG8vb3fqy618fz5c8TFxWHAgAEyfatJCCGEkI8rNTUVDg4O7JfVM2bMgIODAxYuXMimiY+PB8MwEv9mOHnyJO7cuYPTp0+jadOm0NfXh76+Pvt3H1DxpfnKlSvRrl07tGrVCkuWLMGUKVOwbdu2WteXRi4J+UbY2tqie/fuGD16NMLCwmBmZobbt28jICAAnp6eaNKkCYCKaRWDBg1CixYtOOcbGhoiKCgIx48fR+/evdn3LqOiovDLL7+w6ZycnNj5/pMmTRKrR1FREXJycjhhCgoKaNSo0Qdtb15enlg5GhoaUFNTw5AhQ5CQkABvb28sWLAA3bt3h46ODq5du4bw8HBMnTpV4t6hsuLxeIiOjoarqys6d+6M+fPnw9raGgUFBTh8+DBOnDiBv/76C0ZGRli1ahUCAwOhrKyM4cOHQ1FREQcPHsS8efMQGBhY40qxL168EPvCQF9fH7q6utWexzAMcnJywDAM8vLycP78eYSEhEAgEGDFihV1bjshhBBCPhxnZ+caX7cZN24cxo0bJzHO19dX4uI9+fn57Kw1T09PeHp6vnd
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = org_collabs_ch[0:25]\n",
"g = sns.barplot(data, x=\"count\", y=\"han_name\", hue=\"psn_sector\", dodge=False)\n",
"g.set_ylabel(\"Entity\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)\n",
"g.legend(title=None)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 199,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x169069f7fd0>"
},
"execution_count": 156,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5cAAAGwCAYAAAA9o5FCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVzN2f8H8Ndtu+03khZatQrVWLIMFSX7MqEiRPatyBbGEpVlUhjraDMkDFmHsUyNDCHKWKLshsJEN4XWz++Pfvfz7dO9t262LO/n4/F5zNxzzucsn8+ndO45n3N4DMMwIIQQQgghhBBC3oNcfVeAEEIIIYQQQsiXjzqXhBBCCCGEEELeG3UuCSGEEEIIIYS8N+pcEkIIIYQQQgh5b9S5JIQQQgghhBDy3qhzSQghhBBCCCHkvVHnkhBCCCGEEELIe1Oo7woQQgj5clVUVODJkyfQ0NAAj8er7+oQQgghRAYMw+DVq1cwMDCAnNyHG2+kziUhhJB39uTJExgaGtZ3NQghhBDyDh49eoSmTZt+sPyoc0kIIeSdaWhoAKj8x0lTU7Oea0MIIYQQWRQUFMDQ0JD9d/xDoc4lIYSQdyaaCttn5RHI81XquTaEEELI1+PSqhEfvYwP/UoLLehDCCGEEEIIIZ+h06dPo2/fvjAwMACPx8P+/fs58TweT+KxatUqAMD9+/fh5+cHU1NTqKiooFmzZli0aBFKSkrYPG7dugUXFxfo6upCWVkZZmZmWLBgAUpLS+tcXxq5JIQQQgghhJDPUFFREezs7DB69Gj88MMPYvE5OTmcz0ePHoWfnx88PDwAADdv3kRFRQU2b94Mc3NzXLt2DWPHjsWLFy/YcxQVFTFixAh899130NLSwpUrVzB27FhUVFQgNDS0TvWlkUt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GFhgcaNGwMAOzWWYRiYm5uLTZuUVNePQU9PT2o5lpaWuHnzpkz5KCkpieUj6nRLY2lpCaByZV0HB4ca0wmFQjx58oTt+IqUlJTgzp07n3xacWZmJjQ1NaGtrf1JyyWEEEKIuMLCQty+fZv9fO/ePWRkZKBhw4YwMjICULn+wZ49exAeHi52vugLcWNjY/z00094/vw5gMrFGEV27NgBRUVFtGzZEnw+H2lpaQgKCoKnpycUFRXrVF+aFkvIN8LKygplZWVi22dcvnwZwP86RDt27EDTpk1x5coVZGRksEd4eDhiY2PZ6REuLi44e/YsTpw4wRnFEy3qk5yc/Fm+bwkAQ4cORVZWFg4cOCAWxzDMe2/HYW9vj+bNmyM8PBwVFRVi8aIOvYeHBxQVFSX+Y7Bp0yYUFRXB29v7vepSF8+ePUN8fDwGDBgg07eahBBCCPm40tLS4ODgwH5ZPWPGDDg4OGDhwoVsmoSEBDAMI/FvhhMnTuD27ds4deoUmjZtCn19fejr67N/9wGVX5qvWLEC7dq1Q6tWrbBkyRJMmTIFW7durXN9aeSSkG+Era0tunfvjtGjRyM8PBxmZma4desWAgIC4OnpiSZNmgConFYxaNAgtGjRgnO+oaEhgoKCcOzYMfTu3Zt97zI6Ohq//PILm87JyYmd7z9p0iSxehQXFyM3N5cTpqCggEaNGn3Q9ubn54uVo6GhATU1NQwZMgSJiYnw9vbGggUL0L17d+jo6ODq1auIiIjA1KlTJe4dKisej4eYmBi4urqic+fOmD9/PqytrVFYWIhDhw7h+PHj+Ouvv2BkZISVK1ciMDAQysrKGD58OBQVFXHgwAHMmzcPgYGBta4U+/z5c7EvDPT19aGrq1vjeQzDIDc3FwzDID8/H+fOnUNoaCgEAgGWL1/+zm0nhBBCyIfj7Oxc6+s248aNw7hx4yTG+fr6Sly8p6CggJ215unpCU9Pz/e
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x169075f4970>"
2 years ago
},
2 years ago
"execution_count": 199,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA5cAAAGwCAYAAAA9o5FCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeVzN2f8H8Ndtu+03khZatQrVWLIMFSX7MqEiRPatyBbGEpVlUhjraDMkDFmHsUyNDCHKWKLshsJEN4XWz++Pfvfz7dO9t262LO/n4/F5zNxzzucsn8+ndO45n3N4DMMwIIQQQgghhBBC3oNcfVeAEEIIIYQQQsiXjzqXhBBCCCGEEELeG3UuCSGEEEIIIYS8N+pcEkIIIYQQQgh5b9S5JIQQQgghhBDy3qhzSQghhBBCCCHkvVHnkhBCCCGEEELIe1Oo7woQQgj5clVUVODJkyfQ0NAAj8er7+oQQgghRAYMw+DVq1cwMDCAnNyHG2+kziUhhJB39uTJExgaGtZ3NQghhBDyDh49eoSmTZt+sPyoc0kIIeSdaWhoAKj8x0lTU7Oea0MIIYQQWRQUFMDQ0JD9d/xDoc4lIYSQdyaaCttn5RHI81XquTaEEELI1+PSqhEfvYwP/UoLLehDCCGEEEIIIZ+h06dPo2/fvjAwMACPx8P+/fs58TweT+KxatUqAMD9+/fh5+cHU1NTqKiooFmzZli0aBFKSkrYPG7dugUXFxfo6upCWVkZZmZmWLBgAUpLS+tcXxq5JIQQQgghhJDPUFFREezs7DB69Gj88MMPYvE5OTmcz0ePHoWfnx88PDwAADdv3kRFRQU2b94Mc3NzXLt2DWPHjsWLFy/YcxQVFTFixAh899130NLSwpUrVzB27FhUVFQgNDS0TvWlkUtCvnC+vr4YMGCAWHhycjJ4PB7y8/MBALGxsdDS0pKYh6RvwgDA3d0d8vLyuHjxIht28+ZN8Hg8pKamctK2b98eysrKePv2LRv29u1bKCsrIyoqiq2rpG/XevTow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trf1JyyWEEEKIuMLCQty+fZv9fO/ePWRkZKBhw4YwMjICULn+wZ49exAeHi52vugLcWNjY/z00094/vw5gMrFGEV27NgBRUVFtGzZEnw+H2lpaQgKCoKnpycUFRXrVF+aFkvIN8LKygplZWVi22dcvnwZwP86RDt27EDTpk1x5coVZGRksEd4eDhiY2PZ6REuLi44e/YsTpw4wRnFEy3qk5yc/Fm+bwkAQ4cORVZWFg4cOCAWxzDMe2/HYW9vj+bNmyM8PBwVFRVi8aIOvYeHBxQVFSX+Y7Bp0yYUFRXB29v7vepSF8+ePUN8fDwGDBgg07eahBBCCPm40tLS4ODgwH5ZPWPGDDg4OGDhwoVsmoSEBDAMI/FvhhMnTuD27ds4deoUmjZtCn19fejr67N/9wGVX5qvWLEC7dq1Q6tWrbBkyRJMmTIFW7durXN9aeSSkG+Era0tunfvjtGjRyM8PBxmZma4desWAgIC4OnpiSZNmgConFYxaNAgtGjRgnO+oaEhgoKCcOzYMfTu3Zt97zI6Ohq//PILm87JyYmd7z9p0iSxehQXFyM3N5cTpqCggEaNGn3Q9ubn54uVo6GhATU1NQwZMgSJiYnw9vbGggUL0L17d+jo6ODq1auIiIjA1KlTJe4dKisej4eYmBi4urqic+fOmD9/PqytrVFYWIhDhw7h+PHj+Ouvv2BkZISVK1ciMDAQysrKGD58OBQVFXHgwAHMmzcPgYGBta4U+/z5c7EvDPT19aGrq1vjeQzDIDc3FwzDID8/H+fOnUNoaCgEAgGWL1/+zm0nhBBCyIfj7Oxc6+s248aNw7hx4yTG+fr6Sly8p6CggJ215unpCU9Pz/e
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.barplot(data, x=\"count\", y=\"han_name\", hue=\"Country\", dodge=False)\n",
"g.set_ylabel(\"Entity\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)\n",
"g.legend(title=None, loc=4)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 200,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": " han_id count percent weight han_name \n0 13378 1851 0.074257 0.017393 TELEFON AB LM ERICSSON PUBL \\\n1 228842 716 0.028724 0.006728 BASF SE \n2 2562294 693 0.027801 0.006512 NOKIA TECH LTD \n3 68848 586 0.023509 0.005506 ALCATEL LUCENT \n4 2456791 524 0.021021 0.004924 ROBERT BOSCH GMBH \n... ... ... ... ... ... \n25665 151189488 1 0.000040 0.000009 Hundt, Wolfgang \n25666 151187794 1 0.000040 0.000009 Fischer, Peer \n25667 151187133 1 0.000040 0.000009 Daryani, Neha \n25668 151186834 1 0.000040 0.000009 HEIL, Nadine \n25669 184881241 1 0.000040 0.000009 ZAVORONKOVS, ALEKSANDRS \n\n psn_sector person_ctry_code ctry_code iso_alpha3 Country \n0 COMPANY SE SE SWE Sweden \\\n1 COMPANY DE DE DEU Germany \n2 COMPANY FI FI FIN Finland \n3 COMPANY FR FR FRA France \n4 COMPANY DE DE DEU Germany \n... ... ... ... ... ... \n25665 UNKNOWN DE DE DEU Germany \n25666 UNKNOWN DE DE DEU Germany \n25667 UNKNOWN DE DE DEU Germany \n25668 UNKNOWN DE DE DEU Germany \n25669 UNKNOWN LV LV LVA Latvia \n\n organisation_flag continent eu_member epo_member oecd_member \n0 Europe Y Y Y \\\n1 Europe Y Y Y \n2 Europe Y Y Y \n3 Europe Y Y Y \n4 Europe Y Y Y \n... ... ... ... ... ... \n25665 Europe Y Y Y \n25666 Europe Y Y Y \n25667 Europe Y Y Y \n25668 Europe Y Y Y \n25669 Europe Y Y Y \n\n discontinued \n0 \n1 \n2 \n3 \n4 \n... ... \n25665 \n25666 \n25667 \n25668 \n25669 \n\n[25670 rows x 16 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>han_id</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n <th>han_name</th>\n <th>psn_sector</th>\n <th>person_ctry_code</th>\n <th>ctry_code</th>\n <th>iso_alpha3</th>\n <th>Country</th>\n <th>organisation_flag</th>\n <th>continent</th>\n <th>eu_member</th>\n <th>epo_member</th>\n <th>oecd_member</th>\n <th>discontinued</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>13378</td>\n <td>1851</td>\n <td>0.074257</td>\n <td>0.017393</td>\n <td>TELEFON AB LM ERICSSON PUBL</td>\n <td>COMPANY</td>\n <td>SE</td>\n <td>SE</td>\n <td>SWE</td>\n <td>Sweden</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>1</th>\n <td>228842</td>\n <td>716</td>\n <td>0.028724</td>\n <td>0.006728</td>\n <td>BASF SE</td>\n <td>COMPANY</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>2</th>\n <td>2562294</td>\n <td>693</td>\n <td>0.027801</td>\n <td>0.006512</td>\n <td>NOKIA TECH LTD</td>\n <td>COMPANY</td>\n <td>FI</td>\n <td>FI</td>\n <td>FIN</td>\n <td>Finland</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>3</th>\n <td>68848</td>\n <td>586</td>\n <td>0.023509</td>\n <td>0.005506</td>\n <td>ALCATEL LUCENT</td>\n <td>COMPANY</td>\n <td>FR</td>\n <td>FR</td>\n <td>FRA</td>\n <td>France</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>4</th>\n <td>2456791</td>\n <td>524</td>\n <td>0.021021</td>\n <td>0.004924</td>\n <td>ROBERT BOSCH GMBH</td>\n <td>COMPANY</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>25665</th>\n <td>151189488</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Hundt, Wolfgang</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>25666</th>\n <td>151187794</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Fischer, Peer</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>25667</th>\n <td>151187133</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Daryani, Neha</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n
2 years ago
},
2 years ago
"execution_count": 157,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": " han_id count percent weight han_name \n0 13378 1851 0.074257 0.017393 TELEFON AB LM ERICSSON PUBL \\\n1 228842 716 0.028724 0.006728 BASF SE \n2 2562294 693 0.027801 0.006512 NOKIA TECH LTD \n3 68848 586 0.023509 0.005506 ALCATEL LUCENT \n4 2456791 524 0.021021 0.004924 ROBERT BOSCH GMBH \n... ... ... ... ... ... \n25665 151189488 1 0.000040 0.000009 Hundt, Wolfgang \n25666 151187794 1 0.000040 0.000009 Fischer, Peer \n25667 151187133 1 0.000040 0.000009 Daryani, Neha \n25668 151186834 1 0.000040 0.000009 HEIL, Nadine \n25669 184881241 1 0.000040 0.000009 ZAVORONKOVS, ALEKSANDRS \n\n psn_sector person_ctry_code ctry_code iso_alpha3 Country \n0 COMPANY SE SE SWE Sweden \\\n1 COMPANY DE DE DEU Germany \n2 COMPANY FI FI FIN Finland \n3 COMPANY FR FR FRA France \n4 COMPANY DE DE DEU Germany \n... ... ... ... ... ... \n25665 UNKNOWN DE DE DEU Germany \n25666 UNKNOWN DE DE DEU Germany \n25667 UNKNOWN DE DE DEU Germany \n25668 UNKNOWN DE DE DEU Germany \n25669 UNKNOWN LV LV LVA Latvia \n\n organisation_flag continent eu_member epo_member oecd_member \n0 Europe Y Y Y \\\n1 Europe Y Y Y \n2 Europe Y Y Y \n3 Europe Y Y Y \n4 Europe Y Y Y \n... ... ... ... ... ... \n25665 Europe Y Y Y \n25666 Europe Y Y Y \n25667 Europe Y Y Y \n25668 Europe Y Y Y \n25669 Europe Y Y Y \n\n discontinued \n0 \n1 \n2 \n3 \n4 \n... ... \n25665 \n25666 \n25667 \n25668 \n25669 \n\n[25670 rows x 16 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>han_id</th>\n <th>count</th>\n <th>percent</th>\n <th>weight</th>\n <th>han_name</th>\n <th>psn_sector</th>\n <th>person_ctry_code</th>\n <th>ctry_code</th>\n <th>iso_alpha3</th>\n <th>Country</th>\n <th>organisation_flag</th>\n <th>continent</th>\n <th>eu_member</th>\n <th>epo_member</th>\n <th>oecd_member</th>\n <th>discontinued</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>13378</td>\n <td>1851</td>\n <td>0.074257</td>\n <td>0.017393</td>\n <td>TELEFON AB LM ERICSSON PUBL</td>\n <td>COMPANY</td>\n <td>SE</td>\n <td>SE</td>\n <td>SWE</td>\n <td>Sweden</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>1</th>\n <td>228842</td>\n <td>716</td>\n <td>0.028724</td>\n <td>0.006728</td>\n <td>BASF SE</td>\n <td>COMPANY</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>2</th>\n <td>2562294</td>\n <td>693</td>\n <td>0.027801</td>\n <td>0.006512</td>\n <td>NOKIA TECH LTD</td>\n <td>COMPANY</td>\n <td>FI</td>\n <td>FI</td>\n <td>FIN</td>\n <td>Finland</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>3</th>\n <td>68848</td>\n <td>586</td>\n <td>0.023509</td>\n <td>0.005506</td>\n <td>ALCATEL LUCENT</td>\n <td>COMPANY</td>\n <td>FR</td>\n <td>FR</td>\n <td>FRA</td>\n <td>France</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>4</th>\n <td>2456791</td>\n <td>524</td>\n <td>0.021021</td>\n <td>0.004924</td>\n <td>ROBERT BOSCH GMBH</td>\n <td>COMPANY</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>25665</th>\n <td>151189488</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Hundt, Wolfgang</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>25666</th>\n <td>151187794</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Fischer, Peer</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n <td>DEU</td>\n <td>Germany</td>\n <td></td>\n <td>Europe</td>\n <td>Y</td>\n <td>Y</td>\n <td>Y</td>\n <td></td>\n </tr>\n <tr>\n <th>25667</th>\n <td>151187133</td>\n <td>1</td>\n <td>0.000040</td>\n <td>0.000009</td>\n <td>Daryani, Neha</td>\n <td>UNKNOWN</td>\n <td>DE</td>\n <td>DE</td>\n
},
"execution_count": 200,
2 years ago
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Eu\n",
"org_collabs_eu = org_collabs[~org_collabs[\"Country\"].isin(ch_names)][\"han_id\"].value_counts().reset_index()\n",
"org_collabs_eu[\"percent\"] = org_collabs_eu[\"count\"]/org_collabs[record_col].nunique()\n",
"org_collabs_eu[\"weight\"] = org_collabs_eu[\"count\"]/org_collabs[record_col].size\n",
"org_collabs_eu = org_collabs_eu.merge(pers_han, on='han_id')\n",
"org_collabs_eu"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 201,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x16905fef370>"
},
"execution_count": 158,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAw8AAAGwCAYAAADv31lfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3yN5//48ddJIntHSEIIiSTELKr4IEokNiWREKSJ1dpbUJvYlJZWm0FtYlVbNWMUNUPMmKUkpSGJGSLn94df7m+OczLs0ffz8bgfD7nWfV33OZH7uu9rqNRqtRohhBBCCCGEyIfe266AEEIIIYQQ4v0gnQchhBBCCCFEgUjnQQghhBBCCFEg0nkQQgghhBBCFIh0HoQQQgghhBAFIp0HIYQQQgghRIFI50EIIYQQQghRIAZvuwJCiHdXVlYW169fx8LCApVK9barI4QQQogCUKvV3LlzBycnJ/T0Xu27Auk8CCFydf36dZydnd92NYQQQgjxAq5evUrx4sVfaZnSeRBC5MrCwgJ4+p+PpaXlW66NEEIIIQoiPT0dZ2dn5e/4qySdByFErrKHKjWb+gv6RiZvuTZCCCHEh+XwtE7s2rWLadOmcfjwYZKSkli7di2tWrVS0ty9e5dhw4axbt06UlJSKFWqFH369KFHjx5KGm9vb3bu3KlVfs4hx3369OGPP/7gxIkTlC1blvj4+Beqs0yYFkIIIYQQ4i25d+8elSpV4ttvv9UZP2DAADZt2sTixYs5ffo0/fr1o1evXmzYsEEjXdeuXUlKSiIpKYnExESdZYWGhtKuXbuXqu9b6zyoVKo8jzFjxnD58uVc4/fv3w9ATEwM1tbWuZ4nJCREZ34/Pz8ljYuLi1b8s+PD9u7dS5MmTbCxscHY2JgKFSowc+ZMnjx5otUuY2Nj/vrrL43wVq1aERISUqBr4+npiZGREcnJyVpx3t7eGvUsWr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fIcNl2tWjXgP9x5WLFiBfHx8RrH86hfv75W/pzLWwEMHjxYI75Tp04a8c/Oa8hPuXLl6NSp03O9fYiKitKYuxAcHMyqVau0nqZ36NCB+Ph4jh07xp49e3Bzc6NRo0a5PnV/HsHBwezbt4+LFy8SExNDaGhogfM+z3Xevn07NWrUYNasWbi5ueVaZkGve926dbl48SLbtm2jbdu2nDx5kjp16mgMt+rZsyfJycksWbKEmjVrsmrVKry8vNiyZUuB26iLr68v//vf//jqq68KnCctLQ1zc3NMTU3x8PCgaNGiLFmy5IXOn31Njx8/zrZt2wBo2rRprm9Y8hIeHk5aWppyXL169YXqJIQQQoiX9/jxYx4/fqy1S7S+vj5ZWVm55ktISAB4qWH/uXkv9nlwdnbO8wYzP2ZmZvnmL1y4sM407u7uAJw+fZpatWppxZ8+fZpy5crpLHPs2LG4u7uzbt26fOt46tQp9u/fz4EDBzTmOTx58oTly5fTtWtXJczKykqpq5ubG5GRkTg6OrJixYo8n+IXhJ2dHc2aNSMsLIyHDx/SuHHjAndKnuc6u7m5sWrVKipUqEC1atVyvYbu7u5aqyHlplChQtSpU4c6deowdOhQJkyYwLhx4xg6dKgyNMrCwoLmzZvTvHlzJkyYgK+vLxMmTMDHxwd3d3fS0tK4fv06Tk5OGmU/evSICxcuUL9+fZ3nnjx5MjVr1mTw4MEFqquFhQVHjhxBT08PR0dHZY4JoGzGlpaWppUvNTVVGaqVLed3t0yZMsyePZuaNWuyY8cOGjZsWKD6ZDMyMsLIyOi58gghhBDixd29e5fz588rP1+6dIn4+HhsbW0pUaIE9erVY/DgwZiYmFCyZEl27tzJokWLlFEGFy5cYOn
2 years ago
},
2 years ago
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x16912396370>"
},
"execution_count": 201,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAw8AAA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fM+z3Xevn07NWrUYNasWbi5ueVaZkGve926dbl48SLbtm2jbdu2nDx5kjp16mgMt+rZsyfJycksWbKEmjVrsmrVKry8vNiyZUuB26iLr68v//vf//jqq68KnCctLQ1zc3NMTU3x8PCgaNGiLFmy5IXOn31Njx8/zrZt2wBo2rRprm9Y8hIeHk5aWppyXL169YXqJIQQQoiX9/jxYx4/fqy1S7S+vj5ZWVm55ktISAB4qWH/uXkv9nlwdnbO8wYzP2ZmZvnmL1y4sM407u7uAJw+fZpatWppxZ8+fZpy5crpLHPs2LG4u7uzbt26fOt46tQp9u/fz4EDBzTmOTx58oTly5fTtWtXJczKykqpq5ubG5GRkTg6OrJixYo8n+IXhJ2dHc2aNSMsLIyHDx/SuHHjAndKnuc6u7m5sWrVKipUqEC1atVyvYbu7u5aqyHlplChQtSpU4c6deowdOhQJkyYwLhx4xg6dKgyNMrCwoLmzZvTvHlzJkyYgK+vLxMmTMDHxwd3d3fS0tK4fv06Tk5OGmU/evSICxcuUL9+fZ3nnjx5MjVr1mTw4MEFqquFhQVHjhxBT08PR0dHZY4JoGzGlpaWppUvNTVVGaqVLed3t0yZMsyePZuaNWuyY8cOGjZsWKD6ZDMyMsLIyOi58gghhBDixd29e5fz588rP1+6dIn4+HhsbW0pUaIE9erVY/DgwZiYmFCyZEl27tzJokWLlFEGFy5cYOn
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = org_collabs_eu[0:25]\n",
"g = sns.barplot(data, x=\"count\", y=\"han_name\", hue=\"psn_sector\", dodge=False)\n",
"g.set_ylabel(\"Entity\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)\n",
"g.legend(title=None)"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
2 years ago
"execution_count": 202,
2 years ago
"outputs": [
{
"data": {
2 years ago
"text/plain": "<matplotlib.legend.Legend at 0x16907562700>"
2 years ago
},
2 years ago
"execution_count": 159,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAw8AAAGwCAYAAADv31lfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd1QU1/838PfSlr4UUUCaUhUbNhS/KigI2I2CIKgIYokNu1gRC1ixJLZkWTQ2QESNJkZRQCxEUVFsYCM2iAYpggoC8/zBs/Nj3F2KvXxe58w57m1z7+zi7p25hccwDANCCCGEEEIIqYXc564AIYQQQggh5OtAnQdCCCGEEEJInVDngRBCCCGEEFIn1HkghBBCCCGE1Al1HgghhBBCCCF1Qp0HQgghhBBCSJ1Q54EQQgghhBBSJwqfuwKEkC9XZWUlnjx5Ag0NDfB4vM9dHUIIIYTUAcMwePHiBQwNDSEn92GfFVDngRAi05MnT2BsbPy5q0EIIYSQd/Dw4UMYGRl90DKp80AIkUlDQwNA1X8+mpqan7k2hBBCCKmLoqIiGBsbs9/jHxJ1HgghMomHKvVdeQTyfJXPXBtCCCHk23Jx1QicOnUKq1atwsWLF5GTk4P4+HgMHDiQTVNcXIw5c+bgwIEDyMvLQ5MmTTB58mSMGzeOTePo6Ijk5GSJ8qsPOZ48eTLOnDmDa9euoVmzZkhPT3+nOtOEaUIIIYQQQj6TkpIStG7dGj///LPU+GnTpuHo0aPYuXMnbt68iaCgIEycOBGHDh3ipAsMDEROTg5ycnKQlZUltSx/f38MHTr0ver72ToPPB6vxiMkJATZ2dky41NTUwEAUVFR0NLSknkePz8/qfnd3NzYNGZmZhLxb48PO3v2LHr37g1tbW0oKyujZcuWWLt2LSoqKiTapaysjH/++YcTPnDgQPj5+dXp2tjY2IDP5yM3N1ciztHRkVPPRo0awcPDQ+J80vIFBQXJjH/7uoqVlpZCV1cXPB4PSUlJMvPX9zqrqqqiZcuW+P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mzpzJiR8xYgQn/u15DbVp3rw5RowYUa+nD5GRkZy5C76+voiNjZW4m+7j44P09HRcuXIFp0+fhoWFBXr16iXzrnt9+Pr64ty5c7h37x6ioqLg7+9f57z1uc4nT56Evb09IiIiYGFhIbPMul73bt264d69ezhx4gSGDBmC69evo2vXrpzhVhMmTEBubi527dqFzp07IzY2Fra2tjh+/Hid2yiNq6sr/ve//2HBggV1zlNYWAh1dXWoqqrC2toajRo1wq5du97p/OJrevXqVZw4cQIA0KdPH5lPWGoSHByMwsJC9nj48OE71YkQQggh7+/Nmzd48+aNxC7R8vLyqKyslJkvIyMDAN5r2L8sX8U+D8bGxjX+wKyNmpparfkbNGggNY2VlRUA4ObNm3BwcJCIv3nzJpo3by61zMWLF8PKygoHDhyotY43btxAamoqzp8/z5nnUFFRgb179yIwMJANEwgEbF0tLCwgFAphYGCA6OjoGu/i14Wuri769u2LgIAAvH79Gu7u7nXulNTnOltYWCA2NhYtW7ZE+/btZV5DKysridWQZFFUVETXrl3RtWtXzJ49G0uXLkVoaChmz57NDo3S0NBAv3790K9fPyxduhSurq5YunQpXFxcYGVlhcLCQjx58gSGhoacssvKynD37l04OTlJPXd4eDg6d+6MmTNn1qmuGhoauHTpEuTk5GBgYMDOMQHAbsZWWFgoka+goIAdqiVW/bNraWmJdevWoXPnzkhMTISzs3Od6iPG5/PB5/PrlYcQQggh7664uBh37txhX9+/fx/p6enQ0dGBiYkJunfvjpkzZ0JFRQWmpqZITk7
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<matplotlib.legend.Legend at 0x169155ecc40>"
},
"execution_count": 202,
2 years ago
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": "<Figure size 640x480 with 1 Axes>",
2 years ago
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAw8AAAGwCAYAAADv31lfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9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dqFzp07IzY2Fra2tjh+/Hid2yiNq6sr/ve//2HBggV1zlNYWAh1dXWoqqrC2toajRo1wq5du97p/OJrevXqVZw4cQIA0KdPH5lPWGoSHByMwsJC9nj48OE71YkQQggh7+/Nmzd48+aNxC7R8vLyqKyslJkvIyMDAN5r2L8sX8U+D8bGxjX+wKyNmpparfkbNGggNY2VlRUA4ObNm3BwcJCIv3nzJpo3by61zMWLF8PKygoHDhyotY43btxAamoqzp8/z5nnUFFRgb179yIwMJANEwgEbF0tLCwgFAphYGCA6OjoGu/i14Wuri769u2LgIAAvH79Gu7u7nXulNTnOltYWCA2NhYtW7ZE+/btZV5DKysridWQZFFUVETXrl3RtWtXzJ49G0uXLkVoaChmz57NDo3S0NBAv3790K9fPyxduhSurq5YunQpXFxcYGVlhcLCQjx58gSGhoacssvKynD37l04OTlJPXd4eDg6d+6MmTNn1qmuGhoauHTpEuTk5GBgYMDOMQHAbsZWWFgoka+goIAdqiVW/bNraWmJdevWoXPnzkhMTISzs3Od6iPG5/PB5/PrlYcQQggh7664uBh37txhX9+/fx/p6enQ0dGBiYkJunfvjpkzZ0JFRQWmpqZITk7
2 years ago
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = sns.barplot(data, x=\"count\", y=\"han_name\", hue=\"Country\", dodge=False)\n",
"g.set_ylabel(\"Entity\")\n",
"g.set_xlabel(\"Number of co-patents\")\n",
"for i in g.containers:\n",
" g.bar_label(i,)\n",
"g.legend(title=None, loc=4)"
],
"metadata": {
"collapsed": false
}
2 years ago
},
{
"cell_type": "markdown",
"source": [
"# Patent classes?"
],
"metadata": {
"collapsed": false
}
2 years ago
}
],
"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
2 years ago
}