rmit-programming-club / network-vis

A tool to visualisation coding activity and collaboration within a Github Organisation
GNU General Public License v3.0
9 stars 2 forks source link

Getting data from GitHub #23

Closed ghost closed 7 years ago

ghost commented 7 years ago

Summary

The force graph now uses data directly from github, currently no cache or database, so wait a bit for it to load when trying it out.

example graph network

Organizations Controller

Index now returns a json file containing data in the forcegraph format.

d3/network.js

Now accesses organizations/index to fetch json data, rather than using a static file of hardcoded values.

Issues

1. On my screen the force graph is drawn outside the container (only one node appears in the top left corner), clicking on that node fixes the problem. I can't figure out how to get the graph to centre (generally) right now and I don't want to hardcode values.

2. I piggybacked on organizations/index, maybe this code should go in graph/data?

3. It's pretty slow at the moment, implementing caching might speed it up, not sure how efficient my code is.

ghost commented 7 years ago

I replaced the dummy data in organisation_connections.json, with the real data from GitHub. Just pushed a fix for the formatting , it's pretty now.

Regarding the comments in organizations_controller.rb, I commented out the existing stuff in it (listing users and commits), cause I wasn't sure if we wanted it. I'm still not sure if the data should even be served by organizations_controller.rb, maybe graph_controller.rb is a better choice?