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)

相关推荐

  • 每天早上吃鸡蛋,好处的确很多,但不注意3点,或等于没病找病

    感谢大家阅读,在阅读之前,麻烦您先点击上面的“蓝色字体”,再点击“关注”,这样您就可以继续“免费”收到文章阅读了,每天都会有新鲜热门话题推送,完全是“免费订阅”哦,敬请放心关注阅读...

    2021年12月8日
  • 31省份新增确诊25例,其中本土9例

         据国家卫健委通报:8月11日0—24时,31个省(自治区、直辖市)和新疆生产建设兵团报告新增确诊病例25例,其中境外输入病例16例(广东6例,上海4例,内蒙古1例,浙江1...

    阅读 2021年12月26日
  • 麻辣粉的做法最正宗的做法,家庭自制麻辣粉的做法窍门

    麻辣粉的制作方法(在家怎样做麻辣粉)麻辣粉的做法及配方
    主料

    阅读 2022年2月24日
  • 所得税税前扣除是什么意思,税前扣除的通俗意思

    所得税税前扣除是什么意思,税前扣除的通俗意思一、什么是企业所得税税前扣除凭证? 税前扣除凭证,是指企业在计算企业所得税应纳税所得额时,证明与取得收入有关的、合理的支出实际发生,并据以税前扣除的各类凭证。 二、取得税前扣除

    教程 2021年11月30日
  • 后宫之旅适合哪一套?

    后宫手游千金团拜兑哪套合适清后宫礼仪“下跪叩首”礼,“下跪”礼,“道万福”礼,“颔首”礼嫔妃: 皇后:当遇到众嫔妃时,自称“本宫”行“颔首礼”;遇到太后,皇帝时称“臣妾”行“参见礼” 夫人—妃(含):当遇到比自己品级低妃子时,可自称“本。古代男子和女子第一次看见怎样打招呼?中国是有着几千年历史的文明古国,我们有很多优秀的文化传统在历史进程中演变,其中也有很多值得我们去学习的地方,比如就是我们华夏文明中的见面礼,就是人见面个清朝人见面是怎样行礼的?宫人见正三品以下妃嫔行躬身礼,正三品以上及皇上,太后行屈膝礼。对比自己位高的宫人,需行躬身礼。 后宫妃嫔遇比自己分位高者,需行躬身礼。遇皇上或太后 第

    阅读 2022年6月24日
  • 氢OS是一个很有趣的系统,它或许被人低估了

    当我习惯了MIUI丰富的功能。

    科技 2021年12月3日