Community Network Visualisation

Summary: A user network visualisation

image

image

:link: GitHub: https://github.com/merefield/discourse-user-network-vis GitHub - merefield/discourse-user-network-vis: A plugin that creates a User Network Visualisation to show social links between users

:arrow_right: Install: Follow the plugin installation guide.

Features

Presents your community as a network visualisation (Desktop/Tablet only).

Accessed via a menu item added automatically (can be turned off):

image

Get to it by hitting User Network on the Sidebar/Dropdown menu or navigating to yoursite.com/usernetworkvis - NB you have to be logged in as a registered user to see the vis.

  • the nodes represent users.

  • the links represent interactions on your forum - the more interactions, the thicker the line

    • an interaction is the combination of Likes and Replies (this is the very same data that’s available on someone’s Summary profile page to all users)
  • Hover over a user to isolate them and their connections visually

  • Click on a node to navigate to their Summary profile.

  • Drag nodes around and watch the show :game_die:

  • Zoom the entire view with the mouse wheel.

:warning: Trust levels are currently exposed as different colours. If you don’t want this, set the same colour several times. I may find another criterium to set colour, but this was the most obvious by far as very generic :warning:

To refresh data, Trigger the job. This may be necessary after a settings change (I’ve marked those that require it):

Go to: https://your.site/sidekiq/scheduler and find this one:

Otherwise this runs every hour.

:warning: if you have 10,000’s of users, this job may run LONG and take up resources. Seems to work ok on a 5,000 account site running on a 2 Core 2GB VPS taking about 30 seconds. The SQL is necessarily BRUTAL :warning:

Interested in the data?

My intention with this was just to paint a picture.

If you want to see the data, just go to yoursite.com/usernetworkvis.json

In any case, in individual cases, you can see much of this data on each users summary page by clicking on a node (Most replied to, Most liked/liked by). I therefore consider it semi-public information.

Configuration

Settings … so … many … settings:

If you have a large site with lots of people on it, you are going to find the diagram very noisy. Consider upping minimum trust level and there is now an option to remove people not seen for x years:

TODO

  • The menu item has localisation support, but if no-one has yet PR’d your localisation yet, please consider doing so or otherwise it will remain a key code …

Creds

The visualisation is based on the awesome d3 library

Similar projects

If you like this you might also like:

43 Likes

Very cool! This isn’t exactly the same thing, but it reminds me of a study I read about a few years back:

8 Likes

Oh nice find, I wonder if it will drive any engagement? … Same presumably might be said of Who's Online Plugin (discourse-whos-online)? :+1:

You know that gives me another idea: you could put “halos” around nodes that were online perhaps leveraging that plugin if available …

3 Likes

Thanks for this, just installed for an educational community where I’m still trying to budge up the participating level. We get lots of signups for event related activities, but it goes too quiet in between.

I set Minimum Trust level to “2” to show the more active users w/o a lot of noise.

3 Likes

It could be helpful to have an option or view of the tabular representation of the data.

1 Like

My intention with this was just to paint a picture.

if you want to see the data, just go to yoursite.com//usernetworkvis.json

In any case, in individual cases, you can see much of this data on each users summary page by clicking on a node (Most replied to, Most liked/liked by).

3 Likes

And it’s painting beautifully. Users of plugin always want more, we can dream. Thanks for the link to the json.

2 Likes

You might also be able to adapt the SQL in the query relatively easily and run it in the Data Explorer:

https://github.com/merefield/discourse-user-network-vis/blob/55354d641deba7a4a93670a36488abee9a7115c2/jobs/user_network_stats.rb#L15

1 Like

My users love it. Hopefully it incites them a bit more :wink:

But one small miss there is: I can’t translate text User Network in hamburger.

2 Likes

I am sooooo installing this with my next maintenance run.

Thank you @merefield :slight_smile:

2 Likes

My bad! I’ll add localisation support soon.

1 Like

No problem, take your time. That is not that big issue.

But now I/we/you have a panic situation. That hamburger links doesn’t show at all in mobiles.

1 Like

That plugin is super cool, thank you very much @merefield

3 Likes

That’s done:

add localisation for menu entry · merefield/discourse-user-network-vis@c201b56 (github.com)

2 Likes

Should now be compatible with an Ember CLI’d Discourse: COMPATIBILITY: fix settings ref for ember cli · merefield/discourse-user-network-vis@c87f1be (github.com)

3 Likes

Hey Robert. Why did you do

  var _this = this;

Is that because somewhere you call something inside of that scope and then this is for the thing inside and you need to get out to the this of the parent?

1 Like

It’s because the this object reference changes during the async call so no longer points to the same thing.

1 Like

Really like the visualisation! And would love to make it accessible with a whole community, not only for admins. Maybe optionally linked like the user map in the user directory?

Also, I’d like the option to switch to names, in difference to usernames, to be displayed.

Thanks a lot for the work!

It already is open to the community. Admin not required. Current link should appear for all users.

Good idea! PR with option accepted.

2 Likes

Link yes, but the map itself is just blank when used mobiles.

If that is feature, should the hamburger link be hidden when a user uses smaller screen?