https://github.com/juliagraphs/graphdataframebridge.jl
Tools for interoperability between DataFrame objects and LightGraphs and MetaGraphs objects
https://github.com/juliagraphs/graphdataframebridge.jl
dataframes graphs hacktoberfest julia juliagraphs
Last synced: 3 months ago
JSON representation
Tools for interoperability between DataFrame objects and LightGraphs and MetaGraphs objects
- Host: GitHub
- URL: https://github.com/juliagraphs/graphdataframebridge.jl
- Owner: JuliaGraphs
- License: mit
- Created: 2017-12-28T04:56:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-28T13:34:47.000Z (4 months ago)
- Last Synced: 2025-09-08T20:53:53.632Z (4 months ago)
- Topics: dataframes, graphs, hacktoberfest, julia, juliagraphs
- Language: Julia
- Homepage:
- Size: 54.7 KB
- Stars: 32
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraphDataFrameBridge.jl
Tools for interoperability between DataFrame objects and LightGraphs and MetaGraphs objects.
## Examples:
```julia
julia> using DataFrames
julia> using GraphDataFrameBridge
julia> df = DataFrame(Dict("start" => ["a", "b", "a", "d"],
"finish" => ["b", "c", "e", "e"],
"weights" => 1:4,
"extras" => 5:8))
# Simple undirected MetaGraph
julia> mg = MetaGraph(df, :start, :finish)
{5, 4} undirected Int64 metagraph with Float64 weights defined by :weight (default weight 1.0)
julia> props(mg, 1)
Dict Symbol → Any with 1 entries
:name → "a"
# Simple directed MetaDiGraph
julia> mdg = MetaDiGraph(df, :start, :finish)
{5, 4} directed Int64 metagraph with Float64 weights defined by :weight (default weight 1.0)
# MetaGraph with `weight` attribute set and
# `:extras` values stored as attributes.
julia> mgw = MetaGraph(df, :start, :finish,
weight=:weights,
edge_attributes=:extras)
{5, 4} undirected Int64 metagraph with Float64 weights defined by :weight (default weight 1.0)
julia> props(mgw, 1, 2)
Dict Symbol → Any with 2 entries
:extras → 5
:weight → 1
```
## Updating Release:
Note to self: update version in `Project.toml`, then comment on commit `@JuliaRegistrator register`