{ "cells": [ { "cell_type": "code", "execution_count": 1, "outputs": [ { "data": { "text/html": " \n " }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import os\n", "import numpy as np\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", "import plotly.express as px\n", "import plotly.graph_objects as go\n", "import plotly.offline as pyo\n", "from plotly.subplots import make_subplots\n", "import plotly.graph_objects as go\n", "pyo.init_notebook_mode()\n", "\n", "import plotly.io as pio\n", "pio.renderers.default = \"plotly_mimetype+notebook\"\n", "\n", "import country_converter as coco\n", "cc = coco.CountryConverter()\n", "\n", "\n", "%matplotlib inline" ], "metadata": { "collapsed": false } }, { "cell_type": "code", "execution_count": 2, "outputs": [], "source": [ "tls_801 = pd.read_csv(r\"./EU_CH_scope/table_tls801.csv\", low_memory=False)\n", "# tls_801.head()\n", "scope_df = tls_801[((tls_801.eu_member==\"Y\")|\n", " (tls_801.ctry_code == 'NO')|\n", " (tls_801.ctry_code == 'CH')|\n", " (tls_801.ctry_code == 'GB'))]\n", "scope_countries = scope_df[\"ctry_code\"].unique()" ], "metadata": { "collapsed": false } }, { "cell_type": "code", "execution_count": 44, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " ctry_code iso_alpha3 st3_name organisation_flag continent eu_member \n", "137 MA MAR Morocco Africa \\\n", "\n", " epo_member oecd_member discontinued \n", "137 \n" ] } ], "source": [ "print(tls_801[tls_801[\"ctry_code\"]==\"MA\"])" ], "metadata": { "collapsed": false } }, { "cell_type": "code", "execution_count": 3, "outputs": [], "source": [ "outdir=\"raw_files_csv\"" ], "metadata": { "collapsed": false } }, { "cell_type": "code", "execution_count": 4, "outputs": [ { "data": { "text/plain": " appln_id appln_auth appln_nr appln_kind appln_filing_date \n8641708 531710630 CN 201811380088 A 2018-11-20 \\\n5246513 489770910 CN 201711004155 A 2017-10-24 \n6383260 503205376 CN 201810447617 A 2018-05-11 \n1437288 417129813 GR 20120100519 A 2012-10-12 \n4304665 479561975 CN 201510807721 A 2015-11-19 \n8099995 524172492 CN 201911055629 A 2019-10-31 \n2496404 443580404 CN 201510312381 A 2015-06-08 \n2862771 448112136 CN 201510736913 A 2015-11-03 \n8746800 533540106 CN 202010109483 A 2020-02-22 \n12407625 580940603 CN 202210840515 A 2022-07-18 \n\n appln_filing_year appln_nr_original ipr_type receiving_office \n8641708 2018 201811380088 PI NaN \\\n5246513 2017 201711004155 PI NaN \n6383260 2018 201810447617 PI NaN \n1437288 2012 20120100519 PI NaN \n4304665 2015 201510807721 PI NaN \n8099995 2019 201911055629 PI NaN \n2496404 2015 2015103123811 PI NaN \n2862771 2015 2015107369134 PI NaN \n8746800 2020 202010109483 PI NaN \n12407625 2022 202210840515 PI NaN \n\n internat_appln_id ... earliest_pat_publn_id granted \n8641708 0 ... 531710631 N \\\n5246513 0 ... 489770911 N \n6383260 0 ... 503205377 N \n1437288 0 ... 417129814 Y \n4304665 0 ... 479561976 N \n8099995 0 ... 524172493 N \n2496404 0 ... 443580405 N \n2862771 0 ... 448112137 N \n8746800 0 ... 533540107 Y \n12407625 0 ... 580940604 N \n\n docdb_family_id inpadoc_family_id docdb_family_size \n8641708 70744210 531710630 1 \\\n5246513 61141626 489770910 1 \n6383260 64213024 503205376 1 \n1437288 50483672 417129813 1 \n4304665 58885008 479561975 1 \n8099995 68978631 524172492 1 \n2496404 53812114 443580404 1 \n2862771 54991770 448112136 1 \n8746800 71149074 533540106 1 \n12407625 83518531 580940603 1 \n\n nb_citing_docdb_fam nb_applicants nb_inventors is_prior is_pct \n8641708 0 1 1 1 0 \n5246513 0 1 5 1 0 \n6383260 0 1 3 1 0 \n1437288 0 1 1 1 0 \n4304665 0 1 1 1 0 \n8099995 0 1 3 1 0 \n2496404 3 2 3 1 0 \n2862771 2 1 5 1 0 \n8746800 0 1 5 1 0 \n12407625 0 1 6 1 0 \n\n[10 rows x 28 columns]", "text/html": "
\n | appln_id | \nappln_auth | \nappln_nr | \nappln_kind | \nappln_filing_date | \nappln_filing_year | \nappln_nr_original | \nipr_type | \nreceiving_office | \ninternat_appln_id | \n... | \nearliest_pat_publn_id | \ngranted | \ndocdb_family_id | \ninpadoc_family_id | \ndocdb_family_size | \nnb_citing_docdb_fam | \nnb_applicants | \nnb_inventors | \nis_prior | \nis_pct | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8641708 | \n531710630 | \nCN | \n201811380088 | \nA | \n2018-11-20 | \n2018 | \n201811380088 | \nPI | \nNaN | \n0 | \n... | \n531710631 | \nN | \n70744210 | \n531710630 | \n1 | \n0 | \n1 | \n1 | \n1 | \n0 | \n
5246513 | \n489770910 | \nCN | \n201711004155 | \nA | \n2017-10-24 | \n2017 | \n201711004155 | \nPI | \nNaN | \n0 | \n... | \n489770911 | \nN | \n61141626 | \n489770910 | \n1 | \n0 | \n1 | \n5 | \n1 | \n0 | \n
6383260 | \n503205376 | \nCN | \n201810447617 | \nA | \n2018-05-11 | \n2018 | \n201810447617 | \nPI | \nNaN | \n0 | \n... | \n503205377 | \nN | \n64213024 | \n503205376 | \n1 | \n0 | \n1 | \n3 | \n1 | \n0 | \n
1437288 | \n417129813 | \nGR | \n20120100519 | \nA | \n2012-10-12 | \n2012 | \n20120100519 | \nPI | \nNaN | \n0 | \n... | \n417129814 | \nY | \n50483672 | \n417129813 | \n1 | \n0 | \n1 | \n1 | \n1 | \n0 | \n
4304665 | \n479561975 | \nCN | \n201510807721 | \nA | \n2015-11-19 | \n2015 | \n201510807721 | \nPI | \nNaN | \n0 | \n... | \n479561976 | \nN | \n58885008 | \n479561975 | \n1 | \n0 | \n1 | \n1 | \n1 | \n0 | \n
8099995 | \n524172492 | \nCN | \n201911055629 | \nA | \n2019-10-31 | \n2019 | \n201911055629 | \nPI | \nNaN | \n0 | \n... | \n524172493 | \nN | \n68978631 | \n524172492 | \n1 | \n0 | \n1 | \n3 | \n1 | \n0 | \n
2496404 | \n443580404 | \nCN | \n201510312381 | \nA | \n2015-06-08 | \n2015 | \n2015103123811 | \nPI | \nNaN | \n0 | \n... | \n443580405 | \nN | \n53812114 | \n443580404 | \n1 | \n3 | \n2 | \n3 | \n1 | \n0 | \n
2862771 | \n448112136 | \nCN | \n201510736913 | \nA | \n2015-11-03 | \n2015 | \n2015107369134 | \nPI | \nNaN | \n0 | \n... | \n448112137 | \nN | \n54991770 | \n448112136 | \n1 | \n2 | \n1 | \n5 | \n1 | \n0 | \n
8746800 | \n533540106 | \nCN | \n202010109483 | \nA | \n2020-02-22 | \n2020 | \n202010109483 | \nPI | \nNaN | \n0 | \n... | \n533540107 | \nY | \n71149074 | \n533540106 | \n1 | \n0 | \n1 | \n5 | \n1 | \n0 | \n
12407625 | \n580940603 | \nCN | \n202210840515 | \nA | \n2022-07-18 | \n2022 | \n202210840515 | \nPI | \nNaN | \n0 | \n... | \n580940604 | \nN | \n83518531 | \n580940603 | \n1 | \n0 | \n1 | \n6 | \n1 | \n0 | \n
10 rows × 28 columns
\n\n | appln_id | \nappln_auth | \nperson_id | \ninvt_seq_nr | \napplt_seq_nr | \nperson_name | \nperson_ctry_code | \nhan_id | \nhan_name | \npsn_sector_x | \npsn_sector_y | \n
---|---|---|---|---|---|---|---|---|---|---|---|
124 | \n419052362 | \nCN | \n5361204 | \n0 | \n1 | \nSchneider Electric Industries SAS | \nFR | \n808003 | \nSCHNEIDER ELECT IND SAS | \nCOMPANY | \nCOMPANY | \n
137 | \n419052362 | \nCN | \n51988464 | \n1 | \n0 | \nJUZHONG SONG | \nCN | \n151988464 | \nJUZHONG SONG | \nUNKNOWN | \nUNKNOWN | \n
\n | appln_id | \nappln_auth | \nappln_nr | \nappln_kind | \nappln_filing_date | \nappln_filing_year | \nappln_nr_original | \nipr_type | \nreceiving_office | \ninternat_appln_id | \n... | \nearliest_pat_publn_id | \ngranted | \ndocdb_family_id | \ninpadoc_family_id | \ndocdb_family_size | \nnb_citing_docdb_fam | \nnb_applicants | \nnb_inventors | \nis_prior | \nis_pct | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1568550 | \n419052362 | \nCN | \n201210551425 | \nA | \n2012-12-18 | \n2012 | \n2012105514252 | \nPI | \nNaN | \n0 | \n... | \n419052363 | \nY | \n49886800 | \n413446088 | \n4 | \n15 | \n1 | \n1 | \n1 | \n0 | \n
1 rows × 28 columns
\n\n | appln_id | \nappln_auth | \nappln_nr | \nappln_kind | \nappln_filing_date | \nappln_filing_year | \nappln_nr_original | \nipr_type | \nreceiving_office | \ninternat_appln_id | \n... | \nearliest_pat_publn_id | \ngranted | \ndocdb_family_id | \ninpadoc_family_id | \ndocdb_family_size | \nnb_citing_docdb_fam | \nnb_applicants | \nnb_inventors | \nis_prior | \nis_pct | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
863506 | \n407017979 | \nWO | \n2011083302 | \nW | \n2011-12-01 | \n2011 | \nCN2011/083302 | \nPI | \nCN | \n0 | \n... | \n407072959 | \nN | \n48534637 | \n407017979 | \n2 | \n1 | \n6 | \n5 | \n1 | \n1 | \n
7100916 | \n510736006 | \nWO | \n2019058105 | \nW | \n2019-03-29 | \n2019 | \nEP2019/058105 | \nPI | \nEP | \n0 | \n... | \n538911303 | \nN | \n66001221 | \n510736006 | \n4 | \n0 | \n2 | \n2 | \n1 | \n1 | \n
1603837 | \n419656375 | \nWO | \n2012087307 | \nW | \n2012-12-24 | \n2012 | \nCN2012/087307 | \nPI | \nCN | \n0 | \n... | \n419656376 | \nN | \n51019632 | \n419626782 | \n4 | \n12 | \n2 | \n5 | \n1 | \n1 | \n
7183441 | \n511620156 | \nWO | \n2017107161 | \nW | \n2017-10-20 | \n2017 | \nCN2017/107161 | \nPI | \nCN | \n0 | \n... | \n511620157 | \nN | \n66173145 | \n511620156 | \n4 | \n1 | \n2 | \n3 | \n1 | \n1 | \n
5588243 | \n494153147 | \nEP | \n18171845 | \nA | \n2018-05-11 | \n2018 | \n18171845 | \nPI | \nNaN | \n0 | \n... | \n520464429 | \nN | \n62152456 | \n494153147 | \n3 | \n3 | \n1 | \n2 | \n1 | \n0 | \n
... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n... | \n
2295082 | \n440740099 | \nWO | \n2013088240 | \nW | \n2013-11-29 | \n2013 | \nCN2013/088240 | \nPI | \nCN | \n0 | \n... | \n440740100 | \nN | \n53198253 | \n440740099 | \n4 | \n2 | \n5 | \n4 | \n1 | \n1 | \n
12569735 | \n582929150 | \nWO | \n2021092424 | \nW | \n2021-05-08 | \n2021 | \nCN2021/092424 | \nPI | \nCN | \n0 | \n... | \n582929151 | \nN | \n84027865 | \n582929150 | \n1 | \n0 | \n2 | \n1 | \n1 | \n1 | \n
8050187 | \n523796882 | \nWO | \n2018091667 | \nW | \n2018-06-15 | \n2018 | \nCN2018/091667 | \nPI | \nCN | \n0 | \n... | \n523796883 | \nN | \n68841789 | \n523796882 | \n4 | \n2 | \n2 | \n3 | \n1 | \n1 | \n
5582748 | \n494089044 | \nWO | \n2016104438 | \nW | \n2016-11-03 | \n2016 | \nCN2016/104438 | \nPI | \nCN | \n0 | \n... | \n494089045 | \nN | \n62076012 | \n494089044 | \n3 | \n1 | \n2 | \n4 | \n1 | \n1 | \n
716562 | \n405080010 | \nWO | \n2013056669 | \nW | \n2013-03-28 | \n2013 | \nEP2013/056669 | \nPI | \nEP | \n0 | \n... | \n422430381 | \nN | \n48045501 | \n405080010 | \n5 | \n9 | \n3 | \n2 | \n1 | \n1 | \n
100 rows × 28 columns
\n