Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #23

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This is a repository of openly available hypergraph datasets in JSON format with

## Overview of the xgi-data format
The xgi-data format for hypergraph data sets is a JSON data structure with the following structure:
* "hypergraph-data": This tag accesses the attributes of the entire hypergraph dataset such as the authors or dataset name.
* "node-data": This tag accesses the nodes of the hypergraph and their associated properties as a dictionary where the keys are node IDs and the corresponding values are dictionaries. If a node doesn't have any properties, the associated dictionary is empty.
* "name": This tag accesses the node's name if there is one that is different from the ID specified in the hyperedges.
* `hypergraph-data`: This tag accesses the attributes of the entire hypergraph dataset such as the authors or dataset name.
* `node-data`: This tag accesses the nodes of the hypergraph and their associated properties as a dictionary where the keys are node IDs and the corresponding values are dictionaries. If a node doesn't have any properties, the associated dictionary is empty.
* `name`: This tag accesses the node's name if there is one that is different from the ID specified in the hyperedges.
* Other tags are user-specified based on the particular attributes provided by the dataset.
* "edge-data": This tag accesses the hyperedges of the hypergraph and their associated attributes.
* "name": This tag accesses the edge's name if one is provided.
* "timestamp": This is the tag specifying the time associated with the hyperedge if it is given. All times are stored in ISO8601 standard.
* `edge-data`: This tag accesses the hyperedges of the hypergraph and their associated attributes.
* `name`: This tag accesses the edge's name if one is provided.
* `timestamp`: This is the tag specifying the time associated with the hyperedge if it is given. All times are stored in ISO8601 standard.
* Other tags are user-specified based on the particular attributes provided by the dataset.
* "edge-dict": This tag accesses the edge IDs and the corresponding nodes which participate in that hyperedge.
* `edge-dict`: This tag accesses the edge IDs and the corresponding nodes which participate in that hyperedge.

All IDs are strings but can be converted to other types if desired.

Expand Down
22 changes: 11 additions & 11 deletions get_stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@
" data = json.load(file)\n",
"\n",
"props = {\n",
" \"num-nodes\": \"{:,d}\".format(num_nodes),\n",
" \"num-edges\": \"{:,d}\".format(num_edges),\n",
" \"num-unique-edges\": \"{:,d}\".format(num_unique_edges),\n",
" \"min-edge-size\": \"{:,d}\".format(smin),\n",
" \"max-edge-size\": \"{:,d}\".format(smax),\n",
" \"mean-edge-size\": \"{:,.2f}\".format(smean),\n",
" \"min-degree\": \"{:,d}\".format(dmin),\n",
" \"max-degree\": \"{:,d}\".format(dmax),\n",
" \"mean-degree\": \"{:,.2f}\".format(dmean),\n",
" \"num-components\": \"{:,d}\".format(num_components),\n",
" \"gc-size\": \"{:,d}\".format(size_gc),\n",
" \"num-nodes\": int(num_nodes),\n",
" \"num-edges\": int(num_edges),\n",
" \"num-unique-edges\": int(num_unique_edges),\n",
" \"min-edge-size\": int(smin),\n",
" \"max-edge-size\": int(smax),\n",
" \"mean-edge-size\": round(smean, 2),\n",
" \"min-degree\": int(dmin),\n",
" \"max-degree\": int(dmax),\n",
" \"mean-degree\": round(dmean, 2),\n",
" \"num-components\": int(num_components),\n",
" \"gc-size\": int(size_gc),\n",
"}\n",
"data[dataset_name].update(props)\n",
"\n",
Expand Down
Loading