Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data statistics script for MDN 2019 key result goal #3557

Merged
merged 6 commits into from
Mar 18, 2019

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Mar 3, 2019

This adds a script that gathers data for the MDN 2019 key result goal as presented in #3555

Inspired by https://github.com/atopal/browser-compat-data-dashboard

@Elchi3 Elchi3 added the infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project label Mar 3, 2019
@Elchi3 Elchi3 requested a review from ddbeck March 3, 2019 16:36
@Elchi3 Elchi3 mentioned this pull request Mar 3, 2019
11 tasks
scripts/data-statistics.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor notes here, apart from the null matching question. Thank you for doing this, @Elchi3!

package.json Outdated Show resolved Hide resolved
scripts/data-statistics.js Outdated Show resolved Hide resolved
scripts/data-statistics.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more questions. Thank you, Florian!

scripts/statistics.js Outdated Show resolved Hide resolved
scripts/statistics.js Outdated Show resolved Hide resolved
@Elchi3
Copy link
Member Author

Elchi3 commented Mar 6, 2019

@foolip What do you think about this now?

Copy link
Collaborator

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One suggestions for improvement, but nothing that would change the behavior.

scripts/statistics.js Outdated Show resolved Hide resolved
};

const iterateData = (data) => {
for (let key in data) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will also traverse into strings and arrays, with key being 0, 1, 2 and so on. processData will get called with 1-char strings as arguments and do nothing. This is pretty harmless, just something I was bitten by when writing very similar code with different conditions in processData.

@Elchi3
Copy link
Member Author

Elchi3 commented Mar 18, 2019

I think this is good enough for now. Thanks everyone! Let's land it.

@Elchi3 Elchi3 merged commit fb736a5 into master Mar 18, 2019
@Elchi3 Elchi3 deleted the add-data-stats-script branch March 18, 2019 18:02
@foolip
Copy link
Collaborator

foolip commented Mar 19, 2019

Here are the stats at commit fb736a5:

browser real values true values null values
total 55.20% 22.21% 22.60%
chrome 65.82% 23.95% 10.23%
chrome android 50.25% 32.02% 17.73%
edge 53.23% 20.25% 26.52%
firefox 73.64% 13.10% 13.27%
ie 60.59% 14.77% 24.64%
safari 49.16% 19.07% 31.77%
safari ios 41.11% 20.38% 38.52%
webview android 47.77% 34.14% 18.09%

I did some tweaking of the script to see which are was the most incomplete, and it looks like it's api.*, and APIs on Safari on iOS is the browser+bucket category the most incomplete. CSS data isn't too bad overall.

@queengooborg queengooborg added the scripts 📜 Issues or pull requests regarding the scripts in scripts/. label Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project scripts 📜 Issues or pull requests regarding the scripts in scripts/.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants