Giter Site home page Giter Site logo

jfb-h / graphdataframebridge.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliagraphs/graphdataframebridge.jl

1.0 0.0 1.0 28 KB

Tools for interoperability between DataFrame objects and LightGraphs and MetaGraphs objects

License: MIT License

Julia 100.00%

graphdataframebridge.jl's Introduction

GraphDataFrameBridge.jl

Tools for interoperability between DataFrame objects and LightGraphs and MetaGraphs objects.

Examples:

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

graphdataframebridge.jl's People

Contributors

anandijain avatar greimel avatar jfb-h avatar lassepe avatar nickeubank avatar sbromberger avatar

Stargazers

 avatar

Forkers

damianhakert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.