📜 ⬆️ ⬇️

Pulse Habra

callidus77: The installers connected the subscriber in our grid. They came, stuck the network card, but he has Frya and no firewood. Scratched heads and left. People in three weeks finally connects.
Gryat: “How long have you been looking for firewood.”
He: “I was not looking. I wrote them myself. ” Bash

Probably, each author carefully watches the fate of his articles, such an author always lacks something on Habré. I always lacked tools for monitoring articles - so I decided to write them.


Under the cut, we will deal with the main tools of the resource and the potential application. The entire toolkit is available at http://www.habr-analytics.com , the source code (main functions) on github . For examples and details - welcome under the cat!

Article structure
  1. Pulse Habra
  2. Article Monitor
  3. User analysis
  4. Hub Crossing - Venn Diagrams
  5. Hubs audience
  6. Source code and project structure
  7. Conclusion

')
* Caution traffic *


Pulse Habra


Pulse is one of the most interesting indicators, it shows the dynamics of reading habr (more precisely, articles in the "New"). Between points a fixed interval of seven minutes (plus or minus a minute). On the graph below we can observe the level of activity at night from Sunday to Monday. It is clearly seen that the articles on Monday morning are read four times more actively than on the night from Sunday to Monday (which was to be expected, but we do not know in advance how much more they read on Monday morning)

What's the point?

Potential application: the timing of the article. The more actively people read Habr, the greater the chance that they will see the article. Accordingly, if the indicator is currently low, it may be worth revisiting the time of departure of the article.

Available at:
www.habr-analytics.com/pulse

Article Monitor


Perhaps this is one of the functions that I lacked so much that I would have written separately as standalone applications (if you also think that this is a great idea - write to the support, let them return the wall, they will give me a token for the API, ideally integrate this function in Habr).

In short, we monitor changes in views, favorites and reposts in social networks (VK, FB, Twitter) in time. The interface is simple: select an article from the list, a data type, and click the “Build Graph” button.

The repertoire of the article for the last two days (actually for the last 52 hours).

Available at:
www.habr-analytics.com/monitor

As an example, graphics for the habr-article "Happy Birthday, Elon Musk" :
Views : Happy Birthday Elon Musk " :

Selected : Happy Birthday, Elon Musk " :

Repost in social networks : Happy Birthday, Elon Musk " :

For fresh articles, the number of measurements is smaller (as measurements occur every seven minutes), so the graphs look a little different in appearance:

Article: " Do not pour me salt into the reactor or non-pulsed nuclear rocket engines " in 5-6 hours after the appearance.

Views : Do not pour me salt into the reactor or non-pulsed nuclear rocket engines

Selected : Do not pour me salt into the reactor or non-pulsed nuclear rocket engines

Repost in social networks: Do not pour me salt into the reactor or non-pulsed nuclear rocket engines


For comparison, the schedule of views of the same article after 27 hours


What's the point

Observe the dynamics of reading the article: did you stop reading the article after she left the “best day”? (Most often, we see that the views go on a constant after 24 hours.) In which network is the article distributed faster and more actively? How does the dynamics change after reaching the main one?

In general, the monitor gives an integral impression of the distribution of the article in the network.

User analysis


Who is not interested to see his "story" on Habré? Well, or someone else's; usually, you open a profile and you see only a dry couple of lines: you wrote so much, you registered, that's all. It always seemed to me something not very interesting and the idea came to visualize the user's history.

The interface is extremely simple - username, data type and a large button.


Let us give an example of graphics for the user lozga - simply because it turns out quite beautiful: some “ups” and “falls”.

User Analysis is available at:
www.habr-analytics.com/user

Consider the graphics in more detail:
Views

Rating

Favorites


Bonus: the schedule of views for PapaBubaDiop (a big peak is the same post about “Field of Miracles” )


Why do you need it?

On the one hand, it allows you to look at the history of your articles on Habré; on the other hand, this is a much more informative profile feed in time than a pair of final numbers.

Hub Crossing - Venn Diagrams


Have you ever thought that choosing a second or third hub for an article, you may well not cover a new audience? In order to make sure that the hubs do not intersect and this function is done. You must select two or three hubs and click on the large button.


Available at:
www.habr-analytics.com/venn

For this function, there is also a standalone version with advanced functionality (for example, working with company hubs) and a habr-article describing the source code (python) and executable files for Windows, Linux and MacOS (all libraries are included).


Hubs audience


This function gives an idea of ​​the preferences of readers of a particular hub in relation to all other hubs at once.
It is necessary to choose a hub and the result - a histogram of readers' preferences, that is, what readers of this hub still read, as a percentage of the number of subscribers to the original hub.


Available at:
www.habr-analytics.com/audience

For this function, there is also a standalone version with extended functionality (for example, working with company hubs) and a habr-article with a description:
The source data, called hubs, is available on github , and executable files for


Source code and project structure


The main (data collection, database recording, graph generation, etc.) project code is available on github .

(The code for the monitor function is shown above.)

Since most likely the site will fall from the habr-effect in advance of the joke in the spirit: Habr does not feel the pulse or Habr is not felt at the pulse .

But in fact it is not scary, if we consider the design of the project, we note that the data collection, storage and presentation of data are separated and the user only interacts with the interface displaying graphics, but this does not affect the collection, storage and presentation of data.

That is, after the habr-wave passes all the data will be in order.

Technical details: everything works on PaaS Heroku, in the form of two applications; both on Flask; interface: Flask + Bootstrap3; mongoHQ and memcached data storage. The data collector parsit Habr, because for some reason access to the API is not given (at least for now).

Conclusion


The project is definitely not perfect and it requires a thousand and one changes. And, perhaps, you know about layout, data processing or web development and want to help? Tips, ideas and development assistance are welcome.

Any idea what else needs to be implemented? We are waiting in comments and \ or through any other communication channel.

Source: https://habr.com/ru/post/228015/


All Articles