On a gray and rainy St. Petersburg evening, a couple of our programmers, wanting to pull up knowledge in JS, HTML and CSS, wrote an interesting project for fans of statistics.
Nerd-o-meter is a service that allows you to find out the statistics of devices with which they write tweets. You can search for both requests and specific users.
')
Idea
The idea of the project arose during a visit to Yandex.Subbotnik: watching how many people tweeted during the event, it occurred to me that it would be interesting to know the statistics of the devices from which they write and see how it varies from conference to conference. conference.
A little later, it was transformed into the idea of a small service that shows statistics on twitter clients: this information is simply extracted from the Twitter API.
Creature
At first it seemed like a classic application, for example on Rails, but at some point it became clear that the server part is simply superfluous: everything you need, in particular access to the
Twitter API and charting, is available directly in the browser. Thus, it turned out a small and lightweight single-page app.
To build charts,
Google Chart Tools was used , glancing at several alternative solutions.
In searching for the libraries necessary for development (although in such a small project one could probably do without them) an excellent compilation of
microjs.com helped me.
In addition to Chart Tools, the following libraries were useful:
- Zepto.js : a lightweight jquery replacement aimed primarily at mobile webkit browsers. Nevertheless, it works quite decently as an “adult library”. During the work, a small bug was found when working with FF, but was quickly fixed by a patch that was later sent (and accepted) back to the zepto project on GitHub. Used for DOM manipulations and Ajax API requests.
- Underscore.js : at work one of the programmers used Scala, so without convenient functional ways of working with collections (at least map / filter), he felt like without hands. Underscore provided this opportunity and some other OP-buns.
- SugarSkull : the first version of the application used a self-written mechanism for permanent links that can work entirely on the client side. With the introduction of another type of statistics (for tweets of a particular user), the urls scheme became more complicated and this library was bolted. It is a simple mechanism for dispatching client-side URLs.
One of the advantages of working entirely in the browser was the ability to host not only the repository on the githaba, but also the application itself.
As a result, we received a working tool for collecting statistics, for which I want to thank
digal ,
damnerd and Philip Nurulin. Now we know, for example, that the person responsible for Twitter of Yandex is not indifferent to Apple products :-)
PS Thanks to the comments, sorting results by popularity has been added to Nerd-o-meter.