7

I've been searching around a little bit for statistics on how many projects are licensed with a licence file in their repository. I found this article with a graph:

Percentage of repositories licensed

The spike between 2013 and 2014 can largely be attributed to the unveiling of choosealicense.com by GitHub.

Quoting from the article:

The new Licenses API returns metadata about popular open source licenses and can detect a project’s license from the repository’s LICENSE file. Developers are welcome to preview the API while it’s still under development. Ultimately, GitHub is aiming to use the API to collect and provide more information about the open source licenses in use on the site, as well as the projects that are using them.

As far as I understand, the way these statistics work is the API queries repositories for a License file, and sorts that out by attempting to find a match with an open source licence.

Looking back, I found an answer of mine to a question on this site. It highlighted whether or not a plugin could be use, which was basically whether or not it had a licence. Looking into the repository for my answer, I discovered that there was no "Licence" file, but rather a tiny little thing in the Readme:

License: GPLv3.

That was the only mention. I later submitted an issue and a pull request adding a licence file. I got this response:

There's no legal requirement to include a copy of it - but its better to, in case someone doesn't know what GPL is. Thank you for the PR.

Assuming the first statement is correct, the statistics in the graph above could largely be inaccurate (Of course, if the statement is not correct, then the statistics would obviously be correct).

This makes me wonder: if a project does not need a licence file, and a simple mention in the Readme is enough, then how many projects are actually licensed on GitHub? Has there been any data or research into this?

  • Interesting, but what's the question? – RubberDuck Feb 22 '16 at 10:16
  • 3
    @RubberDuck My question is whether there has been any data or statistics into the matter. As outlined in my last paragraph. – Zizouz212 Feb 22 '16 at 11:49
  • I don't know that there has been, but I'm wondering if a dictionary of keywords could be put together, then search the readmes for the names or common abbreviations of licenses. – RubberDuck Feb 22 '16 at 13:03
  • @RubberDuck I'm going to see if I can research and come up with some data myself and answer this question afterwards. But I'm also open to other data that has been made into this. – Zizouz212 Feb 22 '16 at 15:04
  • If GitHub is mainly used as a way to show your code to other people (recruiters, colleagues, students, etc.) and nobody is expected to reuse your code, are licenses really even necessary? – Tariq Ali Jun 18 '16 at 15:53
3
+350

This makes me wonder: if a project does not need a licence file, and a simple mention in the Readme is enough, then how many projects are actually licensed on GitHub?

This is an interesting question!

To the best of my knowledge there has been only limited studies beyond posts made by Github.

That said, I think that the data of the article and Github graph you mention is not entirely correct based on a few factors:

  1. the way a license is detected for the article is fairly basic (using their Licensee tool).

  2. Github is used for many things and not all repositories are equal:

    2.1 take for instance a repo that contains the work of a computer science student following some assignment. Before Github, it would not have been posted publicly, with Github it is posted. In most cases does it matter if it is licensed or not? For me, I do not care. In most cases the code is of little to no value and not reusable. No explicit license does not matter to me here.

    2.2 take another case: research software. Based on a small subset analysis of Open Source Licensing of Research Software on GitHub they state:

    On the face of it, ~63% of Zenodo-archived code doesn't sound very good but this is actually significantly higher than the ~17% of public repositories on GitHub that have a detectable open source license.

That said there a few sources of opinions and studies, beside the previous postings or talks from Github staff:

Somewhat related:

So now, we could do such a study :P ?

  • I've contemplated about writing scripts that look for repositories with code and a readme or license file, and try and detect a license from there. But I've wondered whether it would be worthwhile, since I'd likely be using the GitHub api and that would take ages, and then there's me who would have to explain my activity and all that. So I've never actually gotten to that :/ – Zizouz212 May 22 '16 at 21:04
  • @Zizouz212 actually I am pushing out in a few weeks a server-based version of github.com/nexB/scancode-toolkit that does git checkouts and runs the ScanCode license scans (and more) in a queue. It may eventually take a while to run a millions of scans ... but it would be fun! Since API calls would only be needed to collect the actual repos URLs I do not think this would be an issue. And even there, there are alternative to discover them all such as with ghtorrent.org or githubarchive.org – Philippe Ombredanne May 23 '16 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.