Giter Club home page Giter Club logo

githubaccess's Introduction

Github Data Visualization

This project is part of CS3012 Coursework, Trinity College Dublin.
The aim is to interrogate the Github API and fetch data that could be useful in elucidating aspects of the software engineering process. The course requires the data to be used in some sort of visualization. The project I put together collects data regarding repos, commits and contributors and shows it in a Force Directed Graph. The size of the nodes scales depending on the number of commits. This way, my application makes it easy to view the users with the most impact on a project. (The number of contributors shown is capped at 30).

Technologies used

  1. React
  2. D3
  3. Node.js
  4. NPM

React is a declarative, component-based JavaScript library used for building interfaces. I used React both for the frontend and fetching the data, with the built-in fetch command.

D3 is another JavaScript library. It's used to build interactive, dynamic web visualization. I used this library to create a Force-Directed Graph. Important I had to downgrade to a version 3 of D3 because of some backwards compatibilty with one of the methods used for creating the Force-Directed Graph.

Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser. I used Node.js for the GithubAccess part of the assignment. I started using it in order to fetch the data. I was planning to save this data in MongoDb, but eventually I realized having a database didn't make much sense for my project. I can also simply fetch data in React, so I decided to give up on Node.js. Not to mention that using Node.js and React would've required me to learn several other technologies (like Express), and I am already new to React and D3.

npm is a package manager for the JavaScript programming language. I used this on Linux to download all the required packages and to start the React application.

Project

My project consists of a Force-Directed Graph. In order to populate this graph with data, there are two options.

  1. Query for user repositories
    If the user field in the form at the top is the only one supplied, then the Graph will show the repositories available for the given user. The number in the nodes represents the size of a repo. If you hover over a node, you can see the name of the repo.

  2. Query for contributors & number of commits.
    If both the user and the repo field are supplied, then the Graph will show a visualization of the contributors and their respective number of commits. The nodes resize depending on the number of commits they represent. Again, if you hover over a node, you can see the name of the user who contributed.

Error Checking
If the fetch instructon fails, for various reasons, (could be that the API limit has been achieved, or that the supplied repo doesn't belong to a certain user) a message will be displayed that hints at the possible error.

Help
In case the interface is confusing, which I hope is not. There is a help button that explains the functionality of the app.

Install

Setting up the project locally requires npm to be installed on the machine. All the dependecies of the project are listed in /visual/package.json. Thus, simply clone the Github repo, then perform

npm install

Then

npm start

Which runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

githubaccess's People

Contributors

retecata avatar

Stargazers

John Kommala avatar Francisc Furdui avatar

Forkers

frankwrk

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.