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.mzph.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的高度…