The Data:
In order to find a two-way table and construct some dot-plots, I chose the yearly building-house permits (in thousands) by states: “IN”, “MD”, “MI”, “OH”, “PA”, between years 2012-2016.
The data is from the website: https://www.statedatalab.org/state_data_and_comparisons/#dem1_anc
Dotplot of Average House Permits by States ordered from high to low:
this graph is the average yearly house permits by states. We can see that Pennsylvania has the hight mean of permits around 15.45 k permits per year, while Madison has the lowest mean of permits around 10.52 k permits per year.
Indiana, Michigan and Ohio come in the middle with permits mean between 12 k to 13 k permits per year.
Dotplot of house permits grouped by columns (Years):
This graph is for the house permits of all five states in each year. Pennsylvania tends to have the highest permits every year, while Madison has the least permits number every year.
In 2014, Pennsylvania has much higher permits than the other states.
The same grouped data can be displayed by using different panels (facets) for each Year:
Dotplot of house permits grouped by rows (States):
This graph is for the house permits of all five years in each state. Madison has the least variation in number of permits over the year. in all states, we realize a strict in number of permits between year 2012 and 2013 then a little decreasing in 2014. Pennsylvania is leading the number of permits almost in all years.
The same grouped data can be displayed by using different panels (facets) for each State:
In my case here, since the number of columns and rows are equal, both ways of grouping data giving the same clear vision to compare the data either within a certain year or within a certain state, although the variation between states in a given year is a bit more obvious than the variation between years within a given year. The best graph depends on the point of interest of this data: studying the change of number of house permits in a given state (group by rows) or studying the change of number of house permits in a given year (group by columns).