Last active
January 29, 2021 10:22
-
-
Save tkamishima/cc0be764cd323506fcef28a7c5a54c4d to your computer and use it in GitHub Desktop.
citation indexes: h & g-index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import numpy as np" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 2, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "# 2021-01-27\n", | |
| "c = np.array([344, 242, 190, 91, 68, 55, 48, 46, 40, 34, 31, 27, 27, 26, 26, 25, 23, 19, 19, 18, 16, 16, 15, 14, 12, 11, 11, 10, 10, 10, 7, 6, 6, 5, 4, 3, 3, 2, 1])" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 3, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "# Japanese publications of which the number is larger than or equal to five\n", | |
| "# 2021-01-29\n", | |
| "jc = np.array([9, 6, 6, 19, 44, 19, 109, 10, 5, 74, 18, 8, 117])\n", | |
| "#c = np.concatenate([c, jc])" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 4, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "[344 242 190 91 68 55 48 46 40 34 31 27 27 26 26 25 23 19\n", | |
| " 19 18 16 16 15 14 12 11 11 10 10 10 7 6 6 5 4 3\n", | |
| " 3 2 1]\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "c.sort()\n", | |
| "c = c[::-1]\n", | |
| "print(c)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 5, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "total citations = 1561\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "print('total citations =', np.sum(c))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 6, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "def h(c):\n", | |
| " for i, n in enumerate(c):\n", | |
| " print(i + 1, n)\n", | |
| " if i + 1 > n:\n", | |
| " return i\n", | |
| " return i" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 7, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "1 344\n", | |
| "2 242\n", | |
| "3 190\n", | |
| "4 91\n", | |
| "5 68\n", | |
| "6 55\n", | |
| "7 48\n", | |
| "8 46\n", | |
| "9 40\n", | |
| "10 34\n", | |
| "11 31\n", | |
| "12 27\n", | |
| "13 27\n", | |
| "14 26\n", | |
| "15 26\n", | |
| "16 25\n", | |
| "17 23\n", | |
| "18 19\n", | |
| "19 19\n", | |
| "20 18\n", | |
| "h-index = 19\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "h_index = h(c)\n", | |
| "print('h-index =', h_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 8, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "def g(c):\n", | |
| " g_sum = 0\n", | |
| " for i, n in enumerate(c):\n", | |
| " g_sum += n\n", | |
| " print(i + 1, (i + 1) ** 2, g_sum)\n", | |
| " if (i + 1) ** 2 > g_sum:\n", | |
| " return i\n", | |
| "\n", | |
| " while not ((i + 1) ** 2 > g_sum):\n", | |
| " i += 1\n", | |
| " print(i + 1, (i + 1) ** 2, g_sum)\n", | |
| "\n", | |
| " return i" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 9, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "1 1 344\n", | |
| "2 4 586\n", | |
| "3 9 776\n", | |
| "4 16 867\n", | |
| "5 25 935\n", | |
| "6 36 990\n", | |
| "7 49 1038\n", | |
| "8 64 1084\n", | |
| "9 81 1124\n", | |
| "10 100 1158\n", | |
| "11 121 1189\n", | |
| "12 144 1216\n", | |
| "13 169 1243\n", | |
| "14 196 1269\n", | |
| "15 225 1295\n", | |
| "16 256 1320\n", | |
| "17 289 1343\n", | |
| "18 324 1362\n", | |
| "19 361 1381\n", | |
| "20 400 1399\n", | |
| "21 441 1415\n", | |
| "22 484 1431\n", | |
| "23 529 1446\n", | |
| "24 576 1460\n", | |
| "25 625 1472\n", | |
| "26 676 1483\n", | |
| "27 729 1494\n", | |
| "28 784 1504\n", | |
| "29 841 1514\n", | |
| "30 900 1524\n", | |
| "31 961 1531\n", | |
| "32 1024 1537\n", | |
| "33 1089 1543\n", | |
| "34 1156 1548\n", | |
| "35 1225 1552\n", | |
| "36 1296 1555\n", | |
| "37 1369 1558\n", | |
| "38 1444 1560\n", | |
| "39 1521 1561\n", | |
| "40 1600 1561\n", | |
| "g-index = 39\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "g_index = g(c)\n", | |
| "print('g-index =', g_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 10, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "hg-index = 27.2213151776324\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "hg_index = np.sqrt(h_index * g_index)\n", | |
| "print('hg-index =', hg_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 11, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "A-index = 72.6842105263158\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "A_index = np.mean(c[:h_index])\n", | |
| "print('A-index =', A_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "R-index = 37.16180835212409\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "R_index = np.sqrt(A_index * h_index)\n", | |
| "print('R-index =', R_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 13, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "e-index = 31.937438845342623\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "e_index = np.sqrt(np.sum(c[:h_index]) - h_index ** 2)\n", | |
| "print('e-index =', e_index)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python [conda env:py3k]", | |
| "language": "python", | |
| "name": "conda-env-py3k-py" | |
| }, | |
| "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.7.9" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment