ontometer_corpus.paper.figures¶
Publication figures and headline numbers of the corpus, from the corpus tables.
Part of the resource paper's analysis. Every figure is drawn from the
corpus tables and the per-ontology metric table
(ontometer_corpus.ontology_metrics), sized for a single-column LNCS page
(4.8 in text width) in the shared style of figstyle, and without
titles, which the captions carry. The numbers the text quotes are computed by
the code that draws the figure they belong to and written as LaTeX macros.
<corpus>/corpus.db, the network tables, namespace_usage,
ontology_metrics and the three G(t) tables; with --store, the
term-graph tables in the store's cache, for the size of T; with
--comparators DIR, the reuse networks of other kinds that
ontometer-corpus paper comparators fetch stored there.
Usage
ontometer-corpus paper figures --out /path/to/figures --comparators DIR ontometer-corpus paper figures --out /path/to/figures --only poincare_gt
Attributes¶
GOF_CACHE = CACHE_DIR / 'powerlaw_gof.json'
module-attribute
¶
N_BOOTSTRAP = 500
module-attribute
¶
BOOTSTRAP_SEED = 0
module-attribute
¶
GT_YEARS = (2010.0, 2018.0)
module-attribute
¶
COMMUNITIES = ('LOV', 'OBO')
module-attribute
¶
GT_LABELS = 5
module-attribute
¶
NETWORK_COLORS = {'corpus': BRAND_BLUE, 'cran': '#E67E22', 'debian': '#1baf7a', 'lod': '#6250d6'}
module-attribute
¶
CURVE_LABEL_AT = {'lod': 30, 'cran': 1500}
module-attribute
¶
NETWORK_SHORT = {'corpus': 'corpus', 'cran': 'CRAN', 'debian': 'Debian', 'lod': 'LOD cloud'}
module-attribute
¶
TOP_FRACTION = 0.01
module-attribute
¶
PLACED = {'http://xmlns.com/foaf/0.1/': 'FOAF', 'http://www.w3.org/ns/prov#': 'PROV-O', 'http://purl.obolibrary.org/obo/bfo.owl': 'BFO', 'http://purl.obolibrary.org/obo/go.owl': 'GO', 'http://edamontology.org': 'EDAM', 'http://www.loa-cnr.it/ontologies/DUL.owl': 'DUL'}
module-attribute
¶
PLACED_MEASURES = (('class_count', 'classes'), ('property_count', 'properties'), ('max_depth_long', 'hierarchy\ndepth'), ('multiple_inheritance_rate', 'multiple\ninheritance'), ('restriction_density', 'restrictions\nper class'), ('coupling_ratio', 'coupling\nratio'))
module-attribute
¶
DENSITY_REGISTRIES = ('OKG', 'OBO', 'LOV')
module-attribute
¶
GAP_POSITIONS = [('both', 'builds on others, built on'), ('builds', 'builds on others only'), ('built', 'built on only'), ('isolated', 'isolated')]
module-attribute
¶
GAP_LABELS_NAMED = 2
module-attribute
¶
REDECLARED_WIDE = 20
module-attribute
¶
REPEATED_PER_ONTOLOGY = 2
module-attribute
¶
REDECLARED_LISTED = 8
module-attribute
¶
BIRTHS_RECENT_FROM = 2018
module-attribute
¶
BIRTHS_EARLY = (2010, 2015)
module-attribute
¶
COHORT_BREAKS = (2011, 2014, 2017, 2020, 2023)
module-attribute
¶
REGISTRATION_WINDOW = 3
module-attribute
¶
N_WINDOW_BOOTSTRAP = 2000
module-attribute
¶
ACTIVE_YEARS = 2
module-attribute
¶
DIVERGENCE_STARTS = (2008, 2011, 2014, 2017, 2020, 2023)
module-attribute
¶
DIVERGENCE_BASE = 2011
module-attribute
¶
FIGURES = {'corpus_composition': fig_corpus_composition, 'reuse_network': fig_reuse_network, 'poincare_gt': fig_poincare_gt, 'size_distributions': fig_size_distributions, 'inequality': fig_inequality, 'declared_vs_actual': fig_declared_vs_actual, 'registry_reuse': fig_registry_reuse, 'placing': fig_placing, 'coupling_ratio': fig_coupling_ratio, 'structure_shape': fig_structure_shape, 'gaps': fig_gaps, 'release_years': fig_release_years, 'dating_sources': fig_dating_sources, 'extremes': fig_extremes, 'births': fig_births, 'cohorts': fig_cohorts}
module-attribute
¶
PUBLISHED = ('births', 'cohorts', 'poincare_gt', 'extremes', 'gaps', 'inequality')
module-attribute
¶
Classes¶
Corpus
¶
The populations the figures draw on, loaded once and shared.
Registry rows and fetch outcomes cover the whole inventory; the
logical-reuse network g and the structural population p4 leave
SKOS-dominated sources out (ontometer_corpus.ontology_metrics).
Source code in ontometer_corpus/paper/figures.py
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 | |
Attributes¶
paths = paths
instance-attribute
¶
comparators_dir = comparators_dir
instance-attribute
¶
github_dir = github_dir
instance-attribute
¶
stats = {}
instance-attribute
¶
github
cached
property
¶
Sampled GitHub ontologies matched to the registries (ontometer-corpus paper github).
comparators
cached
property
¶
Reuse networks of other kinds (ontometer-corpus paper comparators), empty without a directory.
comparator_date
property
¶
The latest retrieval date of the comparator snapshots.
counts
cached
property
¶
Unique ontologies per home registry and per registry of the kept copy.
source_order
cached
property
¶
group
cached
property
¶
Registry -> the group it is drawn as.
group_color
cached
property
¶
scatter_group
cached
property
¶
Registry -> group in a scatter, where only the first few keep a hue.
outcomes
cached
property
¶
One terminal outcome per source record, per registry.
version_groups
cached
property
¶
Parsed versions per release family holding a latest copy.
views
cached
property
¶
g_all
property
¶
Every usage and import edge, SKOS-dominated sources removed.
g
property
¶
The logical-reuse view: imports plus usage edges with a logically used term.
corpus_nodes
property
¶
home
cached
property
¶
corpus_links
cached
property
¶
One link per ordered pair of corpus ontologies, no self-loops.
logical_ns_by_file
cached
property
¶
p4
cached
property
¶
Latest parsed ontologies with structural and coupling metrics, SKOS-dominated left out.
Methods:¶
__init__(paths, comparators_dir=None, github_dir=None)
¶
Source code in ontometer_corpus/paper/figures.py
color(registry)
¶
scatter_color(registry)
¶
external_ratio(n)
¶
Share of the vocabularies an ontology uses logically that g resolves elsewhere.
TailFit
¶
A discrete power-law fit to the positive values, with the alternatives compared.
Source code in ontometer_corpus/paper/figures.py
Attributes¶
pos = [v for v in values if v > 0]
instance-attribute
¶
fit = powerlaw.Fit(self.pos, discrete=True, verbose=False)
instance-attribute
¶
comparisons = {'log-normal': self.fit.distribution_compare('power_law', 'lognormal'), 'exponential': self.fit.distribution_compare('power_law', 'exponential'), 'truncated power law': self.fit.distribution_compare('power_law', 'truncated_power_law', nested=True)}
instance-attribute
¶
alpha
property
¶
xmin
property
¶
n_tail
property
¶
better
property
¶
Alternatives that fit the tail significantly better than the power law (p < 0.1).
Methods:¶
__init__(values)
¶
Source code in ontometer_corpus/paper/figures.py
ccdf(dist, ks)
¶
P(K >= k) over all positive values, for k in the tail, under a fitted distribution.
Source code in ontometer_corpus/paper/figures.py
Functions:¶
registry_order(db_path)
¶
Home registries by the number of unique ontologies (latest versions) they hold.
Source code in ontometer_corpus/paper/figures.py
fig_corpus_composition(c)
¶
Per registry: ontologies captured, how each record failed, version history.
Source code in ontometer_corpus/paper/figures.py
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 | |
bridges(links, home)
¶
Ontologies that reuse an ontology of each closed community.
Source code in ontometer_corpus/paper/figures.py
fig_reuse_network(c)
¶
Largest connected component of the logical-reuse network among corpus ontologies.
Source code in ontometer_corpus/paper/figures.py
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | |
fig_poincare_gt(c)
¶
G(t) in the Poincaré disk at two years and at capture, as the explorer draws it.
Source code in ontometer_corpus/paper/figures.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 | |
fig_size_distributions(c)
¶
Triples, classes, properties and individuals per ontology, by home registry.
Source code in ontometer_corpus/paper/figures.py
fig_inequality(c)
¶
Reuse received by the corpus against other reuse networks: in-degree tail and top shares.
Source code in ontometer_corpus/paper/figures.py
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 | |
fig_placing(c)
¶
Widely used ontologies as percentiles of the corpus on structural measures.
Source code in ontometer_corpus/paper/figures.py
comparator_table(c)
¶
The corpus and the other reuse networks side by side, as a LaTeX table.
Source code in ontometer_corpus/paper/figures.py
fig_declared_vs_actual(c)
¶
(ontology, corpus ontology) reuse pairs: hard (imported and used), soft (used, never imported), vestigial.
Source code in ontometer_corpus/paper/figures.py
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 | |
fig_registry_reuse(c)
¶
Where each registry's ontologies find the corpus ontologies they reuse.
Source code in ontometer_corpus/paper/figures.py
fig_coupling_ratio(c)
¶
Term-level coupling ratio, and against the share of namespaces owned by others.
Source code in ontometer_corpus/paper/figures.py
fig_structure_shape(c)
¶
Schema density against instance volume, and the depth and branching of hierarchies.
Source code in ontometer_corpus/paper/figures.py
1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 | |
density_stats(c, sd)
¶
Schema density: its two point masses, the shape between them, and three registries.
The dip test is run on the full sample and on the values strictly between the point masses at 0 and 1, with tied values spread over half the gap to their neighbours, so that neither a point mass nor ties can make a single-peaked distribution look bimodal.
Source code in ontometer_corpus/paper/figures.py
fig_gaps(c)
¶
Where ontologies fail to connect: isolated hierarchies, and labels modelled again and again.
Source code in ontometer_corpus/paper/figures.py
1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 | |
gap_stats(c)
¶
The numbers of the gaps paragraphs: isolation in G, bridges in N, redeclared labels.
Source code in ontometer_corpus/paper/figures.py
1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 | |
births_stats(c)
¶
New ontologies per year by first-evidence birth: the recent rate and the peak.
Source code in ontometer_corpus/paper/figures.py
fig_extremes(c)
¶
Ontologies sit at the extremes: schema density, coupling, and coupling by namespace.
Source code in ontometer_corpus/paper/figures.py
fig_births(c)
¶
New ontologies per year by first-evidence date, by home registry, and the relative growth.
Source code in ontometer_corpus/paper/figures.py
1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 | |
fig_cohorts(c)
¶
Specialisation by period of first evidence, on its own (the extended version's figure).
Source code in ontometer_corpus/paper/figures.py
fig_release_years(c)
¶
Distinct parsed versions per release year, stacked by the registry that published them.
Source code in ontometer_corpus/paper/figures.py
fig_dating_sources(c)
¶
Which source dates each ontology, by registry, and how far first evidence moves a date.
Source code in ontometer_corpus/paper/figures.py
time_stats(c)
¶
The numbers of the dating section: coverage, link timing and the dating check.
Source code in ontometer_corpus/paper/figures.py
construction_stats(c)
¶
The numbers of the construction section: funnel, capture window, parse paths, kinds.
Source code in ontometer_corpus/paper/figures.py
2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 | |
term_graph_stats(c)
¶
Nodes and edges of T, built as ontometer-corpus abstractness builds it, when the store is given.
T keeps own and bridge edges, and copies whose child no corpus ontology owns, each (child, parent) pair once. Its entity tables live in the store's cache, not the corpus.
Source code in ontometer_corpus/paper/figures.py
network_stats(c)
¶
The numbers of the networks section: nodes and edges per layer.
Source code in ontometer_corpus/paper/figures.py
specialisation_stats(c)
¶
Specialisation pairs of G: overlap with reuse, how thin they are, who they gather on.
Source code in ontometer_corpus/paper/figures.py
mixing_stats(c)
¶
Class/instance mixing: own classes that some file uses as a class and an individual at once.
Source code in ontometer_corpus/paper/figures.py
registry_table(c)
¶
The funnel from listed records to unique ontologies, per registry, as a LaTeX table.
File-level stages count under the registry that published the file; unique ontologies and their subsets count under the home registry. The totals row is the corpus funnel.
Source code in ontometer_corpus/paper/figures.py
2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 | |
hub_table(c, n=10)
¶
The most reused corpus ontologies as a LaTeX table: reusing ontologies and PageRank.
Source code in ontometer_corpus/paper/figures.py
main(out, only, write_stats, comparators_dir, github_dir, paths)
¶
Draw the publication figures and write their numbers as LaTeX macros.
Source code in ontometer_corpus/paper/figures.py
2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 | |