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62ba9f3
 
 
 
 
 
17e4444
62ba9f3
 
17e4444
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# EDA for cleaned arXiv dataset"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Imports"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Which subject tag occurs the most frequently our 175k dataset?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>Accelerator Physics</th>\n",
       "      <th>Adaptation and Self-Organizing Systems</th>\n",
       "      <th>Algebraic Geometry</th>\n",
       "      <th>Algebraic Topology</th>\n",
       "      <th>Analysis of PDEs</th>\n",
       "      <th>Applications</th>\n",
       "      <th>Applied Physics</th>\n",
       "      <th>Artificial Intelligence</th>\n",
       "      <th>Astrophysics</th>\n",
       "      <th>Astrophysics of Galaxies</th>\n",
       "      <th>...</th>\n",
       "      <th>Strongly Correlated Electrons</th>\n",
       "      <th>Subcellular Processes</th>\n",
       "      <th>Superconductivity</th>\n",
       "      <th>Symbolic Computation</th>\n",
       "      <th>Symplectic Geometry</th>\n",
       "      <th>Systems and Control</th>\n",
       "      <th>Theoretical Economics</th>\n",
       "      <th>Tissues and Organs</th>\n",
       "      <th>Trading and Market Microstructure</th>\n",
       "      <th>UNK</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 150 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Accelerator Physics  Adaptation and Self-Organizing Systems  \\\n",
       "0                False                                   False   \n",
       "1                False                                   False   \n",
       "2                False                                   False   \n",
       "3                False                                   False   \n",
       "4                False                                   False   \n",
       "\n",
       "   Algebraic Geometry  Algebraic Topology  Analysis of PDEs  Applications  \\\n",
       "0               False               False             False         False   \n",
       "1               False               False             False         False   \n",
       "2               False               False             False         False   \n",
       "3               False               False             False         False   \n",
       "4               False               False             False         False   \n",
       "\n",
       "   Applied Physics  Artificial Intelligence  Astrophysics  \\\n",
       "0            False                    False         False   \n",
       "1            False                    False         False   \n",
       "2            False                    False         False   \n",
       "3            False                    False         False   \n",
       "4            False                    False         False   \n",
       "\n",
       "   Astrophysics of Galaxies  ...  Strongly Correlated Electrons  \\\n",
       "0                     False  ...                          False   \n",
       "1                     False  ...                          False   \n",
       "2                     False  ...                          False   \n",
       "3                     False  ...                          False   \n",
       "4                     False  ...                          False   \n",
       "\n",
       "   Subcellular Processes  Superconductivity  Symbolic Computation  \\\n",
       "0                  False              False                 False   \n",
       "1                  False              False                 False   \n",
       "2                  False              False                 False   \n",
       "3                  False              False                 False   \n",
       "4                  False              False                 False   \n",
       "\n",
       "   Symplectic Geometry  Systems and Control  Theoretical Economics  \\\n",
       "0                False                False                  False   \n",
       "1                False                False                  False   \n",
       "2                False                False                  False   \n",
       "3                False                False                  False   \n",
       "4                False                False                  False   \n",
       "\n",
       "   Tissues and Organs  Trading and Market Microstructure    UNK  \n",
       "0               False                              False  False  \n",
       "1               False                              False  False  \n",
       "2               False                              False  False  \n",
       "3               False                              False  False  \n",
       "4               False                              False  False  \n",
       "\n",
       "[5 rows x 150 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cats = pd.read_parquet('./data/arXiv_cat.parquet')\n",
    "cats.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Analysis of PDEs            18944\n",
       "Combinatorics               18930\n",
       "Optimization and Control    18284\n",
       "Mathematical Physics        16381\n",
       "Probability                 15343\n",
       "dtype: int64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## Calculate the number of times each tag appears\n",
    "\n",
    "totals = cats.sum(axis=0).sort_values(ascending=False)\n",
    "totals.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "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>raw_title</th>\n",
       "      <th>clean_title</th>\n",
       "      <th>hyph_in_title</th>\n",
       "      <th>raw_abstract</th>\n",
       "      <th>clean_abstract</th>\n",
       "      <th>hyph_in_abstract</th>\n",
       "      <th>authors_parsed</th>\n",
       "      <th>cat</th>\n",
       "      <th>update_date</th>\n",
       "      <th>id</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>The Prolongation Problem for the Heavenly Equa...</td>\n",
       "      <td>The Prolongation Problem for the Heavenly Equa...</td>\n",
       "      <td>None</td>\n",
       "      <td>We provide an exact regular solution of an o...</td>\n",
       "      <td>We provide an exact regular solution of an o...</td>\n",
       "      <td>None</td>\n",
       "      <td>[['Palese', 'M.', '', 'Dept. Math. Univ. of To...</td>\n",
       "      <td>[math.AP, math-ph, math.MP]</td>\n",
       "      <td>2022-09-21</td>\n",
       "      <td>math/0311218</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>Null Controllability for a Degenerate Structur...</td>\n",
       "      <td>Null Controllability for a Degenerate Structur...</td>\n",
       "      <td>None</td>\n",
       "      <td>In this paper, we consider the infinite dime...</td>\n",
       "      <td>In this paper, we consider the infinite dime...</td>\n",
       "      <td>[final-state]</td>\n",
       "      <td>[['Simporé', 'Yacouba', ''], ['gantouh', 'Yass...</td>\n",
       "      <td>[math.OC, math.AP]</td>\n",
       "      <td>2022-09-09</td>\n",
       "      <td>2209.03645</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>Voting models and semilinear parabolic equations</td>\n",
       "      <td>Voting models and semilinear parabolic equations</td>\n",
       "      <td>None</td>\n",
       "      <td>We present probabilistic interpretations of ...</td>\n",
       "      <td>We present probabilistic interpretations of ...</td>\n",
       "      <td>[semi-linear, Fisher-KPP, group-based, pushmi-...</td>\n",
       "      <td>[['An', 'Jing', ''], ['Henderson', 'Christophe...</td>\n",
       "      <td>[math.AP, math.PR]</td>\n",
       "      <td>2022-09-09</td>\n",
       "      <td>2209.03435</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>Flows of $G_2$-Structures associated to Calabi...</td>\n",
       "      <td>Flows of LATEX  associated to Calabi-Yau Manif...</td>\n",
       "      <td>[Calabi-Yau]</td>\n",
       "      <td>We establish a correspondence between a para...</td>\n",
       "      <td>We establish a correspondence between a para...</td>\n",
       "      <td>[Monge-Ampere, Monge-Ampere, torsion-free, Ric...</td>\n",
       "      <td>[['Picard', 'Sébastien', ''], ['Suan', 'Caleb'...</td>\n",
       "      <td>[math.DG, math.AP]</td>\n",
       "      <td>2022-09-09</td>\n",
       "      <td>2209.03411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>On the dynamics of vortices in viscous 2D flows</td>\n",
       "      <td>On the dynamics of vortices in viscous 2D flows</td>\n",
       "      <td>None</td>\n",
       "      <td>We study the 2D Navier--Stokes solution star...</td>\n",
       "      <td>We study the 2D Navier--Stokes solution star...</td>\n",
       "      <td>None</td>\n",
       "      <td>[['Ceci', 'Stefano', ''], ['Seis', 'Christian'...</td>\n",
       "      <td>[math.AP]</td>\n",
       "      <td>2022-09-09</td>\n",
       "      <td>2203.07185</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            raw_title  \\\n",
       "42  The Prolongation Problem for the Heavenly Equa...   \n",
       "55  Null Controllability for a Degenerate Structur...   \n",
       "59   Voting models and semilinear parabolic equations   \n",
       "72  Flows of $G_2$-Structures associated to Calabi...   \n",
       "78    On the dynamics of vortices in viscous 2D flows   \n",
       "\n",
       "                                          clean_title hyph_in_title  \\\n",
       "42  The Prolongation Problem for the Heavenly Equa...          None   \n",
       "55  Null Controllability for a Degenerate Structur...          None   \n",
       "59   Voting models and semilinear parabolic equations          None   \n",
       "72  Flows of LATEX  associated to Calabi-Yau Manif...  [Calabi-Yau]   \n",
       "78    On the dynamics of vortices in viscous 2D flows          None   \n",
       "\n",
       "                                         raw_abstract  \\\n",
       "42    We provide an exact regular solution of an o...   \n",
       "55    In this paper, we consider the infinite dime...   \n",
       "59    We present probabilistic interpretations of ...   \n",
       "72    We establish a correspondence between a para...   \n",
       "78    We study the 2D Navier--Stokes solution star...   \n",
       "\n",
       "                                       clean_abstract  \\\n",
       "42    We provide an exact regular solution of an o...   \n",
       "55    In this paper, we consider the infinite dime...   \n",
       "59    We present probabilistic interpretations of ...   \n",
       "72    We establish a correspondence between a para...   \n",
       "78    We study the 2D Navier--Stokes solution star...   \n",
       "\n",
       "                                     hyph_in_abstract  \\\n",
       "42                                               None   \n",
       "55                                      [final-state]   \n",
       "59  [semi-linear, Fisher-KPP, group-based, pushmi-...   \n",
       "72  [Monge-Ampere, Monge-Ampere, torsion-free, Ric...   \n",
       "78                                               None   \n",
       "\n",
       "                                       authors_parsed  \\\n",
       "42  [['Palese', 'M.', '', 'Dept. Math. Univ. of To...   \n",
       "55  [['Simporé', 'Yacouba', ''], ['gantouh', 'Yass...   \n",
       "59  [['An', 'Jing', ''], ['Henderson', 'Christophe...   \n",
       "72  [['Picard', 'Sébastien', ''], ['Suan', 'Caleb'...   \n",
       "78  [['Ceci', 'Stefano', ''], ['Seis', 'Christian'...   \n",
       "\n",
       "                            cat update_date            id  \n",
       "42  [math.AP, math-ph, math.MP]  2022-09-21  math/0311218  \n",
       "55           [math.OC, math.AP]  2022-09-09    2209.03645  \n",
       "59           [math.AP, math.PR]  2022-09-09    2209.03435  \n",
       "72           [math.DG, math.AP]  2022-09-09    2209.03411  \n",
       "78                    [math.AP]  2022-09-09    2203.07185  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## Create the dataset of all pde articles\n",
    "\n",
    "full_data = pd.read_parquet('./data/arXiv_clean.parquet')\n",
    "pde = full_data.loc[cats['Analysis of PDEs'] == True]\n",
    "pde.head()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Next goal: Does the raw arxiv dataset contain the MSC subject information?\n",
    "\n",
    "No, it doesn't -- this was verified in a kaggle notebook. It has only arxiv subject tag information."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Frequently occuring author names. Discover some large subsets of the data consisting of papers who have at least one author with a given name. What are the most commonly occuring names?"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}