官术网_书友最值得收藏!

Using matrix scatter plots for a quick overview

What happens if we want to visualize a lot of scatter plots in a single graph to quickly get a sense for the data? In that case, we need matrix scatter plots. We have various package options to create such matrix scatter plots (such as the car package). However, to keep things simple, we will use a built-in function instead of an external package.

By looking at the graph shown below, we can get a big-picture view of the interactions among variables. The purpose of this type of visualization is not to provide details, but to provide a general overview. To read this plot we need to look at any interesting scatter plot in the matrix, and move both horizontally and vertically until we find the name associated with its axis.

For example, if you look at the plot immediately to the right of NoQuals and simultaneously immediately on top of L4Quals_plus, what you're looking at is at the relation between those two variables (NoQuals in the y axis, L4Quals_plus in the x axis), and we find that it's an inverse relation; the higher the percentage of people in a ward with high levels of education, the lower the percentage of people with low levels of education. Another obvious relation is that the higher the education level (L4Quals_plus), the higher the occupation (HigherOccup).

Matrix scatter plot

Due to space restrictions, we were not able to show all variable relations, since the scatter plots would be too small to make sense of. However, we encourage the reader to add more variables to the matrix. There are some non-obvious relations. Finding them is left as an exercise for the reader:

desired_variables <- c(
    "AdultMeanAge",
    "White",
    "Owned",
    "NoQuals",
    "L4Quals_plus",
    "Unemp",
    "HigherOccup",
    "Deprived",
    "Proportion"
)
pairs(data[, desired_variables])
主站蜘蛛池模板: 麻城市| 佛山市| 临桂县| 霍林郭勒市| 巴林右旗| 福泉市| 梧州市| 禄丰县| 双鸭山市| 嵩明县| 漾濞| 保定市| 鹤壁市| 尼玛县| 陈巴尔虎旗| 庆阳市| 黄山市| 榆中县| 河间市| 玉环县| 塔城市| 鹿泉市| 四子王旗| 卢湾区| 大庆市| 遂川县| 茶陵县| 揭东县| 遂宁市| 罗山县| 叙永县| 井冈山市| 开化县| 安庆市| 女性| 宁远县| 田东县| 新泰市| 邢台县| 宣威市| 大同县|