mongodb 群集圖_群集和重疊條形圖

mongodb 群集圖

為什么和如何 (Why & How)

1.- Clustered Bar Charts

1.- 集群條形圖

AKA: grouped, side-by-side, multiset [bar charts, bar graphs, column charts]

AKA :分組,并排,多組[條形圖,條形圖,柱形圖]

Why: Clustered Bar Charts (CBC) display numerical information about the relative proportion that exists between a main category and its subgroups that belongs to a second categorical variable. Similar to Stacked Bar Graphs, they should be used for Comparisons and Proportions but with emphasis on Composition. Unlike Stacked Bar Graphs, the elements that make up the subcategories may be diffusely related. CBC are particularly effective when a whole is divided into multiple parts. They enable to make comparisons across subcategories whilst Stacked Bar Graphs make comparisons within subcategories.

原因 :集群條形圖(CBC)顯示有關主要類別及其子類別之間的相對比例的數字信息,該子類別屬于第二個類別變量。 與堆積條形圖類似, 它們應用于比較和比例,但重點是組成。 與堆積條形圖不同,構成子類別的元素可能是分散相關的。 當一個整體分為多個部分時,CBC尤其有效。 它們使您可以跨子類別進行比較而堆疊條形圖則可以在子類別內進行比較。

They allow to visualize how subgroups change over time, but the chart becomes difficult to read with the extension in time and with the increase in the number of subcategories. They should not be used for Relationship or Distribution analysis.

它們可以可視化子組隨時間的變化,但是隨著時間的延長和子類別數量的增加,圖表變得難以閱讀。 它們不應用于關系或分布分析。

How: as usual with bar charts, CBC are two-dimensional with two axes: one axis shows categories, the other axis shows numerical values. The axis where the categories are indicated does not have a scale to highlight that it refers to discrete (mutually exclusive) groups. The axis with numerical values must have a scale with its corresponding measurements units.

方式 :與通常的條形圖一樣,CBC是帶有兩個軸的二維:一個軸顯示類別,另一個軸顯示數值。 指示類別的軸沒有刻度以突出顯示它指的是離散(互斥)組。 帶有數值的軸必須具有帶有相應測量單位的刻度。

CBC are represented by means of sets of rectangular bars that can be oriented horizontally or vertically. Each principal category is divided into a cluster of bars representing subcategories of the second categorical variable. The quantity of each subcategory is shown by the length or height of those rectangular bars that are located side by side forming a cluster, with gaps between clusters slightly wider than a single standard bar.

CBC用可以水平或垂直定向的矩形條表示。 每個主要類別分為代表第二個類別變量的子類別的一組條形 。 每個子類別的數量由并排形成一個簇的那些矩形條的長度或高度顯示,簇之間的間隙比單個標準條稍寬。

Image for post
Fig. 1: schematic diagram of a clustered bar chart. The figure was developed with Matplotlib.
圖1:群集條形圖的示意圖。 該圖是用Matplotlib開發的。

Subcategories can be ordinal or nominal but equivalent subgroups must have the same color in each cluster so as not to confuse the audience. It is essential to use an appropriate color palette, a balanced spacing and a layout that facilitates comparison. As bars are heavy visual markers, use gridlines scantily just for improving the storytelling.

子類別可以是順序的或名義的,但是等效的子組在每個群集中必須具有相同的顏色,以免引起聽眾的困惑。 必須使用適當的調色板,平衡的間距和便于比較的布局。 由于條形圖是較重的視覺標記,因此請僅使用網格線以改善講故事的效果。

The following figure shows data about a company performance related with sales, expenses and profits for the 2016–2019 period. It is a vertically oriented clustered bar chart with years as the main category. Sales, expenses and profit are yearly represented as a cluster. The visualization clearly highlights that in 2018, even with the increase in expenses and reduction in sales, profit remained relatively constant.

下圖顯示了2016-2019年期間與銷售,費用和利潤相關的公司績效數據。 它是一個垂直定向的群集條形圖,以年為主要類別。 銷售,費用和利潤以年為單位表示。 可視化清楚地表明,2018年即使支出增加和銷售減少,利潤仍保持相對穩定。

Image for post
Fig. 2: economic performance of a fictitious company during the 2016–2019 period. The figure was developed with Matplotlib.
圖2:虛擬公司在2016-2019年期間的經濟表現。 該圖是用Matplotlib開發的。

It is interesting to compare the same data represented by means of a stacked bar chart. As previously indicated, CBC are appropriate when you want to compare across subcategories: sales in 2016 versus 2017 vs. 2018 vs. 2019; expenses in 2016 versus 2017 vs. 2018 vs. 2019; profit in 2016 versus 2017 vs. 2018 vs. 2019. On the contrary, the stacked bar chart only enables to do a good comparison for the segments near the baseline (sales) because expenses and profits have different initial baselines. Also, the height of each principal bar (sum of sales + expenses + profit of a particular year) does not make any sense.

比較通過堆疊條形圖表示的相同數據很有趣。 如前所述,CBC適用于您要比較子類別的情況:2016年與2017年對比2018年與2019年對比; 2016年與2017年對比2018年與2019年的支出; 2016年與2017年,2018年與2019年的利潤之間的關系。相反,堆積的條形圖只能對接近基線(銷售額)的細分市場進行很好的比較,因為費用和利潤具有不同的初始基線。 同樣,每個主要金條的高度(銷售總和+費用+特定年份的利潤)沒有任何意義。

Image for post
Fig. 3: stacked bar graph with the same data as Fig. 2.
圖3:具有與圖2相同數據的堆疊條形圖

Next figure is related with statistics of tertiary education in the European Union (EU-28) in 2017. There were 19.8 million tertiary students that year, women accounted for 54% of that number although the majority of the students following doctoral titles were men. Besides, a quarter of all students were involved in business, administration and law studies. The following clustered bar chart shows that female surpasses male in Education, Social Sciences, Arts and Humanities, Health and Welfare and also in Business, Administration and Law studies. On the other hand, male surpasses female in IT and Engineering, Manufacturing and Construction studies (Eurostat, 2020). The chart clearly displays numerical information about the participation of men and women in tertiary education across broad fields of education. It is a CBC horizontally oriented where educational fields make up the principal category while gender is the second categorical variable.

下一個數字與2017年歐盟(EU-28)的高等教育統計相關。當年有1980萬名大學生,女性占該數字的54%,盡管獲得博士學位的大多數是男性。 此外,所有學生的四分之一都參與了商業,行政和法律研究。 下面的條形圖顯示,在教育,社會科學,藝術與人文科學,健康與福利以及商業,行政和法律研究中,女性超過男性。 另一方面,在信息技術和工程,制造和建筑研究中,男性超過女性(歐盟統計局,2020年)。 該圖表清楚地顯示了在廣泛的教育領域中男女參與高等教育的數字信息。 它是CBC的水平取向,其中教育領域構成主要類別,而性別是第二個類別變量。

Image for post
Fig. 3: distribution of tertiary education students by field and gender for the European Union during 2017. Source (#1)
圖3:2017年歐洲聯盟按領域和性別分列的高等教育學生分布。來源(#1)

The main problem with clustered bar graphs is that they don’t clearly visualize the ratio of the individual parts relative to the whole. As a result, proportions are not easy to evaluate. Their strength is related with direct comparisons between equivalent subcategories of the second categorical variable.

聚集條形圖的主要問題在于,它們無法清晰地可視化各個部分相對于整個部分的比率。 結果,比例不容易評估。 它們的強度與第二個類別變量的等效子類別之間的直接比較有關。

2.- Overlapped Bar Charts

2.- 重疊的條形圖

AKA: Overlay, Overlapping, Superimposed [bar charts, bar graphs, column charts]

AKA :重疊,重疊,疊加[條形圖,條形圖,柱形圖]

Why: Overlapped Bar Charts (OVC) are used to make comparisons between different items or categories. OVC compare only two numerical variables per item or category in a single diagram. The numerical variables must be closely related to merit a comparison. They are also used to show trends over time based on similar premises. They should not be used for Relationship or Distribution analysis.

原因 :重疊的條形圖(OVC)用于在不同項目或類別之間進行比較 。 OVC在單個圖中僅比較每個項目或類別的兩個數字變量 。 數值變量必須與優點比較緊密相關。 它們還用于根據類似前提顯示一段時間內的趨勢。 它們不應用于關系或分布分析。

The conceptual idea related with OVC is to contrast numerical values ??of two variables that overlapped one onto other allows to describe the message (storytelling) with greater expositional power. In such sense, they are better than Clustered Bar Graphs because the comparison is intuitively superior. This kind of chart shows surpluses and shortages with remarkable precision, particularly when appropriate grids are added to it. They are frequently used to show level of progress against an objective or against a benchmark.

與OVC相關的概念是將兩個相互重疊的變量的數值進行對比,從而以更大的論述能力來描述消息(講故事)。 從這種意義上講,它們比聚類條形圖更好,因為在直觀上比較效果更好。 這種圖表以非常精確的精度顯示了盈余和短缺,特別是在添加適當的網格時。 它們通常用于顯示相對于目標或基準的進度水平。

Image for post
Fig. 4: schematic diagram of a overlapped bar chart. The figure was developed with Matplotlib
圖4:重疊條形圖的示意圖。 該圖是用Matplotlib開發的
How: it is a two dimensional graph with two axis -similar to every standard bar chart- with rectangular bars that can be oriented horizontally or vertically. One axis shows categories, the other axis shows numerical values related with two variables. Bars representing the same category share the same baseline and the same location on the corresponding axis. Both numerical variables must be closely related and share the same numerical scale. The width of the bars is different for each numerical variable with the smaller going forward for clarity of reading. The drawback is that for some categories one of the bars is the shorter while it is the longer for others.
Image for post
Fig. 5: Actual versus Budgeted expenses for a fictitious company during the 2012–2019 period. The figure was developed with Matplotlib
圖5:虛擬公司在2012-2019年期間的實際支出與預算支出。 該圖是用Matplotlib開發的

Some visualization tools allow to partially overlap several numerical variables (multiple data series) such that rectangles representing each successive numerical variable are partially hidden by other rectangles located in front of them. Conceptually, they are equivalent to clustered (grouped) bar charts when the rectangles representing the different data sets begin to overlap instead of being located side by side. OVC implies the extreme case where a rectangle overlaps 100% ahead of another rectangle. Undoubtedly, audiences will find very difficult to make comparisons with three or more partially overlapping bars. Its use could be justified when data of multiple subcategories must be compared over very long periods of time in a single diagram.

一些可視化工具允許部分重疊幾個數值變量(多個數據系列),以便表示每個連續數值變量的矩形被位于它們前面的其他矩形部分隱藏。 從概念上講,當代表不同數據集的矩形開始重疊而不是并排放置時,它們等效于聚簇(分組)條形圖。 OVC表示一個極端情況,即一個矩形在另一個矩形之前重疊100%。 無疑,觀眾將很難對三個或更多部分重疊的條形進行比較。 當必須在很長一段時間內在一個圖中比較多個子類別的數據時,可以證明其用途合理。

Image for post
Fig. 6: partially overlapped bar charts, source Peltier Tech Blog (#2)
圖6:部分重疊的條形圖,來源Peltier Tech Blog(#2)

To sum up, you might use a clustered bar graph when you want to make direct comparisons across parts of a whole. On the other hand, overlapped bar graphs enable to do excellent comparisons between two closely related numerical variables.

綜上所述 ,當您想對整個部分進行直接比較時,可以使用聚簇條形圖。 另一方面,重疊的條形圖可以在兩個緊密相關的數值變量之間進行出色的比較。

As usual with standard bar graphs, I recommend the following tips and warnings for both types of charts:

與標準條形圖一樣,對于這兩種類型的圖表,我建議以下提示和警告

Start the baseline at 0: if the bars are truncated, the actual value is not properly reflected;

將基線從0開始:如果條形被截斷,則實際值不能正確反映;

Vertical orientation (column charts) is recommended when chronological data (time series, temporal data) or negative numerical values ??are present (Fig. 2 & Fig. 5). On the other hand, it is preferable to use horizontal orientations when graphing numerous categories, in particular with very long labels (Fig. 3);

如果存在時間順序數據(時間序列,時間數據)或負數值(圖2和圖5),則建議使用垂直方向(柱形圖)。 另一方面,在繪制多個類別的圖形時,尤其是使用非常長的標簽時,最好使用水平方向(圖3)。

Partially overlapped bar charts only display a good message if longer bars are always behind shorter ones;

如果長條總是在短條之后,則部分重疊的條圖只會顯示一個好消息。

Avoid all 3D effects. Although they are aesthetically pleasing, they are against all the rules for an appropriate Data Visualization.

避免所有3D效果。 盡管它們在美學上令人愉悅,但它們違反了適當數據可視化的所有規則。

If you find this article of interest, please read my previous:

如果您發現這篇文章感興趣,請閱讀我以前的文章:

Stacked Bar Graphs, Why & How, Storytelling & Warnings

堆疊條形圖,原因和方式,講故事和警告

#1: https://ec.europa.eu/eurostat/statistics-explained/index.php/Tertiary_education_statistics#Fields_of_education

#1:https://ec.europa.eu/eurostat/statistics-explained/index.php/Tertiary_education_statistics#Fields_of_education

#2: Peltier Tech Blog, https://peltiertech.com/stacked-vs-clustered/

#2:Peltier技術博客, https ://peltiertech.com/stacked-vs-clustered/

翻譯自: https://towardsdatascience.com/clustered-overlapped-bar-charts-94f1db93778e

mongodb 群集圖

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/274121.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/274121.shtml
英文地址,請注明出處:http://en.pswp.cn/news/274121.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

第一次寫python

這是一個在BJDP上學習Coding Kata的時候用到的一個練習,原來打算用Java寫的,但是一想正好是學習的好機會。 就用Python了。第一次,寫的有些復雜。 這個題目是關于購買圖書的打折信息的。 題目來源: http://codingdojo.org/cgi-bin…

Android 第八課 創建自定義控件

常用控件和布局的繼承結構,如下圖: (待續。。。。) 所有的控件都是直接或間接繼承自View的,所用的所有布局都是直接或間接繼承自ViewGroup的,View是Android中最基本的一種UI組件,它可以在屏幕上…

figma下載_搬到Figma對我意味著什么

figma下載A couple of years ago, amidst the boom of new design and prototyping software, I was pretty reluctant to fight on the Figma/Sketch cold war. I was working on a relatively small design team and, after years helping to design products, well sold on …

解決IE中img.onload失效的方法

解決IE中img.onload失效的方法 - CoffeeCats IT Blog - IT博客http://www.cnitblog.com/CoffeeCat/archive/2008/02/01/39533.htmlFirefox、Google Chrome不存在問題!為什么onload沒有被IE調用呢?因為IE會緩存圖片,第2次加載的圖片&#xff0…

Android 第九課 常用控件-------ListView

ListView允許用戶通過手指上下滑動的方式將屏幕外的數據滾動到屏幕內,同時屏幕上原有數據將會滾動出屏幕。 1、ListView簡單用法 如何將ListView將你要顯示的大量內容關聯起來呢?這是個很重要的問題。 1、首先我們必須先將數據提供好,因為你的…

Singleton patterns 單件(創建型模式)

1、模式分類 1.1 從目的來看: ? – 創建型(Creational)模式:負責對象創建。 ? – 結構型(Structural)模式:處理類與對象間的組合。 ? – 行為型(Behavioral&…

Android 第十一課 SQlite 數據庫存儲

Android 為了讓我們能夠更加方便的管理數據庫,特意提供了一個SQLiteOpenHelper幫助類,通過借助這個類就可以非常簡單的對數據庫進行創建和升級。 SQLiteOpenHelper是一個抽象類,我們要創建一個自己的幫助類去繼承它。SQLiteOpenHelper有兩個抽…

淺析SQL Server 2005中的主動式通知機制

一、引言 在開發多人同時訪問的Web應用程序(其實不只這類程序)時,開發人員往往會在緩存策略的設計上狠下功夫。這是因為,如果將這種環境下不常變更的數據臨時存放在應用程序服務器或是用戶機器上的話,可以避免頻繁地往…

Android 第十二課 使用LitePal操作數據庫(記得閱讀最后面的注意事項哦)

一、LitePal簡介 1、(新建項目LitePalTest)正式接觸第一個開源庫---LitePalLitePal是一款開源的Android 數據庫框架,它采用了對象關系映射(ORM)的模式。2、配置LitePal,編輯app/build.gradle文件,在dependencies閉包中…

listview頻繁刷新報錯

在Android編程中使用Adapter時,偶爾會出現如下錯誤:The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI t…

Android 第十三課 SharedPreferences存儲

SharedPreferences是使用鍵值對的方式來存儲數據的。當保存一條數據時,需要給這條數據提供一個對應的鍵,這樣在讀取數據的時候就可以通過這個鍵把相應的值取出來。而且支SharedPreferences還支持多種不同的數據類型存儲,例如:如果…

DSP的Gel作用

轉自:http://blog.csdn.net/azhgul/article/details/6660960最近剛在研究Davinci系,特此MARK下,以資后續學習之用。 DSP的Gel作用 1 GEL文件基本作用 當CCSStudio啟動時,GEL文件加載到PC機的內存中,如果定義了StartUp(…

解決關于登錄校園網顯示不在IP段的問題方案(要看注意事項哦!)

有時,登錄校園網,賬號和密碼都顯示正確,但是卻顯示出“賬號只能在指定IP段登錄”的問題。 那我們就提供了一個解決方案: 使用WinR,并在輸入框,輸入cmd命令:(如下)接著輸入&#xff1…

jquery插件編寫

jQuery為開發插件提拱了兩個方法,分別是: jQuery.fn.extend(object); jQuery.extend(object); jQuery.extend(object); 為擴展jQuery類本身.為類添加新的方法。可以理解為添加靜態方法。是全局的(位于jQuery命名空間內部的函數)…

gtk/Glade編程 編譯命令不成功 解決方法

摘自:http://blog.chinaunix.net/uid-26746982-id-3433656.html 當我們編寫gtk/glade程序,gcc編譯時,用如下命令: #gcc -o server server.c pkg-config --cflags --libs gtk-2.0 報錯:/tmp/ccoXadAd.o: In function …

Android 第十五課 如何使用LitePal從SQLite數據庫中刪除數據(十四課用來保留講解如何向SQLite數據庫中存入數據)

使用LitePal刪除數據的方式主要有兩種,第一種就是直接調用已存對象的delete()方法,所謂已存儲對象就是調用過save()方法的對象,或者說是通過LitePal提供的查詢API查出來的對象,都是可以直接使用delete方法來刪除對象的。這是比較簡…

頁面返回頂部(方法比較)

下面就說下簡單的返回頂部效果的代碼實現&#xff0c;附注釋說明。 1. 最簡單的靜態返回頂部&#xff0c;點擊直接跳轉頁面頂部&#xff0c;常見于固定放置在頁面底部返回頂部功能 方法一&#xff1a;用命名錨點擊返回到頂部預設的id為top的元素 html代碼 <a href"#top…

Android 第十六課 使用LitePal查詢數據

LitePal在查詢API方面做了非常多的優化&#xff0c;基本上可以滿足絕大多數場景的查詢需求&#xff0c;并且代碼也十分整潔。 例如我們需要查詢表中的所有數據&#xff1a; List<books> DataSupport.findAll(Book.class); 沒有冗長的參數列表&#xff0c;只需要調用一下…

linux創建桌面圖標,和開始菜單欄圖標

轉自&#xff1a;http://blog.csdn.net/qq_25773973/article/details/50514767 ###環境&#xff1a;Mint17&#xff0c;&#xff08;其他類似的linux系統是一樣的&#xff09; 如果開始菜單有圖標&#xff0c;創建桌面圖標很簡單&#xff0c;右鍵添加到桌面即可。 如果沒有&am…

ScrollView中使用ListView

轉自 http://blog.csdn.net/fzh0803/article/details/7971391 由于scrollview和listview不能直接共存&#xff0c;在scrollview中直接使用lsitview的話只會顯示一個條目&#xff0c;要使他們共存&#xff0c; 據我所知&#xff0c;有三種方法&#xff1a; 1。如果listview的高度…