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)

相关推荐

  • 2022年1月JD.COM短视频业务资格政策-

    2022年1月京东短视频商家排位赛政策-考核指标:1、公域上线视频数量、优选率、完播率;2、流量指标(浏览uv、进商uv、加购uv、曝光点击率、引商率等);3、交易指标(成交订单、成交金额)。

    电商 2021年12月13日
  • 板栗怎么做才好吃又简单,最简单的板栗饼的做法

    板栗怎么做才好吃又简单,最简单的板栗饼的做法现在进入了金秋10月了,板栗也都成熟了,这个时候的板栗是最新鲜好吃的,每年板栗成熟的季节,我都要进山里去捡板栗,野生的板栗虽然不如卖的大,长的也不好看,但是里面的板栗肉嫩黄嫩黄

    攻略 2021年11月19日
  • 2021.1.28新闻,2021年1月10日新闻头条

    先来喝一口营养鸡汤:

    生活 2021年11月8日
  • 词彩的意思(字义,诗词)

    词组词彩的意思(字义,诗词)基本解释详细字义 词彩拼音:cí cǎi注音:ㄘˊ ㄘㄞˇ解释:1.亦作"词采"。 2.词章的文彩。 3.指词藻。古代诗词唐代.孟郊.酬友人见寄新文:「览君郢曲文,词彩何冲融。」唐代.

    阅读 2021年11月2日
  • 头稍微一动就晕怎么办,一动就头晕是怎么回事

    “我几天前突然发现,稍微一动就头晕,感觉整个屋子在旋转,特别是起身和躺下的时候,甚至躺着翻个身也会。但眩晕的感觉持续时间也不长,大概1分钟就缓解了,只是有时候一晕还会觉得恶心,有几次还呕吐了。这种情况一直持续到现在,搞得我这几天都不敢出门了。请问柯大夫这是怎么回事呢?该怎么办?”

    生活 2021年11月6日
  • 四弦月琴如何调弦

    四弦月琴如何调弦四弦秦越的琴弦是d1、d1、a1和a1。a、d1、g1、c2,秦越的右手打法主要是打、挑、滚,有时还有捏、扫等。,拥有独特的“刮痧”技巧。左手有压、摇、滑、唱等手法。手指弹奏的秦越具有吸收三弦和琵琶、弹奏

    电商 2021年10月9日