IncomeDistribution <- structure(list(BHCAIncome = c(0L, 520L, 1040L, 1560L, 2080L,
2600L, 3120L, 3640L, 4160L, 4680L, 5200L, 5720L, 6240L, 6760L,
7280L, 7800L, 8320L, 8840L, 9360L, 9880L, 10400L, 10920L, 11440L,
11960L, 12480L, 13000L, 13520L, 14040L, 14560L, 15080L, 15600L,
16120L, 16640L, 17160L, 17680L, 18200L, 18720L, 19240L, 19760L,
20280L, 20800L, 21320L, 21840L, 22360L, 22880L, 23400L, 23920L,
24440L, 24960L, 25480L, 26000L, 26520L, 27040L, 27560L, 28080L,
28600L, 29120L, 29640L, 30160L, 30680L, 31200L, 31720L, 32240L,
32760L, 33280L, 33800L, 34320L, 34840L, 35360L, 35880L, 36400L,
36920L, 37440L, 37960L, 38480L, 39000L, 39520L, 40040L, 40560L,
41080L, 41600L, 42120L, 42640L, 43160L, 43680L, 44200L, 44720L,
45240L, 45760L, 46280L, 46800L, 47320L, 47840L, 48360L, 48880L,
49400L, 49920L, 50440L, 50960L, 51480L, 52000L), Individuals = c(0.360378,
0.02452, 0.039104, 0.050964, 0.061447, 0.048957, 0.089287, 0.085337,
0.119157, 0.099424, 0.144754, 0.142813, 0.136721, 0.175189, 0.189045,
0.272185, 0.349904, 0.495677, 0.565412, 0.455554, 0.544273, 0.568053,
0.643447, 0.715425, 1.069935, 0.931515, 1.006107, 1.060482, 1.21439,
1.074727, 1.391847, 1.46447, 1.526836, 1.393322, 1.42751, 1.245144,
1.182038, 1.107841, 1.134082, 1.140441, 1.172731, 1.038517, 1.198316,
0.90615, 1.08742, 1.008237, 1.001697, 1.061595, 0.961196, 0.857763,
0.953607, 0.753164, 0.748438, 0.684676, 0.789905, 0.909458, 0.839949,
0.779309, 0.704792, 0.649712, 0.589338, 0.596904, 0.690517, 0.531486,
0.567959, 0.68598, 0.56461, 0.670507, 0.436732, 0.618818, 0.497315,
0.471563, 0.426592, 0.386329, 0.40068, 0.37541, 0.39191, 0.341874,
0.374496, 0.313639, 0.245053, 0.351542, 0.313893, 0.238819, 0.258795,
0.254356, 0.254996, 0.244209, 0.248016, 0.272274, 0.191026, 0.201729,
0.15425, 0.184335, 0.185607, 0.201346, 0.220928, 0.131583, 0.166179,
0.171408, 4.7)), .Names = c("BHCAIncome", "Individuals"), class = "data.frame", row.names = c(NA,
-101L))
library(ggplot2)
library(scales)
data.label <- data.frame(x = c(23556,29172), label = c("Median (£23,556)\n","Mean (£29,172)\n"))
ggplot(data=IncomeDistribution,aes(x=BHCAIncome, y=Individuals)) + geom_bar(stat="identity",width=520) + labs(x="Annual Equivalised Household Income Before Housing Costs (£)", y="Number of Individuals (millions)", title="Distribution of UK Household Income Before Housing Costs") + theme_minimal() + theme(axis.line = element_line(size = 0.5, linetype = "solid",colour = "black")) + scale_x_continuous(breaks=c(seq(from=0,to=52000,by=5000)),labels=comma) + geom_vline(xintercept = data.label$x) + geom_text(data = data.label,aes(x=x, label=label,angle=90, y=3))
ggsave(file="IncomeDistribution.pdf", width=7, height=5)