Previously we’d talked about putting up a stats page on WordPress.org (WPORG) so that more people could see what was happening. While working on some of the new stats processing code on WPORG I realized that people would likely end up scraping this data for their own uses. That seemed like a waste, so instead as a first run the stats numbers are available in JSON format via:
http://api.wordpress.org/stats/wordpress/1.0/
http://api.wordpress.org/stats/php/1.0/
http://api.wordpress.org/stats/mysql/1.0/
A few notes about these numbers. First, they are summary percentages for the previous day (where day is based on GMT). You’ll also notice that these numbers don’t really line up with each other, this is because the system normalizes the version numbers and throws out odd/invalid versions (I was surprised by how many odd version strings there are out there). As a result each category is best compared to itself, instead of trying to compare PHP with MySQL numbers.
The content type returned for this data is ‘application/json’, your browser may or may not display them correctly.
This is a start, there are more things to be added to this in the future. One obvious item is support for getting numbers for previous days and date ranges. Another would be to add some pretty graphs to WPORG to display this data.
Andrew Nacin 7:48 am on September 1, 2010 Permalink |
Very cool! I’ll try to build a nice page for dotorg that uses this snapshot data.
Along with change over time, I think minor versions would potentially be useful. I know it was helpful when we needed to choose a MySQL version to move to, and also identifying the number of installs actually affected by bugs like #14160. And it’s more data for people to play with.
Ben Forchhammer 11:56 am on September 1, 2010 Permalink |
Wow, this is great
Should be very useful when trying to decide which versions to support.
Denis 10:28 pm on September 2, 2010 Permalink |
Could it be possible to have php and mysql by WP version too? As well as WP and MySQL by PHP, and WP and PHP by MySQL? It seems the latter three would be more interesting.
Joseph Scott 4:41 pm on September 3, 2010 Permalink |
Certainly the data is there for that to be possible, we’d need to look at the queries involved to make sure it could be done in a reasonable way.
Denis 3:54 pm on September 4, 2010 Permalink
I’ve no idea of your schema’s specifics, or whether you keep duplicate records related to each site in your stats, but I was thinking something like this:
SELECT wp_version, mysql_version, php_version, COUNT(DISTINCT site_key)
FROM stats
WHERE stat_date > NOW() – interval ’1 day’
AND wp_version IN ( $valid_versions )
GROUP BY wp_version, mysql_version, php_version;
The raw output of the above as /stats/raw/1.0/ would, I think, be the most interesting for plugin devs. It doesn’t necessarily need to be normalized as percentages, either: having the actual number of sites is useful to get an idea of how many users one is potentially targeting exactly.
Ryan McCue 11:39 am on September 3, 2010 Permalink |
Whipped up a quick Google Visualisation of these: http://ryanmccue.info/wp/stats/
Ryan McCue 11:41 am on September 3, 2010 Permalink |
Forgot to mention, this uses the raw data, but runs it through a proxy on my server to get around the cross-domain AJAX problems. Could be solved easily by enabling the API to use JSON-P.
Otto 3:55 pm on September 3, 2010 Permalink
Joseph asked me to do this, so I did. All three of those now have jsonp support. Just add a jsonp parameter to your calls to them. Example:
http://api.wordpress.org/stats/wordpress/1.0/?jsonp=demo
Otto 4:09 pm on September 3, 2010 Permalink
Okay, so I found out that jQuery prefers it if you use “callback” as the name of the parameter instead. So now it’s callback, to make things more standard.
http://api.wordpress.org/stats/wordpress/1.0/?callback=demo
Matt 3:45 pm on September 3, 2010 Permalink |
That’s neat — can we put that somewhere on WP.org?
Otto 5:23 pm on September 3, 2010 Permalink
Done: http://wordpress.org/about/stats/
Ryan McCue 12:53 am on September 4, 2010 Permalink
Awesome, awesome and awesome. Also, good idea using the 3D version, makes it much easier to read!
Alex M. 7:06 pm on September 3, 2010 Permalink |
Nice work, Ryan!
Alex M. 7:06 pm on September 3, 2010 Permalink
And everyone else involved for that matter!
arena 10:43 am on September 5, 2010 Permalink |
bug report : trailing zeros are missing on some numbers …
filosofo 6:05 pm on September 3, 2010 Permalink |
Thanks for doing this, Joseph, Otto, and Ryan! A great combination of data and visualization.
Sergey Biryukov 6:33 pm on September 12, 2010 Permalink |
Is there any chance of making stats for localized versions available too?
Mike Schinkel 5:59 pm on July 8, 2011 Permalink |
Just found this thanks to Ryan C. Duff (thanks Ryan!) Curious, how is this data collected? From API requests to list plugins and themes?
Andrew Nacin 7:37 pm on July 8, 2011 Permalink |
The core version-check API request.