<!-- version: 1.0 --> <!-- tag: app --> <!-- excerpt: StatsExchange is an application for generating easy statistics and reports based on the data and filters available in the StackExchange API. --> ##Screenshot / Code Snippet ![enter image description here][1] ##About StatsExchange is an app that's designed to leverage the filtering and data reporting features of the StackExchange API. With StatsExchange, you can quickly and easily generate statistics on just about any question or answer metrics that you can filter on using the API. Sometimes you've got a question about the SE sites you frequent. For example: - What percent of the time is my answer accepted? - How many views does a particular tag generate for the site? - During a period where the site was running a promotion, how much activity did we see around a promoted tag? - Am I upvoted or downvoted more on average than other people? I found myself asking questions along these lines relatively frequently, and with my knowledge of the API I could usually whip up a quick custom "throwaway" tool to answer them with real, live data. This is the result of an experiment to generalize those throwaway tools into something that might have wider appeal. You can think of it as a similar tool to [Stack Exchange Data Explorer](http://data.stackexchange.com/) but designed with a less-technical audience in mind, and focused more on "instant gratification." If you feel comfortable with SQL along with the StackExchange DB schema, and you don't mind the fact that the data's a bit stale, the Data Explorer site has a wealth of information and can help you answer many different questions. Sometimes, though, there are questions that the API could answer better, faster, and with fresher data. The purpose of this app is to make interfacing with this data easier. ###Usage To load the app, click [this link][2]. Start by clicking the "Add New" button. This will allow you to specify the name of the query you wish to create, and set the filtering options. - If you choose to search by **Questions**, the query will find all questions that match your criteria, and then generate statistics based on those questions and their answers. - If you choose to search by **Answers**, the query will first locate answers that match your criteria, and then generate statistics based on just those answers and the questions they were posted on. Regardless of the search type, you can set several filter options, including the date the post was created, its owner, what tags were on the question, as well as minimum and maximum scores for the question or answer. For instance, if you wanted to know **what percent of the time your answer was accepted on the tag "string"** - you'd set up a new query for "Answers" on tag "string" and user "Me." If you wanted to know **how often user 12345 got their "skyrim" questions answered**, you'd set up a new query for "Questions" on tag "skyrim" and user id "12345." If you wanted to find out **how many questions a site has that have score less than zero,** you could set up a "Questions" query with "Max Score" equal to -1, and "Users" set to "Everyone." You can specify multiple tags - they will be logically AND'ed by the API. Therefore, ALL tags in a query must appear on a question for it to show up in the final count. Once you've set up the query, you can run it by pressing the "refresh" button, or "edit" or "remove" it if you need to make changes or are finished with the query. When a query is running, you can "Abort" it if it's taking too long or you need to make changes. You can create as many queries as you like, and use them to compare and contrast different aspects of data. For instance, you might be interested in comparing the statistics of a set of users, or of a set of tags. The number in parentheses indicates the **"per question"** average. If you'd like to share a query or set of queries with others, you can use the "Import/Export" dialog to print the queries in JSON, which you can then copy and paste to chat or email, if you so desire. The queries are saved in your browser's local data storage until you clear them. ###Caveats/Known Issues/Limitations The filtering on tags only works at the API level for "Questions" by "Everyone" - so if you're expecting to do a "Answers" by "Everyone" query and filter it by tags, you'll have to load **every answer and question on the site** in order to do this. This is likely to take far too long to be useful in any normal situation. Limiting the query's scope by other means would be a good idea. ###TODO I'd like to figure out a way to expose more of the data collection and reporting aspects for people to add their own statistics and tracking information. This would make it possible to add your own columns displaying custom data to the report. There are a number of things I could do with more API options, but it's likely that I'll have to make feature requests for "API v2.1" or "v3.0" in order to make this possible. ###License BSD 2-clause. Source code is available from this [BitBucket Repo][3]. ##Contact If you run into bugs, come find me using the chat system. This is one of the more complex apps I've built, so it's likely to have its fair share of issues. [1]: https://i.sstatic.net/imqbN.png [2]: http://www.withoutthesarcasm.com/stackapps/stats/ [3]: https://bitbucket.org/agent86ix/statsexchange