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 .



Wednesday, February 26, 2020

Assignment #7

Visual Distribution Analysis


S&P 500 Distribution of Monthly Returns

Given the current state of the coronavirus and the stock markets, I decided to look at the monthly performance of the SPY since January 1993.

The data was obtained from Yahoo Finance, analyzed in RStudio and then modified in Adobe Illustrator.

The code, pdf, and related files can be obtained from GitHub @ git-me .









Thursday, February 20, 2020

Assignment #6

Visual Differences and Deviation Analysis


Florida Counties Relative Health Importance

This is a visualization from the Community Health Status Indicators (CHSI) data set. This particular indicator domain has been filtered for Florida counties and still contains 1474 data points covering 22 unique variables for 66 counties.

With so many data points, the heat map provides a quick way to spot differences and compare across multiple variables. One thing that isn’t apparent by perusing the data set but that the visualization brings out, is the clustering of missing or non-reported data.

The .csv file was obtained from healthdata.gov, analyzed in RStudio and then modified in Adobe Illustrator.

The code, pdf, and related files can be obtained from GitHub @ git-me







Monday, February 10, 2020

Assignment #5

Part to Whole and Ranking Analysis using Plotly


Leading Causes of Death for Florida from 1999 - 2017

The provided dashboard consists of three charts that respectively show causes as a yearly percentage, causes by ratio-linear, and causes by ratio-logarithmic. The logarithmic scale is provided as a means to zoom for two reasons: (1) bunching of data at the lower linear end and (2) more easily observe comparative changes over time.

The interactive dashboard can be found here: Plotly dashboard.

An image of the three dashboard charts is provided below.







Note:

Data retrieved from the Centers for Disease Control and Prevention at https://data.cdc.gov/NCHS/NCHS-Leading-Causes-of-Death-United-States/bi63-dtpu


Sunday, February 9, 2020

Assignment #4

Display data using bar graph


Population Size and Density

This visualization shows the relationship between a state's counties' population size and its density. Bar length shows population size and color shows its density. Density is defined as persons per square mile.

For quite a few states, the data shows that size and density are not always related. A shown below, Pinellas County has less than half of Miami-Dade County's population but it is more than twice Miami-Dade's density.





If this visualization was published as a Tableau Dashboard or Story, the user could select other states and view its information.


Friday, January 31, 2020

Assignment #3

Edit previous assignment using Adobe Illustrator


Medicare Hospital Overall Rating

This assignment was an exercise in simplicity or subtlety. Tableau had already done much of the work around the map’s edges i.e. text for the title and legend.

Adobe Illustrator was used to focus the viewer’s attention. In keeping with the traditional color of hospitals signs, dark blue was used for this. I added border, hospital symbol, and dividing lines in the legend.






Sunday, January 26, 2020

Assignment # 2

Create a geographic map using Tableau


Medicare Hospital Overall Rating

With over 5000 data points on the map there's a clear issue with over plotting so the circles without fill color seemed most appropriate. The color choice of orange/gold along with varying circle sizes also seemed to best capture the hospital rating scale. The intend is to use the pre-attentive attributes of size and color intensity together. Using other combinations of colors, shapes, and size just seemed to result in a loss of the visual data interpretation.




If this visualization was published as a Tableau Dashboard or Story, the user could zoom in/out for the entire country and get some additional information via the Tooltip (details on demand) feature.



Wednesday, January 15, 2020

Assignment # 1

An eye-catching visualization from around the Web


This is a Life Expectancy visualization from the Institute for Health Metrics and Evaluation (IHME) at http://www.healthdata.org/.

The visualization landing page is at https://vizhub.healthdata.org/le/

Landing Page

From the landing page’s menu, I selected:
  • ‘Life expectancy decomposition’
  • sexes as ‘Both’
  • sorted by ‘Change in life expectancy’
which then produces the below interactivity.

Life Expectancy Sorted in Ascending Order















I think it’s quite a successful and intuitive visualization – there is no real help or legend necessary to explain it. Granted, I think that most visualizations use something like their own ‘lingo’ and our brain may need a few minutes to adjust and adapt to the presentation. But overall, I think it’s self-explanatory.

I’ll now briefly describe this visualization using some of the verbiage from Keim et. al [1].

Hovering the mouse and clicking on either the bars or the ailments pane reveals insight about which health topics need attention and which ones seem to work well.

Detail for South Africa

The user is free to zoom, filter, and analyze an innumerable amount of combinations and options in order to answers questions and unlock knowledge about certain global health patterns and trends.

This is clearly an information visualization as opposed to a scientific one. The dimensions and variables involved here are numerous and not strictly limited to some specific biological measurement like a platelet count. The data or input involved to provide a global health snapshot must be enormous and its data management must have been carefully thought through.

The model is really hidden from the user, but we perhaps see its interface when we change options and make different selections. I understand that from a broad public health perspective, the triad of linear regression, logistic regression, and survival analysis are heavily used and I’m sure that the IHME uses these under the hood.


Notes
[1] visual-analytics book. https://www.visual-analytics.eu/book/aboutbook/