Tuesday, April 28, 2020

Final Project

World Religion Visualization

Background.
This project is a five-tab visualization that now lives on tableau public. The project is an attempt to bring life to a simple yet abstract dataset. It is about getting the user to interact with and to explore the data on their own terms and with their own objectives and curiosities.

The big question(s).
Religion. There are major ones, minor ones, sects, denominations, and nearly 200 countries. Most of the world’s population has some type of religious or spiritual affiliation. Where are they? How are they distributed – locally, regionally? Are there any trends? Questions abound.

Dataset.
The data comes from the Association of Religion Data Archives. The dataset is not that big at a dimension of 87 x 1996 and it comes in a fairly clean state. The set combines survey data from 1945 – 2010 in 5-year increments.

Approach.
A snapshot of the five-tab visualization is below.



Tab 1 and tab 2 use line graphs for time series analysis.
Tab 3 and tab 4 use world maps to explore the distributions and allows for some part-to-whole analysis.
Tab 5 uses a fine-tooth comb (tabular and numeric) to get some very specific country level proportion details – bar graphs are used here.

Overall, there’s simplicity, consistency, and plenty of details on demand (tooltips) throughout the viz.

Link to Word Religions on tableau public.


Related files can be obtained from GitHub @ git-me .

Monday, April 13, 2020

Assignment #13

Animation Visualization

Using gganimate

This visualization uses R's gapminder{gapminder} dataset. The dataset is faceted by continent with each dot representing a country. Each graph presents several attributes on a loop that cycles from the years 1952 to 2007 in 4 year increments. The variables presented are GDP per capita (x-axis [log scale]), life expectancy (y-axis), and population size (dot size).

In general, we see a positive slope for all continents. Starting around the 1990s, the impact of the HIV/AIDS epidemic on the African continent can be seen - quite some precipitous drops in the life expectancy for some countries. In Asia we see a few very large countries. Lastly, Europe has the tightest grouping at the high end of both life expectancy and GDP per Capita. 





Related files can be obtained from GitHub @ git-me .

Sunday, April 12, 2020

Assignment #12

Visual Social Network Analysis

Using igraph and ggraph

This visualization uses the dataset whigs {ggraph} i.e. the Whig Party from the mid-1800s. I also used some of the instructions as written by Kieran Healy in the article "Using Metadata to find Paul Revere."

This dataset is interesting because it isn’t formulated in the typical format one would expect from a dataset prepped for social network analysis. The dataset is really a list of memberships in various organizations. The dimensions are 254 x 7 - it shows the affiliation of 254 people in 7 organizations. Matrix multiplication allows us to format the original data for proper social network analysis.

This graph shows the group view on how groups are related by their shared memberships. Here we see heavy shared memberships between the London Enemies and the North Caucus. Much less so between for example, the London Enemies and the Loyal Nine.



This graph shows the people view on how groups are related by their shared memberships. Enlarging the image makes it easier to see.  In the top right we most likely see the London Enemies. Also, it isn’t too difficult to see the other 3 major groups of the North Caucus, the Tea Party, and the Boston Committee. It is also easy to see the somewhat lone memberships. Lastly, near the middle we see the venerable Paul Revere, the midnight rider.



Related files can be obtained from GitHub @ git-me .

Wednesday, April 1, 2020

Assignment #11

Tufte in R

Marginal boxplot scatterplot

This assignment uses one of Tufte's ideas as presented by Dr. Lukasz Piwek in the post titled Tufte in R.

This post does not use a data set for the plot but instead uses the sample() function to generate 5000 numbers from -4 to 4 inclusive. The best analogy for this plot is a stock chart. As time passes (1-5000), the generated number will determine how much to go up or down. 

We will examine the distribution of all 5000 numbers. First we'll consider the distribution of all numbers. There is one boxplot next to the plot and it is all white. Then we'll consider the distribution above (green) and the distribution below (red) zero - two boxplots here.

As the plot is a time series one, only the distribution of the y-axis is shown. As usual, the boxplot provides a concise five number summary along with displaying any outliers. As expected, aTufte theme provides essential formatting without fluff.

Related files can be obtained from GitHub @ git-me .


Graph 1




Graph 2



Graph 3



Friday, March 27, 2020

Assignment #10

Time Series and Visualization

This post covers the early 2015 “Occupancy Detection Data Set” from the UC Irvine Machine Learning Repository – data is here.

Verbatim information for the data set follows:

“Abstract: Experimental data used for binary classification (room occupancy) from Temperature, Humidity, Light and CO2. Ground-truth occupancy was obtained from time stamped pictures that were taken every minute."

The data set includes 3 files that were bound together. The 3 files did not have contiguous times, so the plot will have some non-recorded values. The overall data set I used has a cleaned dimension of 20560 x 7.

The variables show that when the office room is occupied (teal color), some lights are turned on (measured in Lux) and the temperature in the room increases. This latter makes sense as it is early February and the heater is most likely turned on. The CO2 levels measure exhaled air. It is interesting to see the higher levels on 9 February and it's possible to speculate that maybe there was a meeting held in that room. The 2 humidity variables also seem to validate room occupancy.




Related files can be obtained from GitHub @ git-me .


References

Luis M. Candanedo, Véronique. Accurate occupancy detection of an office room from light, temperature, humidity and CO2 measurements using statistical learning models. Feldheim. Energy and Buildings. Volume 112, 15 January 2016, Pages 28-39.


Monday, March 23, 2020

Assignment #9

Multivariate Analysis using corrgram and lattice

Multivariate analysis allows us to consider the effects that various variables may have on another condition. I used the "birthwt" data set from the "MASS" package. The data sets' dimension is 189 x 10. For brevity, I just considered two variables with a focus on design principles.

The five basic principles of design include alignment, repetition, contrast, proximity, and balance. This two-page assignment includes all of these principles except for contrast.

The two pages show repetition by title (Birth Weights) and usage of somewhat consistent graphs (histograms). Page one shows asymmetrical balance with some usage of vertical and horizontal alignment. Also, page one shows visual connection through proximity by placing the legend near the correlation diagram. Page two clearly shows symmetrical balance with alignments.

Related files can be obtained from GitHub @ git-me .









Wednesday, March 4, 2020

Assignment #8

Correlation or Regression Analysis Using ggplot2

Scatter plot matrix.

This is a scatter plot matrix from the urine data set in the boot package. The matrix has a dimension of 79 x 7.

A scatter plot matrix is a great first tool as part of the exploratory phase. This kind of matrix allows for a quick and rich understanding of the interrelationships between variables.

This particular plot extends the pairs{base} function with the ggpairs{GGally} function. By default, it adds a density graph on the diagonal along with correlation statistics.

Related files can be obtained from GitHub @ git-me .