|
| 1 | +<meta charset="UTF-8"> |
| 2 | +<!-- |
| 3 | +<script type='text/javascript' src="https://code.jquery.com/jquery-3.7.1.js"></script> |
| 4 | +<script type='text/javascript' src="https://cdn.datatables.net/2.1.2/js/dataTables.js"></script> |
| 5 | +<link href="https://cdn.datatables.net/2.1.2/css/dataTables.dataTables.css" rel="stylesheet" type="text/css"> |
| 6 | +--> |
| 7 | +<script type='text/javascript' src="https://code.jquery.com/jquery-3.7.1.js"></script> |
| 8 | +<script type='text/javascript' src="https://cdn.datatables.net/2.3.2/js/dataTables.min.js"></script> |
| 9 | +<link href="https://cdn.datatables.net/2.3.2/css/dataTables.dataTables.css" rel="stylesheet" type="text/css"> |
| 10 | + |
| 11 | +# Submissions by Institution (2024) |
| 12 | + |
| 13 | +_See more [arXiv in Numbers](2024_usage.md)_ |
| 14 | + |
| 15 | +Institutional members can view annual reports on their membership dashboard. [To learn how this information is used in the membership program, see here](../../about/membership.md). The following table shows submissions by institution in 2022, 2023, and 2024. Don't see your institution? Contact [membership@arxiv.org](mailto:membership.arxiv.org). |
| 16 | + |
| 17 | +--- |
| 18 | +**NOTE** |
| 19 | + |
| 20 | + - Please allow 20-30 seconds for the table to fully load. The filter UI may be unresponsive until the data is fully loaded. |
| 21 | + - The filter options are combined with a <strong>logical AND</strong>. In general, you will want to Select All on at least one column. |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | + |
| 26 | +<style> |
| 27 | + |
| 28 | + .filters-wrapper { |
| 29 | + display: flex; |
| 30 | + justify-content: space-between; |
| 31 | + margin-bottom: 20px; |
| 32 | + width: 100%; |
| 33 | + } |
| 34 | + |
| 35 | + .filter-item { |
| 36 | + box-sizing: border-box; |
| 37 | + } |
| 38 | + |
| 39 | + .filter-item:first-child { |
| 40 | + width: calc(65% - 20px); |
| 41 | + } |
| 42 | + |
| 43 | + .filter-item:last-child { |
| 44 | + width: 35%; |
| 45 | + } |
| 46 | + |
| 47 | +.filters-container { |
| 48 | + height: 200px; |
| 49 | + overflow-y: auto; |
| 50 | + border: 1px solid #ccc; |
| 51 | + padding: 10px; |
| 52 | + font-size: .9em; |
| 53 | +} |
| 54 | + |
| 55 | + #institution_rank_wrapper { |
| 56 | + width: 100%; |
| 57 | + } |
| 58 | + |
| 59 | + .dataTables_wrapper { |
| 60 | + width: 100%; |
| 61 | + } |
| 62 | + |
| 63 | + .dataTables_filter { |
| 64 | + width: 30%; |
| 65 | + float: right; |
| 66 | + } |
| 67 | + |
| 68 | + table.dataTable { |
| 69 | + width: 100% !important; |
| 70 | + font-size: .9em; |
| 71 | + } |
| 72 | + |
| 73 | + table.dataTable thead th { |
| 74 | + white-space: nowrap; |
| 75 | + } |
| 76 | + |
| 77 | + #institution-filter br, |
| 78 | + #country-filter br { |
| 79 | + display: none; |
| 80 | + } |
| 81 | + |
| 82 | + #institution-filter label, |
| 83 | + #country-filter label { |
| 84 | + display: flex; |
| 85 | + align-items: flex-start; |
| 86 | + margin-bottom: 5px; |
| 87 | + line-height: 1.2; |
| 88 | + } |
| 89 | + |
| 90 | + #institution-filter input[type="checkbox"], |
| 91 | + #country-filter input[type="checkbox"] { |
| 92 | + margin-right: 5px; |
| 93 | + margin-top: 2px; |
| 94 | + } |
| 95 | + |
| 96 | + #institution-filter label span, |
| 97 | + #country-filter label span { |
| 98 | + display: inline-block; |
| 99 | + padding-left: 20px; |
| 100 | + text-indent: -20px; |
| 101 | + } |
| 102 | + |
| 103 | + .filter-item input[type="text"] { |
| 104 | + width: 100%; |
| 105 | + padding: 5px; |
| 106 | + margin-bottom: 10px; |
| 107 | + border: 1px solid #ccc; |
| 108 | + border-radius: 4px; |
| 109 | + box-sizing: border-box; |
| 110 | + } |
| 111 | +</style> |
| 112 | + |
| 113 | + |
| 114 | +<h4 style="margin: 0;">Filter Options</h4> |
| 115 | +<div class="filters-wrapper"> |
| 116 | + <div class="filter-item"> |
| 117 | + <h5 style="margin-bottom: 0px;">Institution Name</h5> |
| 118 | + <input type="text" id="institution-search" placeholder="Filter institution selector"> |
| 119 | + <div class="filters-container" id="institution-filter-container"> |
| 120 | + <div id="institution-filter"></div> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + <div class="filter-item"> |
| 124 | + <h5 style="margin-bottom: 0px;">Country</h5> |
| 125 | + <input type="text" id="country-search" placeholder="Filter country selector"> |
| 126 | + <div class="filters-container" id="country-filter-container"> |
| 127 | + <div id="country-filter"></div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | +</div> |
| 131 | +<p> |
| 132 | +</p> |
| 133 | + |
| 134 | +<hr style="margin: 1em 0;"> |
| 135 | + |
| 136 | +<div id="institution_rank_wrapper"> |
| 137 | + <h4>Announced Submissions by Institution</h4> |
| 138 | + <table id="institution_rank" class="display compact"></table> |
| 139 | +</div> |
| 140 | + |
| 141 | + |
| 142 | +<script type='text/javascript' src="https://storage.googleapis.com/info-arxiv-org-stats/institution_submissions_2024_all.js"></script> |
| 143 | + |
| 144 | +<script type='text/javascript'> |
| 145 | + let institutions = []; |
| 146 | +let countries = []; |
| 147 | + |
| 148 | +let selectedInstitutions = []; |
| 149 | +let selectedCountries = []; |
| 150 | + |
| 151 | +// console.log(dataSet) |
| 152 | +dataSet.forEach(entry => { |
| 153 | + const institution = entry[1]; |
| 154 | + const country = entry[3]; |
| 155 | + institutions.push(institution); |
| 156 | + countries.push(country); |
| 157 | +}); |
| 158 | + |
| 159 | +// console.log(institutions) |
| 160 | +// console.log(countries) |
| 161 | + |
| 162 | + |
| 163 | +jQuery.fn.dataTable.ext.type.order['ignore-punct-pre'] = function(data) { |
| 164 | + // Remove leading punctuation and whitespace |
| 165 | + return data.replace(/^[\p{P}\p{S}\s]+/u, '').toLowerCase(); |
| 166 | +}; |
| 167 | + |
| 168 | + |
| 169 | +//function reorderFilter(list) { |
| 170 | +// return [...new Set(list)].sort(); |
| 171 | +//} |
| 172 | +function reorderFilter(list) { |
| 173 | + return [...new Set(list)].sort((a, b) => { |
| 174 | + const stripPunctuation = str => str.replace(/^[^\w\s]+/, '').toLowerCase(); |
| 175 | + return stripPunctuation(a).localeCompare(stripPunctuation(b)); |
| 176 | + }); |
| 177 | +} |
| 178 | + |
| 179 | + |
| 180 | +institutions = reorderFilter(institutions) |
| 181 | +countries = reorderFilter(countries) |
| 182 | + |
| 183 | +function createFilterOptions(containerId, items, selectedItems) { |
| 184 | + const container = document.getElementById(containerId); |
| 185 | + |
| 186 | + if (!container) { |
| 187 | + console.error(`Container with ID '${containerId}' not found`); |
| 188 | + return; |
| 189 | + } |
| 190 | + const selectAllLabel = document.createElement('label'); |
| 191 | + selectAllLabel.htmlFor = `${containerId}-select-all`; |
| 192 | + |
| 193 | + const selectAllCheckbox = document.createElement('input'); |
| 194 | + selectAllCheckbox.type = 'checkbox'; |
| 195 | + selectAllCheckbox.id = `${containerId}-select-all`; |
| 196 | + selectAllCheckbox.value = 'select-all'; |
| 197 | + selectAllCheckbox.checked = true; |
| 198 | + |
| 199 | + selectAllLabel.appendChild(selectAllCheckbox); |
| 200 | + selectAllLabel.appendChild(document.createTextNode('Select/Deselect All')); |
| 201 | + |
| 202 | + container.appendChild(selectAllLabel); |
| 203 | + container.appendChild(document.createElement('br')); |
| 204 | + |
| 205 | + selectAllCheckbox.addEventListener('change', function() { |
| 206 | + const checkboxes = container.querySelectorAll(`input[type=checkbox]:not(#${containerId}-select-all)`); |
| 207 | + checkboxes.forEach(checkbox => { |
| 208 | + checkbox.checked = this.checked; |
| 209 | + const itemIndex = selectedItems.indexOf(checkbox.value); |
| 210 | + if (this.checked && itemIndex === -1) { |
| 211 | + selectedItems.push(checkbox.value); |
| 212 | + } else if (!this.checked && itemIndex > -1) { |
| 213 | + selectedItems.splice(itemIndex, 1); |
| 214 | + } |
| 215 | + }); |
| 216 | + updateTable(); |
| 217 | + }); |
| 218 | + |
| 219 | + items.forEach((item,index) => { |
| 220 | + const label = document.createElement('label'); |
| 221 | + label.htmlFor=`${containerId}-checkbox-${index}`; |
| 222 | + |
| 223 | + const checkbox = document.createElement('input'); |
| 224 | + checkbox.type = 'checkbox'; |
| 225 | + checkbox.id = `${containerId}-checkbox-${index}`; |
| 226 | + checkbox.value = item; |
| 227 | + checkbox.checked = true; |
| 228 | + |
| 229 | + selectedItems.push(item); |
| 230 | + |
| 231 | + label.appendChild(checkbox); |
| 232 | + label.appendChild(document.createTextNode(item)); |
| 233 | + |
| 234 | + container.appendChild(label); |
| 235 | + container.appendChild(document.createElement('br')); |
| 236 | + }); |
| 237 | + |
| 238 | + updateTable(); |
| 239 | + |
| 240 | + container.addEventListener('change', (event) => { |
| 241 | + if (event.target.type === 'checkbox') { |
| 242 | + if (event.target.checked) { |
| 243 | + selectedItems.push(event.target.value); |
| 244 | + } else { |
| 245 | + const index = selectedItems.indexOf(event.target.value); |
| 246 | + if (index > -1) { |
| 247 | + selectedItems.splice(index, 1); |
| 248 | + } |
| 249 | + } |
| 250 | + const allChecked = Array.from(container.querySelectorAll(`input[type=checkbox]:not(#${containerId}-select-all)`)).every(cb => cb.checked); |
| 251 | + selectAllCheckbox.checked = allChecked; |
| 252 | + updateTable(); |
| 253 | + } |
| 254 | + }); |
| 255 | +} |
| 256 | + |
| 257 | +const escapeRegex = str => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| 258 | + |
| 259 | +function updateTable() { |
| 260 | + var institutionRegex = new RegExp( |
| 261 | + `^(?:${selectedInstitutions.map(escapeRegex).join('|')})$`, |
| 262 | + 'u' // unicode aware |
| 263 | + ); |
| 264 | + // This does not work with dashes: |
| 265 | + // var institutionRegex = new RegExp( |
| 266 | + // `^(?:${selectedInstitutions.map(name => $.fn.dataTable.util.escapeRegex(name)).join('|')})$`, |
| 267 | + // 'u' // unicode aware |
| 268 | + // ); |
| 269 | + //console.log(institutionRegex); |
| 270 | + //console.log(institutionRegex.test("CNRS Ingénierie")); // true |
| 271 | + var countryRegex = `^(${selectedCountries.join('|')})$`; |
| 272 | + table.column(1).search(institutionRegex.source, true, false); |
| 273 | + table.column(3).search(countryRegex, true, false); |
| 274 | + table.draw(); |
| 275 | +} |
| 276 | + |
| 277 | +let table; |
| 278 | + |
| 279 | +$(document).ready(function () { |
| 280 | + // Initialize data table |
| 281 | + table = $('#institution_rank').DataTable({ |
| 282 | + data: dataSet, // This should be an array of arrays or array of objects |
| 283 | + columns: [ |
| 284 | + { title: 'Rank' }, |
| 285 | + { title: 'Org Name' }, |
| 286 | + { title: 'ROR.org' }, |
| 287 | + { title: 'Org Country' }, |
| 288 | + { title: 'Avg Papers' } |
| 289 | + ], |
| 290 | + columnDefs: [{ type: 'string-utf8', targets: 1 }], |
| 291 | + pageLength: 25 |
| 292 | + }); |
| 293 | + |
| 294 | + // Filter institutions |
| 295 | + $("#institution-search").on("keyup", function () { |
| 296 | + const value = $(this).val().toLowerCase(); |
| 297 | + $("#institution-filter label").filter(function() { |
| 298 | + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); |
| 299 | + }); |
| 300 | + }); |
| 301 | + |
| 302 | + // Filter country |
| 303 | + $("#country-search").on("keyup", function () { |
| 304 | + const value = $(this).val().toLowerCase(); |
| 305 | + $("#country-filter label").filter(function () { |
| 306 | + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); |
| 307 | + }); |
| 308 | + }); |
| 309 | + |
| 310 | + createFilterOptions('institution-filter',institutions,selectedInstitutions); |
| 311 | + createFilterOptions('country-filter',countries,selectedCountries); |
| 312 | +}); |
| 313 | + |
| 314 | +</script> |
| 315 | + |
| 316 | + |
| 317 | +2022 and 2023 data provided by |
| 318 | +<img width="44" style="vertical-align:middle" src='https://arxiv.org/scopus.png'/> |
0 commit comments