Assignment 1
—
title: “Assignment 1”
output: word_document
—
## Relations among Categorical Variables
In the notes on Healy’s Chapter 5, we looked at several ways to visualize the relationship between two categorical variables.
For this assignment you need to select a pair of cateogrical variables from a dataset which interests you. You could use one of the datasets I used in class, but you are free to pick anything.
## Problem 1
Identify the dataset you’ve chosen and the two categorical variables. Feel free to create a new categorical variable from an existing quantitative variable. Do a summary of the dataset and produce simple tables for each of the two variables. Make sure that you don’t have too many values. Collapse if necessary.
Don’t forget to include library commands for all of the packages you need.
“`{r}
# Place your code in this chunk.
glimpse(organdata)
## Problem 2
Select the visualization of the relationship that you feel is the best and produce it.
“`{r}
# Place your code here.
“`
library(ggplot2)
p <- ggplot(data = organdata,
mapping = aes(x = reorder(country, donors, na.rm=TRUE),
y = donors))
p + geom_bar() +
labs(x=NULL) +
coord_flip()
## Problem 3
What is your second-choice visualization? Don't forget to explain why you prefer the first choice over the second choice.
```{r}
# Place your code in this chunk.
```
library(ggplot2)
p <- ggplot(data = organdata,
mapping = aes(x = reorder(country, donors, na.rm=TRUE),
y = donors))
p + geom_boxplot() +
labs(x=NULL) +
coord_flip()
I prefer the first visualization to the second one because it is easier to read and interpret the relationship between data
## Problem 4
Based on your visualizations describe what you see. Assume that you are speaking to a blind person.
Just write your comments here.
With the selected visualization, we can tell the level of organ donations in different countries. Since the visualization for every country is placed side by side, comparison of how organs have been donated across different countries becomes easiert.
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. If we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency and level of study. If you want a cheap essay, place your order with as much time as possible. Our prices start from $11 per page.