Create graph from public Mastodon data

Hi there,

I have written a script to fetch an array of accounts that I follow on Mastodon. Each account is represented by a dictionary with

KeySet for a Dict{String, Any} with 21 entries. Keys:
  "acct"
  "locked"
  "created_at"
  "fields"
  "username"
  "bot"
  "emojis"
  "id"
  "statuses_count"
  "last_status_at"
  "avatar_static"
  "note"
  "followers_count"
  "header_static"
  "group"
  "url"
  "following_count"
  "header"
  "display_name"
  "discoverable"
  "avatar"

I now want to create a graph using Graphs.jl. Is there a straightforward approach to plot a graph based on these dictionaries where I use one key for nodes and another key for edges, etc. ?

I actually don’t use Graph.jl

Found this page: Graph construction · Graphs.jl
From here, it said I have 2 choices, load it from an existing format, using GraphIO, or modify from an empty graph.

Looks like neither you have to convert this dict into some graph format, or iteratively add nodes and edges to an empty graph.

Scanning thru https://juliagraphs.org/
it suggest, GitHub - JuliaGraphs/GraphPlot.jl: Graph visualization for Julia. or GitHub - JuliaGraphs/NetworkLayout.jl: Layout algorithms for graphs and trees in pure Julia.

Hi! Do you need to use some graph-theoretical algorithms or just plot the network?

1 Like