This repository was deprecated and split into two repositories:
- Homebrew formulae/packages: Homebrew/homebrew-core (former contents of
Library/Formula
) - Homebrew package manager: Homebrew/brew
๐ข Query Homebrew's analytics from the command-line.
Home Page: https://formulae.brew.sh/analytics/
License: BSD 2-Clause "Simplified" License
This repository was deprecated and split into two repositories:
Library/Formula
)Hi,
I am a product manager at Google, working on Bazel.
Bazel is distributed on macOS via Homebrew. My goal is to have visibility in the number of installs via this distribution channel.
I can get the https://bintray.com/homebrew/bottles/bazel download stats using the Bintray REST API, but: this would give me less info that what is captured by Homebrew, this requires to write special code and this requires a Bintray Enterprise account.
Homebrew is instrumented to report data via Google Analytics. But it seems that the Homebrew team did not find a way to share Google Analytics data in read only mode to the public.
Google Analytics events can be exported (in read-only) to Google BigQuery (see docs) and BigQuery dataset can be made public (see what is done for the GitHub Archive project).
Stored data has a free tier of 10GB per month. I would not think that Homebrew data is more than this.
Querying data from any BigQuery dataset is billed to the project that does the query. So users would, if they go beyond the free quota, pay for queries themselves.
This would allow anybody from the community to get access to raw google analytics event. Increasing Homebrew's transparency.
And this would allow projects to get detailed download numbers (For Bazel: number of downloads per version per day)
Would this be something that the Homebrew team would be interested in?
The only thing that is needed on the Homebrew side is to enable the BigQuery export to a public dataset. This apparently requires Google Analytics 360. Are you already using a Google Analytics 360 account?
What do you think?
After setting up my config file, I ran brew formula-analytics
, and on the first run, it installed a bunch of gems, then gave me this error. On subsequent runs, it immediately gives the error.
Error: cannot load such file -- google/apis/analyticsreporting_v4 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/cmd/brew-formula-analytics.rb:33:in `' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?' /usr/local/Homebrew/Library/Homebrew/brew.rb:96:in `'
Since #13 calling brew formula-analytics
without any formula as argument fails:
$ brew formula-analytics
$ brew formula-analytics --os-version
$
brew formula-analytics
fails with:
Error: Could not find 'multi_json' (>= 1.0.0) among 28 total gem(s)
.
The beginning of the backtrace is:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.0.0/gems/signet-0.7.3/lib/compat/multi_json.rb:1:in `<top (required)>'
My config and more complete logs: https://gist.github.com/JCount/d5401f873b3a7678bd2fa0a75ce2875b
I tried removing the initial failed attempt, and retrying while forcing the use of Homebrew's vendored ruby, but it exhibited identical behavior. The multi_json gem seems to be installed, and the last file referenced does exist. However, I have no real idea why it is failing.
Josephs-MacBook-Pro:Formula joe$ brew formula-analytics --days-ago=10000 termshare
Error: badRequest: Date 1990-02-01 precedes Google Analytics launch date 2005-01-01
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:218:in `check_status'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/api_command.rb:113:in `check_status'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:183:in `process_response'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:299:in `execute_once'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:104:in `block (2 levels) in execute'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:50:in `block in retriable'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:46:in `times'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:46:in `retriable'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:101:in `block in execute'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:50:in `block in retriable'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:46:in `times'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/retriable-3.0.1/lib/retriable.rb:46:in `retriable'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/http_command.rb:93:in `execute'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/lib/google/apis/core/base_service.rb:354:in `execute_or_queue_command'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/vendor/ruby/ruby/2.4.0/gems/google-api-client-0.11.1/generated/google/apis/analyticsreporting_v4/service.rb:77:in `batch_get_reports'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/cmd/brew-formula-analytics.rb:123:in `<top (required)>'
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:20:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:99:in `<main>'
macOS Big Sur is reported several times in our analytics os-version
output:
==> os-version (30 days)
Index | macOS Version | Count | Percent
-----:|--------------------------------------------------|-----------:|--------:
01 | macOS Catalina (10.15) | 10,551,886 | 42.44%
02 | macOS Big Sur (11.1) | 5,505,264 | 22.14%
03 | macOS Big Sur (11.0) | 4,294,840 | 17.28%
04 | macOS Mojave (10.14) | 3,288,610 | 13.23%
05 | macOS High Sierra (10.13) | 910,575 | 3.66%
06 | macOS Sierra (10.12) | 145,110 | 0.58%
07 | macOS Big Sur (11.2) | 114,526 | 0.46%
08 | OS X El Capitan (10.11) | 43,817 | 0.18%
09 | OS X Yosemite (10.10) | 5,714 | 0.02%
10 | macOS Big Sur (11.3) | 727 | 0.00%
11 | OS X Mavericks (10.9) | 117 | 0.00%
12 | macOS (12.0) | 42 | 0.00%
13 | Mac OS X Snow Leopard (10.6) | 9 | 0.00%
14 | OS X Mountain Lion (10.8) | 5 | 0.00%
Total | | 24,861,242 | 100.00%
Moreover, I think it would make sense to have data separating ARM-Big Sur and Intel-Big Sur
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.