社区网络可视化

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:

45 个赞

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

8 个赞

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 个赞

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 个赞

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

1 个赞

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 个赞

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

2 个赞

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 个赞

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 个赞

I am sooooo installing this with my next maintenance run.

Thank you @merefield :slight_smile:

2 个赞

My bad! I’ll add localisation support soon.

1 个赞

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 个赞

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

3 个赞

That’s done:

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

2 个赞

现在应该兼容 Ember CLI 的 Discourse: COMPATIBILITY: fix settings ref for ember cli · merefield/discourse-user-network-vis@c87f1be (github.com)

3 个赞

罗伯特,你好。你为什么这样做

  var _this = this;

是因为你在某个地方调用了该作用域内的某个东西,然后 this 指的是内部的东西,而你需要获取到父级作用域的 this 吗?

1 个赞

这是因为 this 对象引用在异步调用期间会发生变化,因此不再指向同一对象。

1 个赞

非常喜欢这个可视化!并且希望能够让整个社区都能使用它,而不仅仅是管理员。是否可以像用户目录中的用户地图那样,选择性地链接它?

另外,我希望可以选择显示姓名而不是用户名。

非常感谢您的工作!

它已经对社区开放了。不需要管理员。当前链接应该对所有用户显示。

好主意!接受带有选项的拉取请求(PR)。

2 个赞

链接可以,但地图本身在移动设备上是空白的。

如果这是一个功能,那么当用户使用较小的屏幕时,是否应该隐藏汉堡包链接?