netzschleuder
PathpyG input/output module for the netzschleuder repository.
list_netzschleuder_records
¶
Read a list of data sets available at the netzschleuder repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Base URL of netzschleuder repository |
'https://networks.skewed.de'
|
**kwargs
|
typing.Any
|
Keyword arguments that will be passed to the netzschleuder repository as HTTP GET parameters. For supported parameters see https://networks.skewed.de/api |
{}
|
Examples:
Return a list of all data sets
>>> import pathpyG as pp
>>> pp.io.list_netzschleuder_records()
['7th_graders', 'academia_edu', 'add_health', ...]
Return a list of all data sets with a given tag
>>> pp.io.list_netzschleuder_records(tags="Temporal")
['ambassador', 'board_directors', 'caida_as', ...]
Returns:
| Type | Description |
|---|---|
typing.Union[list, dict]
|
Either a list of data set names or a dictionary containing all data set names and network attributes. |
Source code in src/pathpyG/io/netzschleuder.py
read_netzschleuder_graph
¶
Read a graph or temporal graph from the netzschleuder repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the network data set to read from |
required |
network
|
typing.Optional[str]
|
Identifier of the network within the data set to read. For data sets containing a single network only, this can be set to None. |
None
|
multiedges
|
bool
|
Whether to allow multiedges in the constructed graph |
False
|
time_attr
|
typing.Optional[str]
|
Name of the edge attribute containing time stamps. If None, the function will read the graph as static network. |
None
|
base_url
|
str
|
Base URL of netzschleuder repository. |
'https://networks.skewed.de'
|
Examples:
Read network '77' from karate club data set
>>> import pathpyG as pp
>>> n = pp.io.read_netzschleuder_graph(name="karate", network="77")
>>> pp.plot(n)
<IPython.core.display.HTML object>
<pathpyG.visualisations._d3js.backend.D3jsBackend object at 0x...>
Returns:
| Type | Description |
|---|---|
typing.Union[pathpyG.core.graph.Graph, pathpyG.core.temporal_graph.TemporalGraph]
|
Graph or TemporalGraph object |
Source code in src/pathpyG/io/netzschleuder.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
read_netzschleuder_record
¶
Read metadata of a single data record with given name from the netzschleuder repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the data set for which to retrieve the metadata |
required |
base_url
|
str
|
Base URL of netzschleuder repository |
'https://networks.skewed.de'
|
Examples:
Retrieve metadata of karate club network
>>> import pathpyG as pp
>>> metadata = pp.io.read_netzschleuder_record("karate")
>>> print(metadata)
{'analyses': {'77': {'average_degree': 4.52...}, ...}
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing key-value pairs of metadata |