1

Chart I do have

There are minor things that one would want to correct if this was real data I needed to present but I am just trying to get a handle on how it works. I am looking for a true tornado graph showing the frequency of yes's and no's present in each category.

I have meticulously gone through stack/reddit, R documentation, and YouTube video to get a chart that reports the frequency of yes/no answers by category and have flipped the coordinates so that the bars stretch horizontally. This is usually good enough for most people looking for tornado graph. However, since I am dealing with binary data yes/no. The bars are just stacked flush against the left hand axis and still does not produce an actual tornado graph.

Due to some upcoming reports I was hoping to get some good information and practice in making true tornado graphs but with this simple 150 observation data set all I keep producing is a bar chart histogram

dput(head(data))
structure(list(Global_Region = structure(c(3L, 1L, 1L, 1L, 1L, 1L), .Label = c("Europe", "Middle East", "Eastern Block", "South & Central, "America", "North America", "Africa", "Asia", "Asian Pacfic"), class = "factor"), No_Elected = structure(c(2L, 2L, 2L, 2L, 2L, 2L), .Label = c("No","Yes"), class = "factor")), row.names = c(NA, 6L), class = "data.frame")

head(data)
  Global_Region No_Elected
1 Eastern Block        Yes
2        Europe        Yes
3        Europe        Yes
4        Europe        Yes
5        Europe        Yes
6        Europe        Yes

This produces a great bar histogram showing a single horizontal bar for each category the breakdown of yes's of no's.

Now I just need to get it off the axis and center each break down, down a single middle line/point to create a tornado graph.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
Ryan C
  • 11
  • 3
  • 1
    Please share a portion of your data, something like: `dput(head(df))` – astrofunkswag Sep 30 '19 at 21:08
  • Can you please edit your question to put those in the body? That makes it easier for others to see the "up to date" version of the question. – Jon Spring Sep 30 '19 at 21:43
  • Thank you, sorry about that. – Ryan C Sep 30 '19 at 21:54
  • Possible duplicate of [Simpler population pyramid in ggplot2](https://stackoverflow.com/questions/14680075/simpler-population-pyramid-in-ggplot2) – Mako212 Sep 30 '19 at 22:09
  • Ryan, voting to close because this question is very similar to the flagged duplicate, and also, your provided code/data is not sufficient to make this a reproducible example. – Mako212 Sep 30 '19 at 22:27

0 Answers0