The brain is a very integral part of our body and as humans, we are prone to many different kinds of illnesses and one of the major Brain diseases is Dementia.
Dementia is a collection of signs and symptoms that are caused by several diseases Example: Alzheimer’s is the main or most common cause of dementia
This project is an analysis to answer the questions where and who are affected by dementia in Australia.
For this analysis, the data set named Dementia in Australia was collected from the Australian Institute of Health and Welfare which falls under the creative commons license.
link: Aihw.gov.au. (2018). [online] Available at: https://www.aihw.gov.au/getmedia/d9a7dae0-7a96-4bb8-804a-2d7c9c60a763/State-Territory-Dementia-2011-2020.xls.aspx.
The data shows the number of people with dementia by state and territory of Australia and by sex. These estimates have been derived by applying the same prevalence rates to ABS population data (for 2011) and ABS population projections (for 2012 onward).
Interpretation at the end.
#Read packages
library(colourpicker)
library(ggplot2)
library(dplyr)
library(rgeos)
library(maptools)
library(ggmap)
library(broom)
library(rgdal)
library(sf)
library(readr)
#Reading shape file
#states <-readShapeSpatial("C:\\Users\\satis\\Desktop\\Dv ass 2.1\\Ashmore_and_Cartier_Islands_AL4-AL476.shp")# this was not working.
states<-rgdal::readOGR("C:\\Users\\satis\\Desktop\\Dv ass 2.1\\Ashmore_and_Cartier_Islands_AL4-AL476")# used this as the error told to.
## OGR data source with driver: ESRI Shapefile
## Source: "C:\Users\satis\Desktop\Dv ass 2.1\Ashmore_and_Cartier_Islands_AL4-AL476", layer: "Ashmore and Cartier Islands_AL4-AL4"
## with 15 features
## It has 14 fields
class(states)
## [1] "SpatialPolygonsDataFrame"
## attr(,"package")
## [1] "sp"
names(states)
## [1] "id" "country" "name" "enname" "locname"
## [6] "offname" "boundary" "adminlevel" "wikidata" "wikimedia"
## [11] "timestamp" "note" "rpath" "ISO3166_2"
#reading data
popu<- read.csv("State-Territory-Dementia-2012,14,16,18,20 male1.csv")
colnames(popu)<-c("states", "total", "male", "female")
#tidying the shape file
v123 <- tidy(states, region="name")
#removing the unwanted states and territories
v321<-v123[v123$lat >= -54.35660 &
v123$group!="Tasmania.501",]
v321<-v321[v321$id!="Ashmore and Cartier Islands" &
v321$id!="Christmas Island" &
v321$id!="Cocos (Keeling) Islands" &
v321$id!="Heard Island and McDonald Islands" &
v321$id!="Jervis Bay Territory" &
v321$id!="Norfolk Island",]
#creating column with same names to merge data
v321$states<-v321$id
#merging the files
merge.lga.profiles4<-merge(v321, popu , by="states", all.x=TRUE)
#ordering the data
choro.data.frame2<-merge.lga.profiles4[order(merge.lga.profiles4$order), ]
#Plot
pop12 <- ggplot(data = choro.data.frame2,
aes(x = long, y = lat, group = group,
fill = total))
pop12 + geom_polygon(color = "black", size = 0.05) +
coord_map()
pop21<-pop12 + geom_polygon(color = "white", size = 0.00005) +
coord_map() +
scale_fill_distiller(name = "Population Percent
per State",
guide = "legend",
palette = "RdPu", direction = 1) +
theme_minimal() + theme(axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank(),
panel.grid = element_blank()) +
labs(title=" Australia States with Dementia-2018")+
theme(plot.title = element_text(hjust = 0.5,size = 25))
pop21
#BAR PLOT
#Data <- read.csv("C:\\Users\\satis\\Desktop\\Dv\\Assignment 2\\State-Territory-Dementia-2012,14,16,18,20 bo.csv")
Data <- read.csv("State-Territory-Dementia-2012,14,16,18,20 bo.csv")
#renaming the columns
colnames(Data)<-c("Australia States","Gender","Population (as Percentage)")
#converting as factor
Data$`Australia States` <- as.factor(Data$`Australia States`)
Data$Gender <- as.factor(Data$Gender)
#plot
u<-ggplot(Data, aes(`Australia States`,`Population (as Percentage)` , fill = Gender)) +
geom_bar(stat="identity",position= "dodge") +
coord_flip()+
scale_fill_brewer(palette = "Paired")
u<- u + labs(title="Total Male & Female with Dementia-2018 ")+
theme(plot.title = element_text(hjust = 0.5,size = 20))
par(mfrow=c(2,2))
u
pop21
To answer the question of who is dominating with dementia by gender, the bar plot with states and gender gives a good insight into the population. The first insight is Females are dominating the males in all the states of Australia with the exception of the Northern Territory which has an equal number of males and females suffering from dementia.
Secondly, we can see clearly that the ratio of the difference between the genders for each state is alike, again with an exception for the Northern Territory. On the other hand, the spatial plot helps in getting insight about Where?. The visualisation shows the percentage of people suffering from dementia for each state by the total Australian population.
At first, Western Australia has the highest number of people suffering from dementia, on the second is Tasmania, third is New South Whales, fourth, there is a very slight difference between Queensland and Victoria yet Victoria has a higher no of people with dementia than Queensland, followed by South Australia, the Northern Territory having the least no of people suffering from dementia in Australia which is directly proportional to its population which answers the question where?
To conclude, the answer to the question Where and who dominates dementia in Australia? it can be identified and detected by the illustration that females are more prone to dementia and dominate males and the highest no of people suffering from dementia are in Western Australia whereas the lowest is Northern Territory.
— END —