Use chart upgrade data in 7.0.2 CouchBase visualization

Use chart upgrade data in 7.0.2 CouchBase visualization

If a picture is better than a thousand words, the data visualization is worth a thousand data points. 7.0.2 CouchBase Query Workbench (and Analytics Workbench) Introduced Chart Tab, which allows users to create graphs based on query results.

Take a closer look at the chart

We use D3 inside to present the chart itself. You can use the hover tool to see each individual value, and see the map of the multicolor chart (color and them) on the right side of the right side of the canvas. The chart can also be downloaded as SVG using the buttons on the right side of the canvas. Adjust the canvas or the screen itself automatically adjusts the chart to suit. 

This is a simple GIF using the chart when using the query workbench.

We support eight types of charts: scattered / aggregation, connected scatter, line, area, column, packet, cake, and donuts. 

Scatter plot

This is a standard X-Y chart with the ability to collect data through color. This chart allows us to use the third value to view the relationship between the two values ​​and group data points, such as dependencies. They are basically a point that represents a single data. 

We download some rainfall data in a specific area in northern California. Here, we have lowered water, water day, date, rainfall recorded on the same day. 

In the chart below, we show a rainfall in the past five years.

SQL.
 

Choose Dayofwateryear, PrecipTodate, starting from Rainflat_Data, one year in 2010, 2012, 2010, 2016, 2018, 2021];

Let's first check the simple table of this data. 

data sheet

When you draw this as a chart, we get the following: 

Point map data

Another interesting example we can view is to draw geodics from our travel sample bucket and plan all airports in the United States.

SQL.
 

Select * From `Travel-sample`t type = 'Airport' and country =" USA ";

Dispersion graphic from the US airport

We can see that the time zone is so neatly saw it gave us a US map. When using chart visualization, we can easily view any differences in the data. Here, we saw the random data points of the time zone N introduced as an error data point. 

These charts are useful when we try to identify the correlation between the two values. Using the collection function, we can group data points based on colors. This can show us if there is any accidental gap in the data, or whether there is any abnormal point. If we want to segment data into different components, this may be useful, just like in the development of user Personas.

This can fall into a superplastic problem when we have a lot of data points to draw.

Connected scatter plot 

Similar to the boundary, the connection scatter plot shows the evolution or trend of a given value of another value of the time interval, and also displays each data point. It allows us to visualize the relationship type or trend, whether it is linear or an index. 

As an example, let's take a look at the encrypted market, that is, Bitcoin, see how the trend uses the polygon IO API to be in September.

SQL.
 

") As a project as a project;" Data-Lang = "Text / X-SQL">

Select Millis_TO_STR (item.t, "2021-07-21") as a date, item from cut ("https://api.polygon.io/v2/aggs/ticker/x :btcusd/Range/1/DAY/ 2021-09-01 / 2021-09-30? Adjusting = true & sort = asc & apikey = <key> ") as a project;

In this example, we use the nesting result returned from the API to the API. 

Connected scatter plot

Line chart 

The scribing diagram shows the evolution of the value in another value, usually time. 

Let us see how SouchBase stocks are competent since IPO.

SQL.
 

") RES
Unnest res.Results, such as item, data, = "Text / X-SQL">

Select Millis_TO_STR (item.t, "2021-07-21t21: 00: 00") as a date, product from a curl ("https://api.polygon.io/v2/aggs/ticker/base/Range/1/day / July 22, 2021? September 21, 2021? Apikey = <key> ") Resources
Unnest Res.Results is a project

Line chart

The line diagram is used to track short and long-term changes. When small changes exist, the line diagram is better to use than a bar chart. The line diagram can also be used to compare a change in a group of changes in the same period.

Area map 

The area is very similar to the lines and bar charts because it combines the line and bar charts to display the value how the value changes over time (or the value used). It gives you a distribution.  

We have some data from CoVid-19 in California. Let's take a look at some of the vaccination in 2021.

SQL.
 

From covid_data.state.demographics where Date_Part_Str (Date, Year ") = 2021 Extreme 50 Select *;

2021 vaccine area chart

Bars and group bars 

The bar graph is for display data that is classified and the rectangular rod height is relative to the value they represent. When we want to have the same basic multiple values ​​(usually time), then we use the packet bar chart. It is especially useful for larger strips over time. 

First, we draw in the same picture as above.

Bar chart

Now let us compare which vaccine type is the most popular in each county in September: Moderna, Pfizer or J & J? 

SQL.
 

Choose Moderna_DOSES, JJ_DOSES, PFIZER_DOSES, DATE_FORMAT_STR Come (Date, "September 9, 2020" as from covid_data.county.vaccinations where DATE_PART_STR (Date, "Year") in [9 = 2021 and DATE_PART_STR (Date, "Month" )date]

 

Bar chart

It is important to note that the bar and group bar charts are high when the minimum and maximum values ​​of the depicted are high, so smaller values ​​are made into zero (no rules). Finally, the support of the planned logarithmic scale is added to the plot value, and the range is wide. 

Donuts and pie chart

These types of charts represent part of the overall. They decompose the total data into blocks according to the digital values ​​we pass.

The difference between the donuts and pie charts is mainly cosmetics. If you prefer to treat the components as a pie, select the pie chart. For these charts, the minimum 3% of the data will be packet into other data and displayed as a list of canvas. 

From our COVID-19 vaccination data, let us look at demographic (population distribution). 

SQL.
 

Select Solders_Total, RACE_LABEL from Covid_Data.State.Demographics;

Pie chart

To view the donut chart, let's take a look at the demographic data of the full vaccination. 

SQL.
 

Select SUM (complete _vaccize) as vaccination, from Covid_Data.State.State.Demographics group RACE_LABEL;

Donut chart

The chart in the label on the query workbench immediately visually visualizes the user easily to immediately obtain insight for its data. 

Feature summary

  • The x-axis uses a number or date / time / timestamp value.
  • Date, time and timestamp support format - ISO8601
    • "2021-09-21T05: 04: 55.999"
    • "2021-09-21T05: 04: 55"
    • "2021-09-21 05: 04: 55.999"
    • "2021-09-21 05:04:55"
    • "2021-09-21"
  • The Y axis must be a number. 
  • Any value will be used through color collection and then used to group data.
  • For pie chart / donuts and column / graphs, the value must always be numbers. Tags occupy numbers, date, time, and timestamps (in specific formats) and order. 
  • You can draw geodatabase using the X-Y chart (such as the travel example)
  • Hovering ability 
  • Download and share the chart for SVG

内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/160397.html

(0)

相关推荐

  • 银在周期表上找到哪里?

    银在周期表上找到哪里? 01之01 银在周期表上找到哪里?

    科技 2022年5月21日
  • 在淘宝上开店怎么找货源,开淘宝网店货源哪里来的呢

    淘宝开店货源钱怎么付哪些问题不可以换,哪些可以退,哪些不可以退,这样在卖东西的时候也明确的告诉买家,或者在宝贝描述里面加上,买家心理有保障,卖家心理也底了,这样的货源才有了售后的保证

    电商 2021年10月26日
  • 夏季喝水有讲究

    [db:摘要]

    生活 2021年8月29日
  • 闰月是什么意思(为什么有闰月)

    闰月是什么意思(为什么有闰月)1、闰月。
    闰月指的是阴阳历中的一种现象,阴阳历是按照月亮的圆缺即朔望月安排大月和小月,一个朔望月的长度是29.5306日,是月相盈亏的周期,阴阳历规定,大月30天,小月29天,这样一年12

    电商 2021年12月8日
  • 末日方舟试玩版,末日方舟 安卓

    晚期方舟测试服 末日方舟测试服体验版是一款精致的3D模型僵尸射击冒险游戏。 探索世界废墟,找到有效的工具。 你得到了很多资源,可以遇到路上的幸存者,和你一起生活。 还有很多原创烧脑...

    阅读 2022年10月24日
  • 如何实现机器学习SVM算法

    技术如何实现机器学习SVM算法如何实现机器学习SVM算法,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。SVM支持向量机是建立于统计学习理论上的一种分类算

    攻略 2021年11月15日