Popularity of javascript frameworks in GitHub repositories

package.json files in the GitHub projects can give us a lot of useful information about current trends in frontend development

Published: 2018-02-12

Currently, we have some statistic to count popularity of frameworks like: npm trends, stars on a GitHub, google trends or even Stack Overflow Trends. There is a debate in a community which statistic is the most representative. I'm not going to dive into detail analysis of them, instead, I introduce the new one statistic.

Popularity of frontend frameworks in package.json in GitHub

For analysis, I selected 565 458 repositories containing package.json in GitHub. I want to connect this data somehow with dates, the way I did it was the extraction of date from the last commit modifying package.json. Next step was getting all dependencies from package.json, this gives me 8.1 million of dependencies (containing both dependencies and devDependencies).

Final results were calculated for each month. At the begging, I treated dependencies and devDependencies as the same in trends, but it turns out that jquery is often used in devDependencies (as a for example helper for tests), so I used only dependencies in my results.

Popularity of frameworks in package.json dependencies in GitHub

No surprisingly react is leading with a peak of usage at 16% (March 2017). The beginning of angular 2+ and react/vue lines are quite different, the popularity of angular 2+ drastically grown at May 2016 (this is a date of first RC version). This can be explained that release of angular 2.0 was a big event in the web industry, especially when the previous version was well established in a community. But why angular 1 popularity is so low in this plot? It's due to the way it was distributed, at the beginning usage of npm package wasn't popular for angular 1, so at this plot, you mostly see the adoption of usage npm for downloading angular 1. The same goes for jQuery, it's surprising that it reached 7% of downloads by npm (yes I know that jQuery is not a framework, but I could not resist to include it).

I thought the drops of react, angular 2+ and vue in the last 3 months in this plot could be explained by a more frequent update of non-framework related projects (those could show up at the end of the plot and decrease framework percents). But it's not a case. I checked absolute values and those frameworks relly occurs less at the end of this plot. If you look not at the drops but on the picks of frameworks, at the beginning of 2017 it was a great time for them. Those days a lot of people were trying to use one of those frameworks and it was a good time window to write some components for them as the market had not been saturated yet.

Further reading

This post is a part of series about of trends in GitHub. It will be more in the future. But for now, you can read about trends in package.json scripts.