Giter Site home page Giter Site logo

country_licenses's Introduction

Visualizing open source license usage in different countries

This is a small tool that uses GitHub's new APIv4 query system to grab user data from specific countries, and collect the number of different licenses used in their repos. I thought the percentage of people using GNU might be a useful metric in judging how 'open' people are in that country.

Note that one should use the statistics carefully. GitHub only allows for 1,000 user entries per search, so I can only grab 1,000 unique users from each country. To compensate for this, I grabbed the top 20 repositories of each user, sorted by the number of stars in each repo.

This would mean that it is not a great representation of the people in a country, as it is biased towards those that have a lot of repos.

Furthermore, I am trusting the users to be truthful about their location. Screenshot

Method

1. Grabbing data using GitHub APIv4 GraphQL

To get more data, go into /data, add your GitHub API token on line 14 in github_get.py, then run python github_get.py start <location> 10

2. Showing new data on DataMaps (built on D3)

In country_licenses.html, near the end of the file, add: grabData(<location>, <location's iso alpha-3>). The iso alpha-3 code can be found here

Demo

  1. Run python -m http.server to start your server
  2. Go to your "http://localhost:8000/"
  3. Click on country_licenses.html
  4. Hover over the countries in green. It should show info on the country!

country_licenses's People

Contributors

alex6614 avatar

Watchers

James Cloos avatar  avatar

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.