📜 ⬆️ ⬇️

Data visualization for your web project



Author: Alexander Kasheverov, Senior JavaScript Developer

Welcome and enjoy reading!
')
An article for those who have not previously used graphics on the web, but is going to. Also for those who want to learn more about this topic.

The goal is to highlight the subject area and simplify the problem of choosing a specific solution. Consider the differences between libraries and look at the popular options, there will be examples and quite a bit of theory.

For a better understanding, you need knowledge of JavaScript and a general idea of ​​how the web works.

Of course, data visualization has its own history (we will not touch on this in the article), if you're interested - you can find it, for example, here .

My article is probably not comprehensive, so please write comments and personal messages, I am ready to listen to criticism and add material.

So let's go!

Let's say you have a website ...


... which you want to color with data visualization.

It can be as the simplest graphics, and completely non-trivial. Static or interactive. Several drawn elements or several tens of thousands. What solution is suitable for a particular case - this is the task that needs to be solved.

Projects where you can use graphics are different. These can be simple business cards made in Wordpress in one day, or huge industrial monsters that have been developed by large teams for many years. Of course, approaches to the development and choice of solutions in these cases will differ.

Take, for example, the visualization of the demand for air tickets within the United States on Thanksgiving Day, which the New York Times presented in 2015. How to implement such a visualization is not immediately obvious.



How will you solve the problem without knowing the subject area? Most likely choose one of the options:


A friend with relevant experience may not be, and the process of self-search can take a long time, we, programmers, can dig into details, and this takes time. Let's pretend that we are friends. And I just studied this area. So I will try to share my experience and save valuable time.

So, the task is to visualize the data on the site. Consider in more detail the problem and from what solutions we can choose?

Technological diversity
Technically, we can implement the presentation of data on the page in different ways:


Of course, all of these options can be combined. You can, for example, implement dynamic switching from SVG to Canvas depending on the amount of displayed data.

Functional diversity


Charts can:


Of course, this is not a complete list and can be further detailed. But it seems to me, I called the main characteristics.

Look at non-technical specifications


Here they are:


We now turn to practice and consider the real products that are on the market.

Solutions popular in 2018


Paid solutions


This is not a complete list, but it is worthwhile to list a number of popular libraries:


We will not elaborate on paid solutions. I can only say that with a high degree of probability, among them there will be what is needed exactly in your case. However, it will have to pay a round sum.

Free solutions



I hope these details will help determine the solution that is appropriate for your problem. Finally, some interesting examples of visualizations for inspiration.

Examples


  1. Visualization of the traffic from Uber . Uber visualizes a large amount of traffic data using JavaScript and WebGL. The library for this Uber develop themselves, and with the MIT license.

  2. Interactive infographics: "The daily routine of famous creative people . " Implemented in a simple HTML + CSS layout.

  3. Occupations of the average American during the day . The data is obtained on the basis of the survey, and their visualization is done on D3, SVG is used.


Thanks to all!

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


All Articles