github-stars
v1.0.2
Published
No more counting dollars, we'll be counting stars > https://youtu.be/hT_nvWreIhg?t=15s
Downloads
4
Readme
:star: :star: :star: :star: :star: stars :star: :star: :star: :star: :star:
"No more counting dollars, we'll be counting stars" ~ OneRepublic - https://youtu.be/hT_nvWreIhg?t=15s
This mini-project helps us track :star: for projects on GitHub and answer interesting questions about the data.
Why?
A big part of achieving our goals in DWYL requires tracking certain "Metrics" so that we can see trends and derive actionable insights from our data.
Discover Interesting Projects & Useful Content on GitHub
GitHub :star: are one of the main (quantitative) measures we have for discovering interesting Open Source projects on GitHub.
Counting :star: helps us know if the learning materials we are producing are useful to other people. Encouraging people :star: our projects is important, and you can help us with if you aren't already... because the more people :star: things the more it will help their friends/followers to discover our useful projects/content.
Discover Interesting People
The other benefit of tracking :star: on our projects is that it allows us to understand who is interested in our work, which allows us to discover new & interesting people.
Ask Interesting Questions
Finally, we think that the GitHub API for :star: is not great because for example it does not allow us to answer interesting questions such as:
find all people who are members of an org who have starred xyz project
or
who in the org has the most/least stars
or
which project in the org increased/decreased its stars most this week
So we decided to solve this mini-challenge with some code.
What?
“When you have mastered numbers, you will in fact no longer be reading numbers, any more than you read words when reading books. You will be reading meanings.” ~ W.E.B. Du Bois
GitHub lets it's "users" :star: projects (repositories) in order to "favourite" or "bookmark" them.
Both the person starring the project (that interests them) and the rest of community can see the stars which then act as a signal of "interesting" or even "quality".
For example Natalia has the following projects starred: https://github.com/NataliaLKB?tab=stars
Some people use their stars "scarcely", which is ok because they may only want to "bookmark" a handful of things on GitHub. However other "power users" :star: many things ... e.g:
https://github.com/feross?tab=stars&q=summer
### So What...?
We think it would be interesting to test the hypothesis: The more active a person is in the Open Source Community the more projects they will :star: on GitHub.
For example Eddie :heart: who is a highly active Open Source Advocate has quite a few hundred :star:
Could the number of :star: a person has be an indicator of future success ? i.e. could we discover a "talented" new person by charting their :star: activity?
(Immediate) "Research Question"
The immediate question we are going to answer with this project is:
how many destinct people have found our code useful
## How?
How would you go about tackling this challenge...?
GitHub API
We're going to use a couple of endpoints in the GitHub REST API to retrieve our data.
Users
https://developer.github.com/v3/users/#get-a-single-user
Repositories
- Your: https://developer.github.com/v3/repos/#list-your-repositories
- Specific User: https://developer.github.com/v3/repos/#list-user-repositories
- Organisation: https://developer.github.com/v3/repos/#list-organization-repositories
(SQL) Tables
We will require the following (SQL) tables to be defined to store the data:
People (GitHub Users)
Repos
Stars
This is a "lookup" table that references two rows in other tables and has a timestamp.
Deployment
Run it Locally
npm install && npm run create && npm run seed && npm start
Heroku
This is a pretty standard heroku app. All that's required is Heroku PostgreSQL (Free) and a handful of environment variables:
Don't worry, these aren't the "real" Environment variables. (duh!) To set up your app Environment Variables follow the instructions: https://github.com/dwyl/stars/issues/4
Go to:
Further reading
- "One Metric that Matters": http://leananalyticsbook.com/one-metric-that-matters/ discuss at: https://github.com/dwyl/hq/issues/149
- Actionable Insights: http://online-metrics.com/actionable-insights/
P.S: we prefer counting the other type stars, but for now this is a great start. :wink: