@graphty/graph-samples 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +123 -0
- package/README.md +190 -1
- package/dist/chunks/build-DdCe60t3.js +47 -0
- package/dist/chunks/build-DdCe60t3.js.map +1 -0
- package/dist/chunks/meta-B6toBzaa.js +19 -0
- package/dist/chunks/meta-B6toBzaa.js.map +1 -0
- package/dist/chunks/meta-BM_YIhlA.js +28 -0
- package/dist/chunks/meta-BM_YIhlA.js.map +1 -0
- package/dist/chunks/meta-BMmtUpPx.js +30 -0
- package/dist/chunks/meta-BMmtUpPx.js.map +1 -0
- package/dist/chunks/meta-BXC7oi86.js +22 -0
- package/dist/chunks/meta-BXC7oi86.js.map +1 -0
- package/dist/chunks/meta-BaFPvhc1.js +19 -0
- package/dist/chunks/meta-BaFPvhc1.js.map +1 -0
- package/dist/chunks/meta-C58v1Oy0.js +28 -0
- package/dist/chunks/meta-C58v1Oy0.js.map +1 -0
- package/dist/chunks/meta-CQRXyexG.js +23 -0
- package/dist/chunks/meta-CQRXyexG.js.map +1 -0
- package/dist/chunks/meta-DrgM1eS0.js +23 -0
- package/dist/chunks/meta-DrgM1eS0.js.map +1 -0
- package/dist/chunks/meta-IhoaDXAV.js +19 -0
- package/dist/chunks/meta-IhoaDXAV.js.map +1 -0
- package/dist/chunks/meta-MQPbBUUB.js +29 -0
- package/dist/chunks/meta-MQPbBUUB.js.map +1 -0
- package/dist/chunks/meta-Qp4HNYAZ.js +24 -0
- package/dist/chunks/meta-Qp4HNYAZ.js.map +1 -0
- package/dist/chunks/meta-mns0uFIW.js +19 -0
- package/dist/chunks/meta-mns0uFIW.js.map +1 -0
- package/dist/datasets/celegans-neural.d.ts +1 -0
- package/dist/datasets/celegans-neural.js +7359 -0
- package/dist/datasets/celegans-neural.js.map +1 -0
- package/dist/datasets/contiguous-usa.d.ts +1 -0
- package/dist/datasets/contiguous-usa.js +501 -0
- package/dist/datasets/contiguous-usa.js.map +1 -0
- package/dist/datasets/davis-southern-women.d.ts +1 -0
- package/dist/datasets/davis-southern-women.js +235 -0
- package/dist/datasets/davis-southern-women.js.map +1 -0
- package/dist/datasets/dolphins.d.ts +1 -0
- package/dist/datasets/dolphins.js +406 -0
- package/dist/datasets/dolphins.js.map +1 -0
- package/dist/datasets/florentine-families.d.ts +1 -0
- package/dist/datasets/florentine-families.js +75 -0
- package/dist/datasets/florentine-families.js.map +1 -0
- package/dist/datasets/football.d.ts +1 -0
- package/dist/datasets/football.js +1508 -0
- package/dist/datasets/football.js.map +1 -0
- package/dist/datasets/karate.d.ts +1 -0
- package/dist/datasets/karate.js +295 -0
- package/dist/datasets/karate.js.map +1 -0
- package/dist/datasets/knuth-miles.d.ts +1 -0
- package/dist/datasets/knuth-miles.js +24933 -0
- package/dist/datasets/knuth-miles.js.map +1 -0
- package/dist/datasets/les-miserables.d.ts +1 -0
- package/dist/datasets/les-miserables.js +860 -0
- package/dist/datasets/les-miserables.js.map +1 -0
- package/dist/datasets/openflights.d.ts +1 -0
- package/dist/datasets/openflights.js +130277 -0
- package/dist/datasets/openflights.js.map +1 -0
- package/dist/datasets/political-blogs.d.ts +1 -0
- package/dist/datasets/political-blogs.js +42551 -0
- package/dist/datasets/political-blogs.js.map +1 -0
- package/dist/datasets/political-books.d.ts +1 -0
- package/dist/datasets/political-books.js +1124 -0
- package/dist/datasets/political-books.js.map +1 -0
- package/dist/generators.d.ts +1 -0
- package/dist/generators.js +4496 -0
- package/dist/generators.js.map +1 -0
- package/dist/graph-samples.d.ts +1 -0
- package/dist/graph-samples.js +142 -0
- package/dist/graph-samples.js.map +1 -0
- package/dist/src/datasets/build.d.ts +89 -0
- package/dist/src/datasets/build.d.ts.map +1 -0
- package/dist/src/datasets/build.js +53 -0
- package/dist/src/datasets/build.js.map +1 -0
- package/dist/src/datasets/catalog.d.ts +8 -0
- package/dist/src/datasets/catalog.d.ts.map +1 -0
- package/dist/src/datasets/catalog.js +34 -0
- package/dist/src/datasets/catalog.js.map +1 -0
- package/dist/src/datasets/celegans-neural/data.d.ts +3 -0
- package/dist/src/datasets/celegans-neural/data.d.ts.map +1 -0
- package/dist/src/datasets/celegans-neural/data.js +573 -0
- package/dist/src/datasets/celegans-neural/data.js.map +1 -0
- package/dist/src/datasets/celegans-neural/index.d.ts +11 -0
- package/dist/src/datasets/celegans-neural/index.d.ts.map +1 -0
- package/dist/src/datasets/celegans-neural/index.js +14 -0
- package/dist/src/datasets/celegans-neural/index.js.map +1 -0
- package/dist/src/datasets/celegans-neural/meta.d.ts +4 -0
- package/dist/src/datasets/celegans-neural/meta.d.ts.map +1 -0
- package/dist/src/datasets/celegans-neural/meta.js +21 -0
- package/dist/src/datasets/celegans-neural/meta.js.map +1 -0
- package/dist/src/datasets/contiguous-usa/data.d.ts +3 -0
- package/dist/src/datasets/contiguous-usa/data.d.ts.map +1 -0
- package/dist/src/datasets/contiguous-usa/data.js +162 -0
- package/dist/src/datasets/contiguous-usa/data.js.map +1 -0
- package/dist/src/datasets/contiguous-usa/index.d.ts +11 -0
- package/dist/src/datasets/contiguous-usa/index.d.ts.map +1 -0
- package/dist/src/datasets/contiguous-usa/index.js +14 -0
- package/dist/src/datasets/contiguous-usa/index.js.map +1 -0
- package/dist/src/datasets/contiguous-usa/meta.d.ts +4 -0
- package/dist/src/datasets/contiguous-usa/meta.d.ts.map +1 -0
- package/dist/src/datasets/contiguous-usa/meta.js +27 -0
- package/dist/src/datasets/contiguous-usa/meta.js.map +1 -0
- package/dist/src/datasets/davis-southern-women/data.d.ts +3 -0
- package/dist/src/datasets/davis-southern-women/data.d.ts.map +1 -0
- package/dist/src/datasets/davis-southern-women/data.js +57 -0
- package/dist/src/datasets/davis-southern-women/data.js.map +1 -0
- package/dist/src/datasets/davis-southern-women/index.d.ts +11 -0
- package/dist/src/datasets/davis-southern-women/index.d.ts.map +1 -0
- package/dist/src/datasets/davis-southern-women/index.js +14 -0
- package/dist/src/datasets/davis-southern-women/index.js.map +1 -0
- package/dist/src/datasets/davis-southern-women/meta.d.ts +4 -0
- package/dist/src/datasets/davis-southern-women/meta.d.ts.map +1 -0
- package/dist/src/datasets/davis-southern-women/meta.js +17 -0
- package/dist/src/datasets/davis-southern-women/meta.js.map +1 -0
- package/dist/src/datasets/dolphins/data.d.ts +3 -0
- package/dist/src/datasets/dolphins/data.d.ts.map +1 -0
- package/dist/src/datasets/dolphins/data.js +93 -0
- package/dist/src/datasets/dolphins/data.js.map +1 -0
- package/dist/src/datasets/dolphins/index.d.ts +11 -0
- package/dist/src/datasets/dolphins/index.d.ts.map +1 -0
- package/dist/src/datasets/dolphins/index.js +14 -0
- package/dist/src/datasets/dolphins/index.js.map +1 -0
- package/dist/src/datasets/dolphins/meta.d.ts +4 -0
- package/dist/src/datasets/dolphins/meta.d.ts.map +1 -0
- package/dist/src/datasets/dolphins/meta.js +17 -0
- package/dist/src/datasets/dolphins/meta.js.map +1 -0
- package/dist/src/datasets/florentine-families/data.d.ts +3 -0
- package/dist/src/datasets/florentine-families/data.d.ts.map +1 -0
- package/dist/src/datasets/florentine-families/data.js +31 -0
- package/dist/src/datasets/florentine-families/data.js.map +1 -0
- package/dist/src/datasets/florentine-families/index.d.ts +11 -0
- package/dist/src/datasets/florentine-families/index.d.ts.map +1 -0
- package/dist/src/datasets/florentine-families/index.js +14 -0
- package/dist/src/datasets/florentine-families/index.js.map +1 -0
- package/dist/src/datasets/florentine-families/meta.d.ts +4 -0
- package/dist/src/datasets/florentine-families/meta.d.ts.map +1 -0
- package/dist/src/datasets/florentine-families/meta.js +17 -0
- package/dist/src/datasets/florentine-families/meta.js.map +1 -0
- package/dist/src/datasets/football/data.d.ts +3 -0
- package/dist/src/datasets/football/data.d.ts.map +1 -0
- package/dist/src/datasets/football/data.js +210 -0
- package/dist/src/datasets/football/data.js.map +1 -0
- package/dist/src/datasets/football/index.d.ts +11 -0
- package/dist/src/datasets/football/index.d.ts.map +1 -0
- package/dist/src/datasets/football/index.js +14 -0
- package/dist/src/datasets/football/index.js.map +1 -0
- package/dist/src/datasets/football/meta.d.ts +4 -0
- package/dist/src/datasets/football/meta.d.ts.map +1 -0
- package/dist/src/datasets/football/meta.js +17 -0
- package/dist/src/datasets/football/meta.js.map +1 -0
- package/dist/src/datasets/hosted.d.ts +7 -0
- package/dist/src/datasets/hosted.d.ts.map +1 -0
- package/dist/src/datasets/hosted.js +80 -0
- package/dist/src/datasets/hosted.js.map +1 -0
- package/dist/src/datasets/karate/data.d.ts +3 -0
- package/dist/src/datasets/karate/data.d.ts.map +1 -0
- package/dist/src/datasets/karate/data.js +30 -0
- package/dist/src/datasets/karate/data.js.map +1 -0
- package/dist/src/datasets/karate/index.d.ts +11 -0
- package/dist/src/datasets/karate/index.d.ts.map +1 -0
- package/dist/src/datasets/karate/index.js +14 -0
- package/dist/src/datasets/karate/index.js.map +1 -0
- package/dist/src/datasets/karate/meta.d.ts +4 -0
- package/dist/src/datasets/karate/meta.d.ts.map +1 -0
- package/dist/src/datasets/karate/meta.js +22 -0
- package/dist/src/datasets/karate/meta.js.map +1 -0
- package/dist/src/datasets/knuth-miles/data.d.ts +3 -0
- package/dist/src/datasets/knuth-miles/data.d.ts.map +1 -0
- package/dist/src/datasets/knuth-miles/data.js +1203 -0
- package/dist/src/datasets/knuth-miles/data.js.map +1 -0
- package/dist/src/datasets/knuth-miles/index.d.ts +11 -0
- package/dist/src/datasets/knuth-miles/index.d.ts.map +1 -0
- package/dist/src/datasets/knuth-miles/index.js +14 -0
- package/dist/src/datasets/knuth-miles/index.js.map +1 -0
- package/dist/src/datasets/knuth-miles/meta.d.ts +4 -0
- package/dist/src/datasets/knuth-miles/meta.d.ts.map +1 -0
- package/dist/src/datasets/knuth-miles/meta.js +26 -0
- package/dist/src/datasets/knuth-miles/meta.js.map +1 -0
- package/dist/src/datasets/les-miserables/data.d.ts +3 -0
- package/dist/src/datasets/les-miserables/data.d.ts.map +1 -0
- package/dist/src/datasets/les-miserables/data.js +117 -0
- package/dist/src/datasets/les-miserables/data.js.map +1 -0
- package/dist/src/datasets/les-miserables/index.d.ts +11 -0
- package/dist/src/datasets/les-miserables/index.d.ts.map +1 -0
- package/dist/src/datasets/les-miserables/index.js +14 -0
- package/dist/src/datasets/les-miserables/index.js.map +1 -0
- package/dist/src/datasets/les-miserables/meta.d.ts +4 -0
- package/dist/src/datasets/les-miserables/meta.d.ts.map +1 -0
- package/dist/src/datasets/les-miserables/meta.js +21 -0
- package/dist/src/datasets/les-miserables/meta.js.map +1 -0
- package/dist/src/datasets/openflights/data.d.ts +3 -0
- package/dist/src/datasets/openflights/data.d.ts.map +1 -0
- package/dist/src/datasets/openflights/data.js +15457 -0
- package/dist/src/datasets/openflights/data.js.map +1 -0
- package/dist/src/datasets/openflights/index.d.ts +11 -0
- package/dist/src/datasets/openflights/index.d.ts.map +1 -0
- package/dist/src/datasets/openflights/index.js +14 -0
- package/dist/src/datasets/openflights/index.js.map +1 -0
- package/dist/src/datasets/openflights/meta.d.ts +4 -0
- package/dist/src/datasets/openflights/meta.d.ts.map +1 -0
- package/dist/src/datasets/openflights/meta.js +28 -0
- package/dist/src/datasets/openflights/meta.js.map +1 -0
- package/dist/src/datasets/political-blogs/data.d.ts +3 -0
- package/dist/src/datasets/political-blogs/data.d.ts.map +1 -0
- package/dist/src/datasets/political-blogs/data.js +4857 -0
- package/dist/src/datasets/political-blogs/data.js.map +1 -0
- package/dist/src/datasets/political-blogs/index.d.ts +11 -0
- package/dist/src/datasets/political-blogs/index.d.ts.map +1 -0
- package/dist/src/datasets/political-blogs/index.js +14 -0
- package/dist/src/datasets/political-blogs/index.js.map +1 -0
- package/dist/src/datasets/political-blogs/meta.d.ts +4 -0
- package/dist/src/datasets/political-blogs/meta.d.ts.map +1 -0
- package/dist/src/datasets/political-blogs/meta.js +26 -0
- package/dist/src/datasets/political-blogs/meta.js.map +1 -0
- package/dist/src/datasets/political-books/data.d.ts +3 -0
- package/dist/src/datasets/political-books/data.d.ts.map +1 -0
- package/dist/src/datasets/political-books/data.js +165 -0
- package/dist/src/datasets/political-books/data.js.map +1 -0
- package/dist/src/datasets/political-books/index.d.ts +11 -0
- package/dist/src/datasets/political-books/index.d.ts.map +1 -0
- package/dist/src/datasets/political-books/index.js +14 -0
- package/dist/src/datasets/political-books/index.js.map +1 -0
- package/dist/src/datasets/political-books/meta.d.ts +4 -0
- package/dist/src/datasets/political-books/meta.d.ts.map +1 -0
- package/dist/src/datasets/political-books/meta.js +20 -0
- package/dist/src/datasets/political-books/meta.js.map +1 -0
- package/dist/src/datasets/remote.d.ts +27 -0
- package/dist/src/datasets/remote.d.ts.map +1 -0
- package/dist/src/datasets/remote.js +30 -0
- package/dist/src/datasets/remote.js.map +1 -0
- package/dist/src/element.d.ts +20 -0
- package/dist/src/element.d.ts.map +1 -0
- package/dist/src/element.js +27 -0
- package/dist/src/element.js.map +1 -0
- package/dist/src/generators/bipartite.d.ts +51 -0
- package/dist/src/generators/bipartite.d.ts.map +1 -0
- package/dist/src/generators/bipartite.js +99 -0
- package/dist/src/generators/bipartite.js.map +1 -0
- package/dist/src/generators/block-model.d.ts +75 -0
- package/dist/src/generators/block-model.d.ts.map +1 -0
- package/dist/src/generators/block-model.js +116 -0
- package/dist/src/generators/block-model.js.map +1 -0
- package/dist/src/generators/classic.d.ts +208 -0
- package/dist/src/generators/classic.d.ts.map +1 -0
- package/dist/src/generators/classic.js +437 -0
- package/dist/src/generators/classic.js.map +1 -0
- package/dist/src/generators/degree-sequence.d.ts +273 -0
- package/dist/src/generators/degree-sequence.d.ts.map +1 -0
- package/dist/src/generators/degree-sequence.js +646 -0
- package/dist/src/generators/degree-sequence.js.map +1 -0
- package/dist/src/generators/directed.d.ts +141 -0
- package/dist/src/generators/directed.d.ts.map +1 -0
- package/dist/src/generators/directed.js +329 -0
- package/dist/src/generators/directed.js.map +1 -0
- package/dist/src/generators/erdos-renyi.d.ts +58 -0
- package/dist/src/generators/erdos-renyi.d.ts.map +1 -0
- package/dist/src/generators/erdos-renyi.js +154 -0
- package/dist/src/generators/erdos-renyi.js.map +1 -0
- package/dist/src/generators/flow.d.ts +153 -0
- package/dist/src/generators/flow.d.ts.map +1 -0
- package/dist/src/generators/flow.js +346 -0
- package/dist/src/generators/flow.js.map +1 -0
- package/dist/src/generators/geometric.d.ts +133 -0
- package/dist/src/generators/geometric.d.ts.map +1 -0
- package/dist/src/generators/geometric.js +495 -0
- package/dist/src/generators/geometric.js.map +1 -0
- package/dist/src/generators/growth.d.ts +187 -0
- package/dist/src/generators/growth.d.ts.map +1 -0
- package/dist/src/generators/growth.js +445 -0
- package/dist/src/generators/growth.js.map +1 -0
- package/dist/src/generators/hyperbolic.d.ts +84 -0
- package/dist/src/generators/hyperbolic.d.ts.map +1 -0
- package/dist/src/generators/hyperbolic.js +153 -0
- package/dist/src/generators/hyperbolic.js.map +1 -0
- package/dist/src/generators/index.d.ts +25 -0
- package/dist/src/generators/index.d.ts.map +1 -0
- package/dist/src/generators/index.js +24 -0
- package/dist/src/generators/index.js.map +1 -0
- package/dist/src/generators/lattices.d.ts +87 -0
- package/dist/src/generators/lattices.d.ts.map +1 -0
- package/dist/src/generators/lattices.js +237 -0
- package/dist/src/generators/lattices.js.map +1 -0
- package/dist/src/generators/lfr.d.ts +55 -0
- package/dist/src/generators/lfr.d.ts.map +1 -0
- package/dist/src/generators/lfr.js +178 -0
- package/dist/src/generators/lfr.js.map +1 -0
- package/dist/src/generators/named.d.ts +23 -0
- package/dist/src/generators/named.d.ts.map +1 -0
- package/dist/src/generators/named.js +191 -0
- package/dist/src/generators/named.js.map +1 -0
- package/dist/src/generators/preferential-attachment.d.ts +66 -0
- package/dist/src/generators/preferential-attachment.d.ts.map +1 -0
- package/dist/src/generators/preferential-attachment.js +157 -0
- package/dist/src/generators/preferential-attachment.js.map +1 -0
- package/dist/src/generators/trees-and-dags.d.ts +53 -0
- package/dist/src/generators/trees-and-dags.d.ts.map +1 -0
- package/dist/src/generators/trees-and-dags.js +108 -0
- package/dist/src/generators/trees-and-dags.js.map +1 -0
- package/dist/src/generators/util.d.ts +84 -0
- package/dist/src/generators/util.d.ts.map +1 -0
- package/dist/src/generators/util.js +138 -0
- package/dist/src/generators/util.js.map +1 -0
- package/dist/src/generators/variants.d.ts +85 -0
- package/dist/src/generators/variants.d.ts.map +1 -0
- package/dist/src/generators/variants.js +215 -0
- package/dist/src/generators/variants.js.map +1 -0
- package/dist/src/generators/weights.d.ts +65 -0
- package/dist/src/generators/weights.d.ts.map +1 -0
- package/dist/src/generators/weights.js +135 -0
- package/dist/src/generators/weights.js.map +1 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/random/exp.d.ts +23 -0
- package/dist/src/random/exp.d.ts.map +1 -0
- package/dist/src/random/exp.js +101 -0
- package/dist/src/random/exp.js.map +1 -0
- package/dist/src/random/log.d.ts +19 -0
- package/dist/src/random/log.d.ts.map +1 -0
- package/dist/src/random/log.js +83 -0
- package/dist/src/random/log.js.map +1 -0
- package/dist/src/random/stream.d.ts +93 -0
- package/dist/src/random/stream.d.ts.map +1 -0
- package/dist/src/random/stream.js +154 -0
- package/dist/src/random/stream.js.map +1 -0
- package/dist/src/random/threefry.d.ts +19 -0
- package/dist/src/random/threefry.d.ts.map +1 -0
- package/dist/src/random/threefry.js +43 -0
- package/dist/src/random/threefry.js.map +1 -0
- package/dist/src/random/trig.d.ts +16 -0
- package/dist/src/random/trig.d.ts.map +1 -0
- package/dist/src/random/trig.js +78 -0
- package/dist/src/random/trig.js.map +1 -0
- package/dist/src/types.d.ts +28 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +102 -5
- package/src/datasets/build.ts +140 -0
- package/src/datasets/catalog.ts +35 -0
- package/src/datasets/celegans-neural/data.ts +575 -0
- package/src/datasets/celegans-neural/index.ts +17 -0
- package/src/datasets/celegans-neural/meta.ts +25 -0
- package/src/datasets/contiguous-usa/data.ts +164 -0
- package/src/datasets/contiguous-usa/index.ts +17 -0
- package/src/datasets/contiguous-usa/meta.ts +31 -0
- package/src/datasets/davis-southern-women/data.ts +59 -0
- package/src/datasets/davis-southern-women/index.ts +17 -0
- package/src/datasets/davis-southern-women/meta.ts +20 -0
- package/src/datasets/dolphins/data.ts +95 -0
- package/src/datasets/dolphins/index.ts +17 -0
- package/src/datasets/dolphins/meta.ts +21 -0
- package/src/datasets/florentine-families/data.ts +33 -0
- package/src/datasets/florentine-families/index.ts +17 -0
- package/src/datasets/florentine-families/meta.ts +20 -0
- package/src/datasets/football/data.ts +212 -0
- package/src/datasets/football/index.ts +17 -0
- package/src/datasets/football/meta.ts +20 -0
- package/src/datasets/hosted.ts +90 -0
- package/src/datasets/karate/data.ts +32 -0
- package/src/datasets/karate/index.ts +17 -0
- package/src/datasets/karate/meta.ts +25 -0
- package/src/datasets/knuth-miles/data.ts +1205 -0
- package/src/datasets/knuth-miles/index.ts +17 -0
- package/src/datasets/knuth-miles/meta.ts +29 -0
- package/src/datasets/les-miserables/data.ts +119 -0
- package/src/datasets/les-miserables/index.ts +17 -0
- package/src/datasets/les-miserables/meta.ts +24 -0
- package/src/datasets/openflights/data.ts +15459 -0
- package/src/datasets/openflights/index.ts +17 -0
- package/src/datasets/openflights/meta.ts +31 -0
- package/src/datasets/political-blogs/data.ts +4859 -0
- package/src/datasets/political-blogs/index.ts +17 -0
- package/src/datasets/political-blogs/meta.ts +30 -0
- package/src/datasets/political-books/data.ts +167 -0
- package/src/datasets/political-books/index.ts +17 -0
- package/src/datasets/political-books/meta.ts +23 -0
- package/src/datasets/remote.ts +42 -0
- package/src/element.ts +41 -0
- package/src/generators/bipartite.ts +127 -0
- package/src/generators/block-model.ts +160 -0
- package/src/generators/classic.ts +461 -0
- package/src/generators/degree-sequence.ts +807 -0
- package/src/generators/directed.ts +418 -0
- package/src/generators/erdos-renyi.ts +188 -0
- package/src/generators/flow.ts +443 -0
- package/src/generators/geometric.ts +591 -0
- package/src/generators/growth.ts +532 -0
- package/src/generators/hyperbolic.ts +193 -0
- package/src/generators/index.ts +133 -0
- package/src/generators/lattices.ts +290 -0
- package/src/generators/lfr.ts +227 -0
- package/src/generators/named.ts +198 -0
- package/src/generators/preferential-attachment.ts +188 -0
- package/src/generators/trees-and-dags.ts +139 -0
- package/src/generators/util.ts +167 -0
- package/src/generators/variants.ts +253 -0
- package/src/generators/weights.ts +177 -0
- package/src/index.ts +12 -0
- package/src/random/exp.ts +104 -0
- package/src/random/log.ts +86 -0
- package/src/random/stream.ts +169 -0
- package/src/random/threefry.ts +45 -0
- package/src/random/trig.ts +83 -0
- package/src/types.ts +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Adam Powers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@graphty/graph-samples
|
|
2
|
+
Copyright (c) 2024 Adam Powers. The code is under the MIT License (see LICENSE).
|
|
3
|
+
|
|
4
|
+
The sample datasets are not the work of this package's authors. Each is listed below with where
|
|
5
|
+
it was taken from, what to cite and its license as far as it is known. The bundled datasets
|
|
6
|
+
(datasets/<name>) were converted by scripts/convert-datasets.mjs and the hosted ones (hosted:
|
|
7
|
+
<name>, published at https://graphty.app/data/graph-samples/v1/<name>.gsnp.gz) by
|
|
8
|
+
scripts/build-hosted.mjs; both record the exact source files and their SHA-256. The converted
|
|
9
|
+
data are changed files, not the originals (node order, encoding, merged or dropped repeated
|
|
10
|
+
links, and the corrections listed). To have a dataset removed, open an issue at
|
|
11
|
+
https://github.com/graphty-org/graphty-monorepo/issues; removing one means deleting its
|
|
12
|
+
src/datasets/<name>/ directory (or its entry in scripts/build-hosted.mjs) and its entries in
|
|
13
|
+
src/datasets/catalog.ts and this file.
|
|
14
|
+
|
|
15
|
+
----------------------------------------------------------------------------------------------------
|
|
16
|
+
Zachary's karate club (datasets/karate)
|
|
17
|
+
|
|
18
|
+
Source: https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py
|
|
19
|
+
Cite: W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33(4), 452-473 (1977). doi:10.1086/jar.33.4.3629752
|
|
20
|
+
License: Facts published in a 1977 journal article; converted from the networkx 3.1 copy (BSD-3-Clause).
|
|
21
|
+
|
|
22
|
+
----------------------------------------------------------------------------------------------------
|
|
23
|
+
Florentine families (datasets/florentine-families)
|
|
24
|
+
|
|
25
|
+
Source: https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py
|
|
26
|
+
Cite: J. F. Padgett and C. K. Ansell, Robust action and the rise of the Medici, 1400-1434, American Journal of Sociology 98(6), 1259-1319 (1993). doi:10.1086/230190; R. L. Breiger and P. E. Pattison, Cumulated social roles: the duality of persons and their algebras, Social Networks 8(3), 215-256 (1986).
|
|
27
|
+
License: Facts published in the cited articles; converted from the networkx 3.1 copy (BSD-3-Clause).
|
|
28
|
+
|
|
29
|
+
----------------------------------------------------------------------------------------------------
|
|
30
|
+
Davis Southern Women (datasets/davis-southern-women)
|
|
31
|
+
|
|
32
|
+
Source: https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py
|
|
33
|
+
Cite: A. Davis, B. B. Gardner and M. R. Gardner, Deep South: A Social Anthropological Study of Caste and Class, University of Chicago Press (1941).
|
|
34
|
+
License: Facts published in a 1941 book; converted from the networkx 3.1 copy (BSD-3-Clause).
|
|
35
|
+
|
|
36
|
+
----------------------------------------------------------------------------------------------------
|
|
37
|
+
Les Miserables co-appearances (datasets/les-miserables)
|
|
38
|
+
|
|
39
|
+
Source: https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py
|
|
40
|
+
Cite: D. E. Knuth, The Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley (1993).
|
|
41
|
+
License: Derived from the Stanford GraphBase file jean.dat (copyright D. E. Knuth; may be freely copied and distributed, and a changed file must be renamed and identified as not part of the Stanford GraphBase -- this is such a changed file) through the networkx 3.1 copy (BSD-3-Clause).
|
|
42
|
+
|
|
43
|
+
----------------------------------------------------------------------------------------------------
|
|
44
|
+
American college football, 2000 (datasets/football)
|
|
45
|
+
|
|
46
|
+
Source: https://figshare.com/articles/dataset/American_College_Football_Network_Files/93179
|
|
47
|
+
Cite: M. Girvan and M. E. J. Newman, Community structure in social and biological networks, PNAS 99(12), 7821-7826 (2002). doi:10.1073/pnas.122653799; T. S. Evans, Clique graphs and overlapping communities, J. Stat. Mech. (2010) P12037. arXiv:1009.0638
|
|
48
|
+
License: CC BY 4.0 (the figshare record of T. S. Evans).
|
|
49
|
+
|
|
50
|
+
----------------------------------------------------------------------------------------------------
|
|
51
|
+
Books about US politics (datasets/political-books)
|
|
52
|
+
|
|
53
|
+
Source: https://web.archive.org/web/20240730210010id_/https://public.websites.umich.edu/~mejn/netdata/polbooks.zip
|
|
54
|
+
Cite: V. Krebs, unpublished (compiled 2004), http://www.orgnet.com/; labels by M. E. J. Newman.
|
|
55
|
+
License: unclear: Mark Newman's data page says only "free for scientific use to the best of my knowledge"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.
|
|
56
|
+
|
|
57
|
+
----------------------------------------------------------------------------------------------------
|
|
58
|
+
Doubtful Sound dolphins (datasets/dolphins)
|
|
59
|
+
|
|
60
|
+
Source: https://web.archive.org/web/20231115052843id_/https://www-personal.umich.edu/~mejn/netdata/dolphins.zip
|
|
61
|
+
Cite: D. Lusseau, K. Schneider, O. J. Boisseau, P. Haase, E. Slooten and S. M. Dawson, The bottlenose dolphin community of Doubtful Sound features a large proportion of long-lasting associations, Behavioral Ecology and Sociobiology 54, 396-405 (2003). doi:10.1007/s00265-003-0651-y
|
|
62
|
+
License: unclear: posted on Mark Newman's data page with the permission of D. Lusseau, "free for scientific use"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.
|
|
63
|
+
|
|
64
|
+
----------------------------------------------------------------------------------------------------
|
|
65
|
+
Contiguous United States (datasets/contiguous-usa)
|
|
66
|
+
|
|
67
|
+
Source: https://www2.census.gov/geo/docs/reference/county_adjacency/county_adjacency2024.txt
|
|
68
|
+
Also: https://www2.census.gov/geo/docs/reference/cenpop2020/CenPop2020_Mean_ST.txt
|
|
69
|
+
Cite: U.S. Census Bureau, County Adjacency File (2024); U.S. Census Bureau, Centers of Population by State, 2020 Census.
|
|
70
|
+
License: Public domain: works of the US federal government (17 U.S.C. 105). Borders derived from the Census county adjacency file; centres of population from https://www2.census.gov/geo/docs/reference/cenpop2020/CenPop2020_Mean_ST.txt
|
|
71
|
+
|
|
72
|
+
----------------------------------------------------------------------------------------------------
|
|
73
|
+
Knuth's North American city mileages (datasets/knuth-miles)
|
|
74
|
+
|
|
75
|
+
Source: https://mirrors.ctan.org/support/graphbase/miles.dat
|
|
76
|
+
Cite: D. E. Knuth, The Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley (1993).
|
|
77
|
+
License: Derived from the Stanford GraphBase file miles.dat (copyright 1992 Stanford University; "may be freely copied but please do not change it in any way") -- this is a changed file, converted to a graph, and is not part of the Stanford GraphBase.
|
|
78
|
+
|
|
79
|
+
----------------------------------------------------------------------------------------------------
|
|
80
|
+
C. elegans neural network (datasets/celegans-neural)
|
|
81
|
+
|
|
82
|
+
Source: https://web.archive.org/web/20231227004245id_/https://public.websites.umich.edu/~mejn/netdata/celegansneural.zip
|
|
83
|
+
Cite: D. J. Watts and S. H. Strogatz, Collective dynamics of 'small-world' networks, Nature 393, 440-442 (1998). doi:10.1038/30918; J. G. White, E. Southgate, J. N. Thomson and S. Brenner, The structure of the nervous system of the nematode Caenorhabditis elegans, Phil. Trans. R. Soc. London B 314, 1-340 (1986). doi:10.1098/rstb.1986.0056
|
|
84
|
+
License: unclear: Mark Newman's data page says only "free for scientific use to the best of my knowledge"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.
|
|
85
|
+
|
|
86
|
+
----------------------------------------------------------------------------------------------------
|
|
87
|
+
US political blogs, 2004 (datasets/political-blogs)
|
|
88
|
+
|
|
89
|
+
Source: https://web.archive.org/web/20240730122800id_/https://public.websites.umich.edu/~mejn/netdata/polblogs.zip
|
|
90
|
+
Cite: L. A. Adamic and N. Glance, The political blogosphere and the 2004 U.S. election: divided they blog, Proceedings of the 3rd International Workshop on Link Discovery (LinkKDD 2005), 36-43. doi:10.1145/1134271.1134277
|
|
91
|
+
License: unclear: posted on Mark Newman's data page with the authors' permission, "free for scientific use"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.
|
|
92
|
+
|
|
93
|
+
----------------------------------------------------------------------------------------------------
|
|
94
|
+
OpenFlights airline routes (datasets/openflights)
|
|
95
|
+
|
|
96
|
+
Source: https://github.com/jpatokal/openflights/tree/e3bc6dedbcceb8b7b74248a00dcd6207254da6bd/data
|
|
97
|
+
Also: https://openflights.org/data.php
|
|
98
|
+
Cite: OpenFlights.org, Airport, airline and route databases (routes as of June 2014), https://openflights.org/data.php
|
|
99
|
+
License: Open Database License (ODbL) 1.0, contents under the Database Contents License 1.0. This converted database is a derived database and is itself available under the ODbL 1.0.
|
|
100
|
+
|
|
101
|
+
----------------------------------------------------------------------------------------------------
|
|
102
|
+
New York City road network (DIMACS) (hosted: road-ny)
|
|
103
|
+
|
|
104
|
+
Source: http://www.diag.uniroma1.it/challenge9/data/USA-road-d/USA-road-d.NY.gr.gz
|
|
105
|
+
Also: http://www.diag.uniroma1.it/challenge9/data/USA-road-d/USA-road-d.NY.co.gz (coordinates); http://www.diag.uniroma1.it/challenge9/download.shtml
|
|
106
|
+
Cite: C. Demetrescu, A. V. Goldberg and D. S. Johnson (eds.), The Shortest Path Problem: Ninth DIMACS Implementation Challenge, DIMACS Series in Discrete Mathematics and Theoretical Computer Science 74, AMS (2009). Data: US Census Bureau TIGER/Line.
|
|
107
|
+
License: Public domain: derived from the US Census Bureau TIGER/Line files, a work of the US federal government; the challenge page states no further terms.
|
|
108
|
+
|
|
109
|
+
----------------------------------------------------------------------------------------------------
|
|
110
|
+
arXiv computer-science citations (ogbn-arxiv) (hosted: ogbn-arxiv)
|
|
111
|
+
|
|
112
|
+
Source: http://snap.stanford.edu/ogb/data/nodeproppred/arxiv.zip
|
|
113
|
+
Also: https://ogb.stanford.edu/docs/nodeprop/#ogbn-arxiv
|
|
114
|
+
Cite: W. Hu, M. Fey, M. Zitnik, Y. Dong, H. Ren, B. Liu, M. Catasta and J. Leskovec, Open Graph Benchmark: Datasets for Machine Learning on Graphs, NeurIPS 2020. arXiv:2005.00687; K. Wang, Z. Shen, C. Huang, C.-H. Wu, Y. Dong and A. Kanakia, Microsoft Academic Graph: When experts are not enough, Quantitative Science Studies 1(1), 396-413 (2020). doi:10.1162/qss_a_00021
|
|
115
|
+
License: ODC-BY 1.0 (Open Data Commons Attribution License), as stated by the Open Graph Benchmark.
|
|
116
|
+
|
|
117
|
+
----------------------------------------------------------------------------------------------------
|
|
118
|
+
DBLP co-authorship (SNAP com-DBLP) (hosted: com-dblp)
|
|
119
|
+
|
|
120
|
+
Source: https://snap.stanford.edu/data/bigdata/communities/com-dblp.ungraph.txt.gz
|
|
121
|
+
Also: https://snap.stanford.edu/data/com-DBLP.html
|
|
122
|
+
Cite: J. Yang and J. Leskovec, Defining and evaluating network communities based on ground-truth, IEEE ICDM 2012, 745-754. doi:10.1109/ICDM.2012.138; dblp computer science bibliography, https://dblp.org
|
|
123
|
+
License: unclear: SNAP states no license for its files; the underlying dblp data is CC0 1.0 (https://dblp.org/db/about/copyright.html).
|
package/README.md
CHANGED
|
@@ -1,3 +1,192 @@
|
|
|
1
1
|
# @graphty/graph-samples
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Graphs to try things on: seeded random-graph generators that produce the same graph on every
|
|
4
|
+
machine, the classic deterministic families, and a handful of well-known real networks with their
|
|
5
|
+
ground truth. Everything comes out as typed arrays that
|
|
6
|
+
[`@graphty/graph-format`](../graph-format) loads in one call, and that a Web Worker can transfer.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install @graphty/graph-samples @graphty/graph-format
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Generate a graph
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { fromEdgeArrays } from "@graphty/graph-format";
|
|
16
|
+
import { barabasiAlbertGraph, plantedPartitionGraph } from "@graphty/graph-samples/generators";
|
|
17
|
+
|
|
18
|
+
const hubs = barabasiAlbertGraph({ n: 10_000, m: 3, seed: 42 });
|
|
19
|
+
const snapshot = fromEdgeArrays(hubs); // a frozen CSR snapshot
|
|
20
|
+
|
|
21
|
+
const communities = plantedPartitionGraph({ groups: 4, groupSize: 50, pIn: 0.3, pOut: 0.01, seed: 7 });
|
|
22
|
+
communities.nodeColumns?.community; // Uint32Array: the planted group of every node
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Every generator returns a `SampleGraph`:
|
|
26
|
+
|
|
27
|
+
| Field | Type | Meaning |
|
|
28
|
+
| ------------- | --------------- | ---------------------------------------------------- |
|
|
29
|
+
| `directed` | `boolean` | whether edge `e` runs from `src[e]` to `dst[e]` |
|
|
30
|
+
| `nodeCount` | `number` | isolated nodes included |
|
|
31
|
+
| `src`, `dst` | `Uint32Array` | the edge endpoints, node indices in `[0, nodeCount)` |
|
|
32
|
+
| `weights` | `Float32Array?` | per-edge weights, when weighted |
|
|
33
|
+
| `ids` | `string[]?` | external node ids, when the nodes have names |
|
|
34
|
+
| `nodeColumns` | record? | per-node columns, including the ground truth |
|
|
35
|
+
|
|
36
|
+
### Same seed, same graph, everywhere
|
|
37
|
+
|
|
38
|
+
A random generator takes an optional `seed` (an integer from 0 to 2^53 - 1; default 0, never the
|
|
39
|
+
clock, so an unseeded call is reproducible too). The same options and seed give the identical graph -- same node order, same edge order -- in every browser, in Node, on
|
|
40
|
+
every platform, and in every future version of this package. Changing a seeded graph is a breaking
|
|
41
|
+
change. The random numbers come from Threefry-2x32-20, a counter-based generator (Salmon et al.,
|
|
42
|
+
SC11) computed with exact 32-bit integer arithmetic, and the one logarithm the samplers need is a
|
|
43
|
+
port of fdlibm's (as are the exponential and the sine and cosine some models need), so no
|
|
44
|
+
engine-specific floating point enters a decision. See
|
|
45
|
+
`design/graph-samples/graph-samples-design.md` in the repository for the full contract.
|
|
46
|
+
|
|
47
|
+
### Generators
|
|
48
|
+
|
|
49
|
+
| Function | Model | Ground truth |
|
|
50
|
+
| --------------------------------------------------------------------- | ----------------------------------------------- | ----------------- |
|
|
51
|
+
| `pathGraph`, `cycleGraph`, `starGraph`, `wheelGraph`, `completeGraph` | classic families | |
|
|
52
|
+
| `completeBipartiteGraph({ a, b })` | K\_{a,b} | `side` (u8) |
|
|
53
|
+
| `gridGraph({ rows, cols })`, `grid3dGraph({ rows, cols, layers })` | 4- and 6-neighbour lattices; options below | `blocked` (u8) |
|
|
54
|
+
| `hypercubeGraph({ dimension })`, `ladderGraph({ n })` | Q_d, ladder | |
|
|
55
|
+
| `barbellGraph`, `lollipopGraph` | cliques joined by paths | |
|
|
56
|
+
| `cavemanGraph`, `connectedCavemanGraph` | cliques, and a ring of cliques | `community` (u32) |
|
|
57
|
+
| `balancedTreeGraph({ branching, height })`, `petersenGraph()` | r-ary tree, Petersen graph | |
|
|
58
|
+
| `erdosRenyiGraph({ n, p, seed })` | G(n, p), O(n + m) by geometric skipping | |
|
|
59
|
+
| `erdosRenyiGnmGraph({ n, m, seed })` | G(n, m), exactly m edges | |
|
|
60
|
+
| `barabasiAlbertGraph({ n, m, triadProbability?, seed })` | preferential attachment, Holme-Kim triads | |
|
|
61
|
+
| `wattsStrogatzGraph({ n, k, beta, seed })` | small world | |
|
|
62
|
+
| `stochasticBlockModelGraph({ sizes, probabilities, seed })` | stochastic block model | `community` (u32) |
|
|
63
|
+
| `plantedPartitionGraph({ groups, groupSize, pIn, pOut, seed })` | planted partition | `community` (u32) |
|
|
64
|
+
| `randomBipartiteGraph({ n1, n2, p, perfectMatching?, seed })` | G(n1, n2, p), optional planted perfect matching | `side` (u8) |
|
|
65
|
+
| `randomTreeGraph({ n, seed })` | uniform random labelled tree (Pruefer) | |
|
|
66
|
+
| `randomDagGraph({ layers, p, seed })` | layered DAG, arcs from each layer to the next | `layer` (u32) |
|
|
67
|
+
|
|
68
|
+
`gridGraph` and `grid3dGraph` also take `periodic` (a torus), `diagonals` (8 or 26 neighbours),
|
|
69
|
+
`directed` (forward arcs only: a DAG), `obstacles` (a probability of blocking each node) and
|
|
70
|
+
`positions` (`x`, `y`, `z` columns).
|
|
71
|
+
|
|
72
|
+
More families:
|
|
73
|
+
|
|
74
|
+
| Function | Model | Output extras |
|
|
75
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
76
|
+
| `emptyGraph`, `completeMultipartiteGraph({ sizes })` | no edges; K\_{a,b,c,...} | `part` |
|
|
77
|
+
| `circularLadderGraph`, `mobiusLadderGraph`, `ringOfCliquesGraph` | prism, Moebius ladder, cliques in a ring | `community` |
|
|
78
|
+
| `triangularLatticeGraph`, `hexagonalLatticeGraph` | triangular and honeycomb lattices | `x`, `y` with `positions` |
|
|
79
|
+
| `namedGraph(name)`, `NAMED_GRAPH_NAMES` | 21 named graphs: Krackhardt kite, Frucht, Tutte, Heawood, Hoffman-Singleton, the platonic solids, ... | |
|
|
80
|
+
| `powerLawDegreeSequence` | a discrete power-law degree sequence (a `Uint32Array`) | |
|
|
81
|
+
| `configurationModelGraph`, `directedConfigurationModelGraph`, `bipartiteConfigurationModelGraph` | exact degree sequences; keep or erase self-loops and multi-edges | `side` |
|
|
82
|
+
| `chungLuGraph({ expectedDegrees })` | expected degrees (Chung-Lu), linear time (Miller-Hagberg) | |
|
|
83
|
+
| `degreeCorrectedSbmGraph({ sizes, expectedDegrees, mixing })` | communities with hubs (Karrer-Newman) | `community` |
|
|
84
|
+
| `randomRegularGraph({ n, d })` | uniform-ish d-regular graph (Steger-Wormald) | |
|
|
85
|
+
| `lfrGraph(...)` | LFR community benchmark (Lancichinetti-Fortunato-Radicchi) | `community` |
|
|
86
|
+
| `randomGeometricGraph`, `waxmanGraph`, `knnGraph` | points in the unit square or cube; `knnGraph` can draw Gaussian clusters | `x`, `y`, `z`, `community` |
|
|
87
|
+
| `hyperbolicGraph` | hyperbolic random graph (Krioukov et al.), up to 20,000 nodes | `x`, `y`, `radius` |
|
|
88
|
+
| `rmatGraph`, `kroneckerGraph` | R-MAT (Graph500 defaults) and stochastic Kronecker graphs, directed | |
|
|
89
|
+
| `priceGraph`, `randomOrderDagGraph`, `erdosRenyiGraph({ directed: true })` | citation DAG, random-order DAG, directed G(n, p) | |
|
|
90
|
+
| `gridFlowNetwork`, `layeredFlowNetwork`, `genrmfGraph`, `akGraph` | max-flow instances with integer capacities as weights, plus `source` and `sink` | `role` |
|
|
91
|
+
| `randomRecursiveTreeGraph`, `forestFireGraph`, `duplicationDivergenceGraph`, `newmanWattsGraph`, `bianconiBarabasiGraph`, `randomApollonianGraph`, `wilsonMazeGraph` | growth models and a perfect maze | `fitness`, `x`, `y` |
|
|
92
|
+
| `randomMultigraph`, `addPathologicalEdges(graph, ...)` | multigraphs; add self-loops, parallel and anti-parallel edges to any graph | |
|
|
93
|
+
| `edgeCaseGraph(name)`, `EDGE_CASE_NAMES` | 14 fixtures for parsers and consumers: empty, isolated nodes, negative cycles, a 100,000-leaf star, ... | |
|
|
94
|
+
|
|
95
|
+
Every generator takes a `weights` option (`uniform`, `integer`, `exponential`, `euclidean` from the
|
|
96
|
+
position columns, or `column` from a node column), and `withWeights(graph, spec, seed?)` weights
|
|
97
|
+
any graph, datasets included:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const roads = gridGraph({
|
|
101
|
+
rows: 50,
|
|
102
|
+
cols: 50,
|
|
103
|
+
obstacles: 0.2,
|
|
104
|
+
positions: true,
|
|
105
|
+
weights: { kind: "integer", min: 1, max: 9 },
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Self-loops and parallel edges load as they are: graph-format keeps both by default. A graph is
|
|
110
|
+
either directed or undirected; graph-format has no mixed graphs.
|
|
111
|
+
|
|
112
|
+
All run in linear time in the size of the output, so 100,000-node graphs take milliseconds.
|
|
113
|
+
|
|
114
|
+
## Load a dataset
|
|
115
|
+
|
|
116
|
+
Each bundled dataset is its own subpath, so an application bundles only the ones it imports:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { karate, karateMeta } from "@graphty/graph-samples/datasets/karate";
|
|
120
|
+
|
|
121
|
+
const club = karate(); // 34 nodes, 78 weighted edges, node column `club`
|
|
122
|
+
karateMeta.citation; // what to cite
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
| Subpath | Graph | Nodes / edges | Ground truth |
|
|
126
|
+
| ------------------------------- | -------------------------------------------------- | -------------- | ------------ |
|
|
127
|
+
| `datasets/karate` | Zachary's karate club (weighted) | 34 / 78 | `club` |
|
|
128
|
+
| `datasets/florentine-families` | Florentine marriages | 15 / 20 | |
|
|
129
|
+
| `datasets/davis-southern-women` | Davis Southern Women (bipartite) | 32 / 89 | `side` |
|
|
130
|
+
| `datasets/les-miserables` | Les Miserables co-appearances (weighted) | 77 / 254 | |
|
|
131
|
+
| `datasets/football` | US college football 2000, Evans' corrected version | 115 / 613 | `conference` |
|
|
132
|
+
| `datasets/political-books` | Books about US politics | 105 / 441 | `lean` |
|
|
133
|
+
| `datasets/dolphins` | Doubtful Sound dolphins | 62 / 159 | |
|
|
134
|
+
| `datasets/contiguous-usa` | Contiguous US states and DC, land borders | 49 / 107 | |
|
|
135
|
+
| `datasets/knuth-miles` | Knuth's 128 cities, 1949 road miles (complete) | 128 / 8,128 | |
|
|
136
|
+
| `datasets/celegans-neural` | C. elegans neurons (directed, weighted) | 297 / 2,345 | |
|
|
137
|
+
| `datasets/political-blogs` | US political blogs, 2004 (directed) | 1,490 / 19,022 | `lean` |
|
|
138
|
+
| `datasets/openflights` | OpenFlights airports and routes (directed) | 3,214 / 36,906 | |
|
|
139
|
+
|
|
140
|
+
The root entry exports `DATASETS`, the metadata of every dataset (title, description, citation,
|
|
141
|
+
source, license, counts, columns, what it showcases) without any of the graph data. The
|
|
142
|
+
geographic datasets carry `latitude` and `longitude` node columns in degrees.
|
|
143
|
+
|
|
144
|
+
### Hosted datasets
|
|
145
|
+
|
|
146
|
+
Datasets too large to bundle are published at
|
|
147
|
+
`https://graphty.app/data/graph-samples/v1/<name>.gsnp.gz` as gzipped graph-format wire files and
|
|
148
|
+
fetched on demand. They are in `DATASETS` too, with `hosting: "remote"`, the file size (`bytes`)
|
|
149
|
+
and its SHA-256:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import { fetchDataset } from "@graphty/graph-samples";
|
|
153
|
+
|
|
154
|
+
const roads = await fetchDataset("road-ny"); // a GraphSnapshot, with its node columns
|
|
155
|
+
const mine = await fetchDataset("road-ny", { baseUrl: "https://my.cdn/graphs/" });
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
| Name | Graph | Nodes / edges | Download | Ground truth |
|
|
159
|
+
| ------------ | -------------------------------------------------------- | ------------------- | -------- | ------------ |
|
|
160
|
+
| `road-ny` | New York City roads, DIMACS (directed, lengths, lon/lat) | 264,346 / 733,846 | 9.4 MB | |
|
|
161
|
+
| `ogbn-arxiv` | arXiv CS citations, OGB (directed, `year`) | 169,343 / 1,166,243 | 10.6 MB | `subject` |
|
|
162
|
+
| `com-dblp` | DBLP co-authorship, SNAP | 317,080 / 1,049,866 | 15.6 MB | |
|
|
163
|
+
|
|
164
|
+
`https://graphty.app/data/graph-samples/v1/index.json` lists the same metadata with each file's URL.
|
|
165
|
+
|
|
166
|
+
### Publishing the hosted datasets
|
|
167
|
+
|
|
168
|
+
`npm run datasets:hosted` (`scripts/build-hosted.mjs`) downloads each source, checks it against the
|
|
169
|
+
SHA-256 recorded in the script, and writes `public-data/v1/<name>.gsnp.gz`, `index.json` and
|
|
170
|
+
`src/datasets/hosted.ts` (the catalogue entries). The `.gsnp.gz` files are not committed: every
|
|
171
|
+
deploy of graphty.app (`.github/workflows/deploy-pages.yml`) runs the script and publishes
|
|
172
|
+
`public-data/v1/` at `/data/graph-samples/v1/`. The build is deterministic for a given Node.js major
|
|
173
|
+
version (the workflow uses 22), so the checksums in the committed `hosted.ts` match the published
|
|
174
|
+
files. To add, change or remove a hosted dataset, edit the script, run it, commit the script and
|
|
175
|
+
`src/datasets/hosted.ts` together with `NOTICE`, and merge to master.
|
|
176
|
+
|
|
177
|
+
## Draw one with graphty-element
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import { toElementData } from "@graphty/graph-samples";
|
|
181
|
+
import { football } from "@graphty/graph-samples/datasets/football";
|
|
182
|
+
|
|
183
|
+
const { nodes, edges } = toElementData(football());
|
|
184
|
+
element.nodeData = nodes; // { id, label, conference }
|
|
185
|
+
element.edgeData = edges; // { source, target }
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Licenses
|
|
189
|
+
|
|
190
|
+
The code is MIT. The datasets are the work of their authors: `NOTICE` lists each one's source,
|
|
191
|
+
citation and license as known. Some are marked "unclear" -- their publishers state no license.
|
|
192
|
+
If you are a rights holder and want a dataset removed, open an issue.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function buildDataset(data) {
|
|
2
|
+
const m = data.edges.length / 2;
|
|
3
|
+
const src = new Uint32Array(m);
|
|
4
|
+
const dst = new Uint32Array(m);
|
|
5
|
+
for (let e = 0; e < m; e++) {
|
|
6
|
+
src[e] = data.edges[2 * e];
|
|
7
|
+
dst[e] = data.edges[2 * e + 1];
|
|
8
|
+
}
|
|
9
|
+
const nodeColumns = {};
|
|
10
|
+
for (const [name, column] of Object.entries(data.columns)) {
|
|
11
|
+
switch (column.dtype) {
|
|
12
|
+
case "dict":
|
|
13
|
+
nodeColumns[name] = {
|
|
14
|
+
data: column.codes.map((code) => column.categories[code]),
|
|
15
|
+
decl: { dtype: "dict", options: column.categories }
|
|
16
|
+
};
|
|
17
|
+
break;
|
|
18
|
+
case "string":
|
|
19
|
+
nodeColumns[name] = { data: column.values, decl: { dtype: "string", role: column.role } };
|
|
20
|
+
break;
|
|
21
|
+
case "u8":
|
|
22
|
+
nodeColumns[name] = Uint8Array.from(column.values);
|
|
23
|
+
break;
|
|
24
|
+
case "u32":
|
|
25
|
+
nodeColumns[name] = Uint32Array.from(column.values);
|
|
26
|
+
break;
|
|
27
|
+
case "f64":
|
|
28
|
+
nodeColumns[name] = Float64Array.from(column.values);
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
throw new TypeError(`unknown column dtype in dataset column "${name}"`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
directed: data.directed,
|
|
36
|
+
nodeCount: data.nodeCount,
|
|
37
|
+
src,
|
|
38
|
+
dst,
|
|
39
|
+
...data.weights === null ? {} : { weights: Float32Array.from(data.weights) },
|
|
40
|
+
...data.ids === null ? {} : { ids: data.ids },
|
|
41
|
+
...Object.keys(nodeColumns).length === 0 ? {} : { nodeColumns }
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
buildDataset as b
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=build-DdCe60t3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-DdCe60t3.js","sources":["../../src/datasets/build.ts"],"sourcesContent":["/**\n * The shapes shared by every dataset module: its metadata, the compact form its generated data\n * file is written in, and the one function that turns that form into a {@link SampleGraph}.\n */\n\nimport { type ColumnInput, type TypedArrayData } from \"@graphty/graph-format\";\n\nimport { type SampleGraph } from \"../types.js\";\n\n/** What a dataset is, where it came from and under which terms. */\nexport interface DatasetMeta {\n /** The subpath name: `@graphty/graph-samples/datasets/<name>`. */\n readonly name: string;\n /** The human-readable title. */\n readonly title: string;\n /** One or two sentences on what the nodes and edges are. */\n readonly description: string;\n /** The reference to cite. */\n readonly citation: string;\n /** The URL the data was converted from. */\n readonly source: string;\n /** The license as known, or \"unclear\" with what is known. */\n readonly license: string;\n /** The node count. */\n readonly nodes: number;\n /** The edge count. */\n readonly edges: number;\n /** Whether the edges are directed. */\n readonly directed: boolean;\n /** Whether the edges carry weights. */\n readonly weighted: boolean;\n /** The node columns, name to description. */\n readonly attributes: Readonly<Record<string, string>>;\n /** The node column holding the ground-truth grouping, or null when there is none. */\n readonly groundTruth: string | null;\n /** The algorithms and layouts it shows off. */\n readonly showcases: readonly string[];\n /**\n * Where the graph data lives: \"bundled\" (the subpath `@graphty/graph-samples/datasets/<name>`;\n * the meaning when absent) or \"remote\" (on graphty.app, loaded with `fetchDataset(name)`).\n */\n readonly hosting?: \"bundled\" | \"remote\";\n /** A remote dataset's download size: the bytes of its `.gsnp.gz` file. */\n readonly bytes?: number;\n /** A remote dataset's checksum: the SHA-256 of its `.gsnp.gz` file, lowercase hex. */\n readonly sha256?: string;\n}\n\n/** A categorical column: codes into a list of category names. */\ninterface DictColumnData {\n readonly dtype: \"dict\";\n readonly categories: readonly string[];\n readonly codes: readonly number[];\n}\n\n/** A text column, e.g. the display label. */\ninterface StringColumnData {\n readonly dtype: \"string\";\n readonly role?: \"label\";\n readonly values: readonly string[];\n}\n\n/** A small unsigned integer column, e.g. a bipartite side. */\ninterface U8ColumnData {\n readonly dtype: \"u8\";\n readonly values: readonly number[];\n}\n\n/** A number column, e.g. a latitude. */\ninterface F64ColumnData {\n readonly dtype: \"f64\";\n readonly values: readonly number[];\n}\n\n/** An unsigned 32-bit integer column, e.g. a population. */\ninterface U32ColumnData {\n readonly dtype: \"u32\";\n readonly values: readonly number[];\n}\n\n/** The compact form of a dataset, as scripts/convert-datasets.mjs writes it into data.ts. */\nexport interface DatasetData {\n readonly directed: boolean;\n readonly nodeCount: number;\n /** External node ids in index order, or null when the index is the id. */\n readonly ids: readonly string[] | null;\n /** Flat edge endpoints: src0, dst0, src1, dst1, ... */\n readonly edges: readonly number[];\n readonly weights: readonly number[] | null;\n readonly columns: Readonly<Record<string, DictColumnData | StringColumnData | U8ColumnData | F64ColumnData | U32ColumnData>>;\n}\n\n/**\n * Expand a dataset's compact data into typed arrays and graph-format column inputs.\n * @param data - the generated data\n * @returns the graph\n */\nexport function buildDataset(data: DatasetData): SampleGraph {\n const m = data.edges.length / 2;\n const src = new Uint32Array(m);\n const dst = new Uint32Array(m);\n for (let e = 0; e < m; e++) {\n src[e] = data.edges[2 * e];\n dst[e] = data.edges[2 * e + 1];\n }\n const nodeColumns: Record<string, TypedArrayData | ColumnInput> = {};\n for (const [name, column] of Object.entries(data.columns)) {\n switch (column.dtype) {\n case \"dict\":\n nodeColumns[name] = {\n data: column.codes.map((code) => column.categories[code]),\n decl: { dtype: \"dict\", options: column.categories },\n };\n break;\n case \"string\":\n nodeColumns[name] = { data: column.values, decl: { dtype: \"string\", role: column.role } };\n break;\n case \"u8\":\n nodeColumns[name] = Uint8Array.from(column.values);\n break;\n case \"u32\":\n nodeColumns[name] = Uint32Array.from(column.values);\n break;\n case \"f64\":\n nodeColumns[name] = Float64Array.from(column.values);\n break;\n default:\n throw new TypeError(`unknown column dtype in dataset column \"${name}\"`);\n }\n }\n return {\n directed: data.directed,\n nodeCount: data.nodeCount,\n src,\n dst,\n ...(data.weights === null ? {} : { weights: Float32Array.from(data.weights) }),\n ...(data.ids === null ? {} : { ids: data.ids }),\n ...(Object.keys(nodeColumns).length === 0 ? {} : { nodeColumns }),\n };\n}\n"],"names":[],"mappings":"AAiGO,SAAS,aAAa,MAAgC;AACzD,QAAM,IAAI,KAAK,MAAM,SAAS;AAC9B,QAAM,MAAM,IAAI,YAAY,CAAC;AAC7B,QAAM,MAAM,IAAI,YAAY,CAAC;AAC7B,WAAS,IAAI,GAAG,IAAI,GAAG,KAAK;AACxB,QAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC;AACzB,QAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC;AAAA,EACjC;AACA,QAAM,cAA4D,CAAA;AAClE,aAAW,CAAC,MAAM,MAAM,KAAK,OAAO,QAAQ,KAAK,OAAO,GAAG;AACvD,YAAQ,OAAO,OAAA;AAAA,MACX,KAAK;AACD,oBAAY,IAAI,IAAI;AAAA,UAChB,MAAM,OAAO,MAAM,IAAI,CAAC,SAAS,OAAO,WAAW,IAAI,CAAC;AAAA,UACxD,MAAM,EAAE,OAAO,QAAQ,SAAS,OAAO,WAAA;AAAA,QAAW;AAEtD;AAAA,MACJ,KAAK;AACD,oBAAY,IAAI,IAAI,EAAE,MAAM,OAAO,QAAQ,MAAM,EAAE,OAAO,UAAU,MAAM,OAAO,OAAK;AACtF;AAAA,MACJ,KAAK;AACD,oBAAY,IAAI,IAAI,WAAW,KAAK,OAAO,MAAM;AACjD;AAAA,MACJ,KAAK;AACD,oBAAY,IAAI,IAAI,YAAY,KAAK,OAAO,MAAM;AAClD;AAAA,MACJ,KAAK;AACD,oBAAY,IAAI,IAAI,aAAa,KAAK,OAAO,MAAM;AACnD;AAAA,MACJ;AACI,cAAM,IAAI,UAAU,2CAA2C,IAAI,GAAG;AAAA,IAAA;AAAA,EAElF;AACA,SAAO;AAAA,IACH,UAAU,KAAK;AAAA,IACf,WAAW,KAAK;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAI,KAAK,YAAY,OAAO,KAAK,EAAE,SAAS,aAAa,KAAK,KAAK,OAAO,EAAA;AAAA,IAC1E,GAAI,KAAK,QAAQ,OAAO,CAAA,IAAK,EAAE,KAAK,KAAK,IAAA;AAAA,IACzC,GAAI,OAAO,KAAK,WAAW,EAAE,WAAW,IAAI,CAAA,IAAK,EAAE,YAAA;AAAA,EAAY;AAEvE;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const florentineFamiliesMeta = {
|
|
2
|
+
name: "florentine-families",
|
|
3
|
+
title: "Florentine families",
|
|
4
|
+
description: "Marriage alliances between 15 leading families of Renaissance Florence around 1430. The Medici sit on most shortest paths. networkx drops the isolated Pucci family of the original 16.",
|
|
5
|
+
citation: "J. F. Padgett and C. K. Ansell, Robust action and the rise of the Medici, 1400-1434, American Journal of Sociology 98(6), 1259-1319 (1993). doi:10.1086/230190; R. L. Breiger and P. E. Pattison, Cumulated social roles: the duality of persons and their algebras, Social Networks 8(3), 215-256 (1986).",
|
|
6
|
+
source: "https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py",
|
|
7
|
+
license: "Facts published in the cited articles; converted from the networkx 3.1 copy (BSD-3-Clause).",
|
|
8
|
+
nodes: 15,
|
|
9
|
+
edges: 20,
|
|
10
|
+
directed: false,
|
|
11
|
+
weighted: false,
|
|
12
|
+
attributes: {},
|
|
13
|
+
groundTruth: null,
|
|
14
|
+
showcases: ["betweenness and closeness centrality (the Medici)", "shortest paths", "circular and shell layouts"]
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
florentineFamiliesMeta as f
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=meta-B6toBzaa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-B6toBzaa.js","sources":["../../src/datasets/florentine-families/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the florentineFamilies dataset is, where it came from and under which terms. */\nexport const florentineFamiliesMeta: DatasetMeta = {\n name: \"florentine-families\",\n title: \"Florentine families\",\n description:\n \"Marriage alliances between 15 leading families of Renaissance Florence around 1430. The Medici sit on most shortest paths. networkx drops the isolated Pucci family of the original 16.\",\n citation:\n \"J. F. Padgett and C. K. Ansell, Robust action and the rise of the Medici, 1400-1434, American Journal of Sociology 98(6), 1259-1319 (1993). doi:10.1086/230190; R. L. Breiger and P. E. Pattison, Cumulated social roles: the duality of persons and their algebras, Social Networks 8(3), 215-256 (1986).\",\n source: \"https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py\",\n license: \"Facts published in the cited articles; converted from the networkx 3.1 copy (BSD-3-Clause).\",\n nodes: 15,\n edges: 20,\n directed: false,\n weighted: false,\n attributes: {},\n groundTruth: null,\n showcases: [\"betweenness and closeness centrality (the Medici)\", \"shortest paths\", \"circular and shell layouts\"],\n};\n"],"names":[],"mappings":"AAGO,MAAM,yBAAsC;AAAA,EAC/C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UACI;AAAA,EACJ,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY,CAAA;AAAA,EACZ,aAAa;AAAA,EACb,WAAW,CAAC,qDAAqD,kBAAkB,4BAA4B;AACnH;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const knuthMilesMeta = {
|
|
2
|
+
name: "knuth-miles",
|
|
3
|
+
title: "Knuth's North American city mileages",
|
|
4
|
+
description: "128 cities of the United States and Canada with the 1949 highway mileage between every pair, as a complete weighted graph (8,128 edges). Node ids are the city names; each city carries its latitude, longitude and population as recorded in the Stanford GraphBase.",
|
|
5
|
+
citation: "D. E. Knuth, The Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley (1993).",
|
|
6
|
+
source: "https://mirrors.ctan.org/support/graphbase/miles.dat",
|
|
7
|
+
license: 'Derived from the Stanford GraphBase file miles.dat (copyright 1992 Stanford University; "may be freely copied but please do not change it in any way") -- this is a changed file, converted to a graph, and is not part of the Stanford GraphBase.',
|
|
8
|
+
nodes: 128,
|
|
9
|
+
edges: 8128,
|
|
10
|
+
directed: false,
|
|
11
|
+
weighted: true,
|
|
12
|
+
attributes: {
|
|
13
|
+
latitude: "f64: degrees north",
|
|
14
|
+
longitude: "f64: degrees east (negative: west)",
|
|
15
|
+
population: "u32: the population recorded in the Stanford GraphBase"
|
|
16
|
+
},
|
|
17
|
+
groundTruth: null,
|
|
18
|
+
showcases: [
|
|
19
|
+
"minimum spanning tree (Knuth's own demonstration)",
|
|
20
|
+
"travelling-salesman heuristics on real distances",
|
|
21
|
+
"thresholding a complete graph into a sparse road-like graph",
|
|
22
|
+
"geographic and distance-based (MDS, stress) layouts"
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
knuthMilesMeta as k
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=meta-BM_YIhlA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-BM_YIhlA.js","sources":["../../src/datasets/knuth-miles/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the knuthMiles dataset is, where it came from and under which terms. */\nexport const knuthMilesMeta: DatasetMeta = {\n name: \"knuth-miles\",\n title: \"Knuth's North American city mileages\",\n description:\n \"128 cities of the United States and Canada with the 1949 highway mileage between every pair, as a complete weighted graph (8,128 edges). Node ids are the city names; each city carries its latitude, longitude and population as recorded in the Stanford GraphBase.\",\n citation: \"D. E. Knuth, The Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley (1993).\",\n source: \"https://mirrors.ctan.org/support/graphbase/miles.dat\",\n license:\n 'Derived from the Stanford GraphBase file miles.dat (copyright 1992 Stanford University; \"may be freely copied but please do not change it in any way\") -- this is a changed file, converted to a graph, and is not part of the Stanford GraphBase.',\n nodes: 128,\n edges: 8128,\n directed: false,\n weighted: true,\n attributes: {\n latitude: \"f64: degrees north\",\n longitude: \"f64: degrees east (negative: west)\",\n population: \"u32: the population recorded in the Stanford GraphBase\",\n },\n groundTruth: null,\n showcases: [\n \"minimum spanning tree (Knuth's own demonstration)\",\n \"travelling-salesman heuristics on real distances\",\n \"thresholding a complete graph into a sparse road-like graph\",\n \"geographic and distance-based (MDS, stress) layouts\",\n ],\n};\n"],"names":[],"mappings":"AAGO,MAAM,iBAA8B;AAAA,EACvC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SACI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,EAAA;AAAA,EAEhB,aAAa;AAAA,EACb,WAAW;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const openflightsMeta = {
|
|
2
|
+
name: "openflights",
|
|
3
|
+
title: "OpenFlights airline routes",
|
|
4
|
+
description: "The world's airports and the airline routes between them as of June 2014. Directed: an arc runs from origin to destination, weighted by the number of airlines (codeshares included) listed on that route. Node ids are IATA codes, or ICAO codes for the few airports without one; only airports with a route are included.",
|
|
5
|
+
citation: "OpenFlights.org, Airport, airline and route databases (routes as of June 2014), https://openflights.org/data.php",
|
|
6
|
+
source: "https://github.com/jpatokal/openflights/tree/e3bc6dedbcceb8b7b74248a00dcd6207254da6bd/data",
|
|
7
|
+
license: "Open Database License (ODbL) 1.0, contents under the Database Contents License 1.0. This converted database is a derived database and is itself available under the ODbL 1.0.",
|
|
8
|
+
nodes: 3214,
|
|
9
|
+
edges: 36906,
|
|
10
|
+
directed: true,
|
|
11
|
+
weighted: true,
|
|
12
|
+
attributes: {
|
|
13
|
+
label: "string: the airport name",
|
|
14
|
+
city: "string: the city it serves",
|
|
15
|
+
country: "dict: the country it is in",
|
|
16
|
+
latitude: "f64: degrees north, to 6 decimal places",
|
|
17
|
+
longitude: "f64: degrees east (negative: west), to 6 decimal places"
|
|
18
|
+
},
|
|
19
|
+
groundTruth: null,
|
|
20
|
+
showcases: [
|
|
21
|
+
"geographic layout from latitude and longitude",
|
|
22
|
+
"strongly connected components and directed shortest paths",
|
|
23
|
+
"betweenness and degree of hub airports",
|
|
24
|
+
"communities that roughly follow continents"
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
openflightsMeta as o
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=meta-BMmtUpPx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-BMmtUpPx.js","sources":["../../src/datasets/openflights/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the openflights dataset is, where it came from and under which terms. */\nexport const openflightsMeta: DatasetMeta = {\n name: \"openflights\",\n title: \"OpenFlights airline routes\",\n description:\n \"The world's airports and the airline routes between them as of June 2014. Directed: an arc runs from origin to destination, weighted by the number of airlines (codeshares included) listed on that route. Node ids are IATA codes, or ICAO codes for the few airports without one; only airports with a route are included.\",\n citation: \"OpenFlights.org, Airport, airline and route databases (routes as of June 2014), https://openflights.org/data.php\",\n source: \"https://github.com/jpatokal/openflights/tree/e3bc6dedbcceb8b7b74248a00dcd6207254da6bd/data\",\n license:\n \"Open Database License (ODbL) 1.0, contents under the Database Contents License 1.0. This converted database is a derived database and is itself available under the ODbL 1.0.\",\n nodes: 3214,\n edges: 36906,\n directed: true,\n weighted: true,\n attributes: {\n label: \"string: the airport name\",\n city: \"string: the city it serves\",\n country: \"dict: the country it is in\",\n latitude: \"f64: degrees north, to 6 decimal places\",\n longitude: \"f64: degrees east (negative: west), to 6 decimal places\",\n },\n groundTruth: null,\n showcases: [\n \"geographic layout from latitude and longitude\",\n \"strongly connected components and directed shortest paths\",\n \"betweenness and degree of hub airports\",\n \"communities that roughly follow continents\",\n ],\n};\n"],"names":[],"mappings":"AAGO,MAAM,kBAA+B;AAAA,EACxC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SACI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,EAAA;AAAA,EAEf,aAAa;AAAA,EACb,WAAW;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const politicalBooksMeta = {
|
|
2
|
+
name: "political-books",
|
|
3
|
+
title: "Books about US politics",
|
|
4
|
+
description: "Books about US politics sold by Amazon.com around the 2004 election, joined when the same buyers frequently bought both. Mark Newman labelled each book liberal, neutral or conservative from its descriptions and reviews.",
|
|
5
|
+
citation: "V. Krebs, unpublished (compiled 2004), http://www.orgnet.com/; labels by M. E. J. Newman.",
|
|
6
|
+
source: "https://web.archive.org/web/20240730210010id_/https://public.websites.umich.edu/~mejn/netdata/polbooks.zip",
|
|
7
|
+
license: `unclear: Mark Newman's data page says only "free for scientific use to the best of my knowledge"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.`,
|
|
8
|
+
nodes: 105,
|
|
9
|
+
edges: 441,
|
|
10
|
+
directed: false,
|
|
11
|
+
weighted: false,
|
|
12
|
+
attributes: { label: "string: the book title", lean: "dict: liberal, conservative or neutral (ground truth)" },
|
|
13
|
+
groundTruth: "lean",
|
|
14
|
+
showcases: [
|
|
15
|
+
"two- and three-way community detection against the political lean",
|
|
16
|
+
"force-directed layouts coloured by lean"
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
politicalBooksMeta as p
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=meta-BXC7oi86.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-BXC7oi86.js","sources":["../../src/datasets/political-books/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the politicalBooks dataset is, where it came from and under which terms. */\nexport const politicalBooksMeta: DatasetMeta = {\n name: \"political-books\",\n title: \"Books about US politics\",\n description:\n \"Books about US politics sold by Amazon.com around the 2004 election, joined when the same buyers frequently bought both. Mark Newman labelled each book liberal, neutral or conservative from its descriptions and reviews.\",\n citation: \"V. Krebs, unpublished (compiled 2004), http://www.orgnet.com/; labels by M. E. J. Newman.\",\n source: \"https://web.archive.org/web/20240730210010id_/https://public.websites.umich.edu/~mejn/netdata/polbooks.zip\",\n license:\n 'unclear: Mark Newman\\'s data page says only \"free for scientific use to the best of my knowledge\"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.',\n nodes: 105,\n edges: 441,\n directed: false,\n weighted: false,\n attributes: { label: \"string: the book title\", lean: \"dict: liberal, conservative or neutral (ground truth)\" },\n groundTruth: \"lean\",\n showcases: [\n \"two- and three-way community detection against the political lean\",\n \"force-directed layouts coloured by lean\",\n ],\n};\n"],"names":[],"mappings":"AAGO,MAAM,qBAAkC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SACI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY,EAAE,OAAO,0BAA0B,MAAM,wDAAA;AAAA,EACrD,aAAa;AAAA,EACb,WAAW;AAAA,IACP;AAAA,IACA;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const davisSouthernWomenMeta = {
|
|
2
|
+
name: "davis-southern-women",
|
|
3
|
+
title: "Davis Southern Women",
|
|
4
|
+
description: "Attendance of 18 women at 14 social events in a Southern US town in the 1930s: a two-mode (bipartite) network with the women first (side 0) and the events E1 .. E14 second (side 1).",
|
|
5
|
+
citation: "A. Davis, B. B. Gardner and M. R. Gardner, Deep South: A Social Anthropological Study of Caste and Class, University of Chicago Press (1941).",
|
|
6
|
+
source: "https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py",
|
|
7
|
+
license: "Facts published in a 1941 book; converted from the networkx 3.1 copy (BSD-3-Clause).",
|
|
8
|
+
nodes: 32,
|
|
9
|
+
edges: 89,
|
|
10
|
+
directed: false,
|
|
11
|
+
weighted: false,
|
|
12
|
+
attributes: { side: "u8: 0 for a woman, 1 for an event (ground truth)" },
|
|
13
|
+
groundTruth: "side",
|
|
14
|
+
showcases: ["bipartite layout", "bipartite check and matching", "projection onto the women"]
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
davisSouthernWomenMeta as d
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=meta-BaFPvhc1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-BaFPvhc1.js","sources":["../../src/datasets/davis-southern-women/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the davisSouthernWomen dataset is, where it came from and under which terms. */\nexport const davisSouthernWomenMeta: DatasetMeta = {\n name: \"davis-southern-women\",\n title: \"Davis Southern Women\",\n description:\n \"Attendance of 18 women at 14 social events in a Southern US town in the 1930s: a two-mode (bipartite) network with the women first (side 0) and the events E1 .. E14 second (side 1).\",\n citation:\n \"A. Davis, B. B. Gardner and M. R. Gardner, Deep South: A Social Anthropological Study of Caste and Class, University of Chicago Press (1941).\",\n source: \"https://raw.githubusercontent.com/networkx/networkx/networkx-3.1/networkx/generators/social.py\",\n license: \"Facts published in a 1941 book; converted from the networkx 3.1 copy (BSD-3-Clause).\",\n nodes: 32,\n edges: 89,\n directed: false,\n weighted: false,\n attributes: { side: \"u8: 0 for a woman, 1 for an event (ground truth)\" },\n groundTruth: \"side\",\n showcases: [\"bipartite layout\", \"bipartite check and matching\", \"projection onto the women\"],\n};\n"],"names":[],"mappings":"AAGO,MAAM,yBAAsC;AAAA,EAC/C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UACI;AAAA,EACJ,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY,EAAE,MAAM,mDAAA;AAAA,EACpB,aAAa;AAAA,EACb,WAAW,CAAC,oBAAoB,gCAAgC,2BAA2B;AAC/F;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const politicalBlogsMeta = {
|
|
2
|
+
name: "political-blogs",
|
|
3
|
+
title: "US political blogs, 2004",
|
|
4
|
+
description: "Hyperlinks between US political weblogs, crawled from their front pages in February 2005, with each blog labelled liberal or conservative from blog directories and by hand. Directed; 266 blogs have no links. The crawl recorded 65 links twice and 3 blogs linking to themselves: each link is kept once and the self-links are dropped.",
|
|
5
|
+
citation: "L. A. Adamic and N. Glance, The political blogosphere and the 2004 U.S. election: divided they blog, Proceedings of the 3rd International Workshop on Link Discovery (LinkKDD 2005), 36-43. doi:10.1145/1134271.1134277",
|
|
6
|
+
source: "https://web.archive.org/web/20240730122800id_/https://public.websites.umich.edu/~mejn/netdata/polblogs.zip",
|
|
7
|
+
license: `unclear: posted on Mark Newman's data page with the authors' permission, "free for scientific use"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.`,
|
|
8
|
+
nodes: 1490,
|
|
9
|
+
edges: 19022,
|
|
10
|
+
directed: true,
|
|
11
|
+
weighted: false,
|
|
12
|
+
attributes: {
|
|
13
|
+
label: "string: the blog's address",
|
|
14
|
+
lean: "dict: liberal or conservative (ground truth)",
|
|
15
|
+
directory: "string: the blog directories the label came from"
|
|
16
|
+
},
|
|
17
|
+
groundTruth: "lean",
|
|
18
|
+
showcases: [
|
|
19
|
+
"two-way community detection against the political lean",
|
|
20
|
+
"PageRank and HITS on a directed graph",
|
|
21
|
+
"degree-corrected block models",
|
|
22
|
+
"force-directed layouts coloured by lean"
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
politicalBlogsMeta as p
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=meta-C58v1Oy0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-C58v1Oy0.js","sources":["../../src/datasets/political-blogs/meta.ts"],"sourcesContent":["import { type DatasetMeta } from \"../build.js\";\n\n/** What the politicalBlogs dataset is, where it came from and under which terms. */\nexport const politicalBlogsMeta: DatasetMeta = {\n name: \"political-blogs\",\n title: \"US political blogs, 2004\",\n description:\n \"Hyperlinks between US political weblogs, crawled from their front pages in February 2005, with each blog labelled liberal or conservative from blog directories and by hand. Directed; 266 blogs have no links. The crawl recorded 65 links twice and 3 blogs linking to themselves: each link is kept once and the self-links are dropped.\",\n citation:\n \"L. A. Adamic and N. Glance, The political blogosphere and the 2004 U.S. election: divided they blog, Proceedings of the 3rd International Workshop on Link Discovery (LinkKDD 2005), 36-43. doi:10.1145/1134271.1134277\",\n source: \"https://web.archive.org/web/20240730122800id_/https://public.websites.umich.edu/~mejn/netdata/polblogs.zip\",\n license:\n 'unclear: posted on Mark Newman\\'s data page with the authors\\' permission, \"free for scientific use\"; the SuiteSparse Matrix Collection republishes the graph under CC BY 4.0.',\n nodes: 1490,\n edges: 19022,\n directed: true,\n weighted: false,\n attributes: {\n label: \"string: the blog's address\",\n lean: \"dict: liberal or conservative (ground truth)\",\n directory: \"string: the blog directories the label came from\",\n },\n groundTruth: \"lean\",\n showcases: [\n \"two-way community detection against the political lean\",\n \"PageRank and HITS on a directed graph\",\n \"degree-corrected block models\",\n \"force-directed layouts coloured by lean\",\n ],\n};\n"],"names":[],"mappings":"AAGO,MAAM,qBAAkC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACI;AAAA,EACJ,UACI;AAAA,EACJ,QAAQ;AAAA,EACR,SACI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,EAAA;AAAA,EAEf,aAAa;AAAA,EACb,WAAW;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAER;"}
|