Open blanksblanks opened 9 years ago
Update: The Donut and Stacked Area visualizations should be working in their respective tabs, need a bit of work for style, should also be on Heroku Hopefully the format for Stacked AreaCtrl and DonutCtrl should be easier to follow now, essentially the control calls addGraph with general chart options, then defines the data processing function, then the data retrieval function. In particular, both charts require that the list of repos be retrieved before retrieving the commits for each repo, and the chart is only shown after all requests have returned.
More notes for Stacked chart: The Github API does not have a way to directly get the contributions of each user for each day. We can get the total contributions to the repo for a given day, or a user's commits per week. Therefore, I multiplied the total commits for each day by each user's overall share for the week as a whole. This results in some inconsistencies; for example, for our repo the first listed commit is Cheng joining the group, but that is not listed through 'contributors'... Of course, we could actually download all the commit data, but for now I think this way is better since that could potentially be a very large amount of data, eg if someone contributes to a large open-source project they would be downloading all commits to that project, with various details on each one. It seems to me that our method is decent for showing trends without focusing on minor differences.
I'm going to leave this thread open as our main thread because it has good explanations. Also copying this email from @ozzieba
General Project Status: All the plumbing should be working, now we just need to actually define the charts. I did the Donut Chart and the Stacked Area Chart; I just fixed a couple errors with them. I do think it is important to write the other charts before submitting. Essentially, we can copy code directly from public/app/github/DonutChart.js to a new JS file and rewrite the functions getData(), which fetches the data, and theData(), which processes it for drawing. If we need different API requests from Github, we can simply add the relevant function to GithubService.js, essentially just putting in the API request URI. I had hoped to make this a bit more elegant, but ultimately it's not too bad. The remaining charts are: Scatter Plot, Add/Delete, Cumulative Line Chart, and Angular Design Chart I do think we should finish these, since ultimately they are the point of the site and we've already done most of the hard work (figuring out how to use the various tools, setting up the site interface, authentication, Git API, etc). If anyone can volunteer to do any of these charts that would be great.
My reply:
Hey Oz, I can take the Scatterplot or the Add/Delete chart. Re Stacked Chart: I love what you did!!! Especially with the drop-down menu. Works and looks great. Only comment I have is somewhat slow performance, the nature of the callback needs to wait for ALL data to load before any data is returned so it takes a while. At first I thought it wasn't working for me like the donut chart, but when one graph loaded, all the graphs would load instantly! (you're right re caching, that would be a really important feature if we had more time) Re Donut Chart: mine never loads a donut chart because of too many repos. Perhaps show only top 7 repos + one segment for "all the other repos." And when we say top 7, count that by the repos where you have contributed the greatest number of commits, not by largest repos because they might just be forked from elsewhere. Just a suggestion, because currently I get no donut :(
I added an issue for the donut chart, and I believe the stacked chart goes into the general caching issue, which we can think about when we have all our graphs working and are thinking of how to improve the performance.
Moved this comment to the top of the thread. Note EVERYONE is assigned to this issue :doughnut: :see_no_evil: :hear_no_evil: :speak_no_evil:
In short, let's assign the tasks as follows: [:dango: ] Scatter Plot - Nina [:santa: ] Add/Delete - Bingyan [:chart_with_upwards_trend: ] Cumulative Line Chart - Cheng [:chicken:] Language Ratios - Jessica
[:doughnut::money_with_wings: ] Donut Chart/Stacked Chart - Ozzy (any improvements you'd like to make)
[:bar_chart:] Any ideas for the Angular design chart? It's just a Bar Chart, but the Material Design animations make it load quite nicely.