Introduction

Title

Title


Key Points

Photo: Pixabay

Victoria’s total gambling losses from 2002 to now


Key Points

Source

Map of Victoria’s total gambling losses for 2021/22 financial year


Key Points

Notes

Source

Map of Melbourne’s total gambling losses for 2021/22 financial year


Key Points

Notes

Source

Map of average gambling losses per adult for Victoria


Key Points

Notes

Source

Map of average gambling losses per adult for Melbourne


Key Points

Notes

Source - Victorian Gambling and Casino Control Commission 2022.

Where are the biggest losses?


Key Points

Notes

Source

Where are the machines located?


Key Points

Source

Conclusion and references

Conclusion

References

---
title: "Gambling in Victoria — Who's losing?"
output: 
  flexdashboard::flex_dashboard:
    storyboard: true
    social: menu
    source: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(shiny)
library(ggplot2)
library(dplyr)
library(plotly)
library(ggplot2)
library(dplyr)
library(rgeos)
library(maptools)
library(ggmap)
library(broom)
library(maps)
library(mapproj)
library(scales)
library(stringr)
library(tidyr)
library('rgdal')
library(readxl)
```

-----------------------------------------------------------------------

### Introduction

```{r picture, echo = F, fig.cap = "Title", out.width = '100%'}
knitr::include_graphics("casino.jpg")
```

***

**Key Points**

-   Australia only has 0.3% of the world's population, but has 20% of its pokies (Miller 2022).
-   And according to The Guardian, Victorian gamblers lost a record $251 million in December 2021 (Convery 2022).
-   Who is most impacted by these losses in Victoria?

Photo: Pixabay

### Victoria's total gambling losses from 2002 to now

```{r}
total <- read_excel("playerandpop.xlsx", sheet = "Sheet2")
total$finyear <- factor(total$`Financial Year`)
```


```{r}
p <- ggplot(total, aes(x=Year, y=Loss, label=`Financial Year`)) + 
  geom_line(color='darkslateblue') + 
  scale_y_continuous(labels = comma, limits=c(0,3000000000)) + 
  geom_point(color='darkslateblue') + 
  labs(title = 'Total gambling loss in Victoria') + 
  ylab('Loss ($)') + xlab('Financial year') + 
  scale_x_continuous(breaks = c(2005,2010,2015,2020), labels = c("2005/06", "2010/11", "2015/16", "2020/21")) + 
  theme_bw() + 
  annotate("segment", x = c(2018.5,2018.5,2018.5,2021.5), xend = c(2021.5, 2018.5, 2021.5, 2021.5), y = c(1250000000, 1250000000,2250000000,2250000000), yend = c(1250000000, 2250000000,2250000000,1250000000), alpha = .5, color='darkred') + 
  annotate("text", x = 2020, y = 1100000000, label = " COVID-19 \nPandemic", color='darkred', size=3)

g <- ggplotly(p, tooltip=c('label', 'y'))  %>% config(displayModeBar = F) %>% layout(xaxis=list(fixedrange=TRUE)) %>% layout(yaxis=list(fixedrange=TRUE))
g$x$data[[2]]$hoverinfo <- 'none'
g$x$data[[3]]$hoverinfo <- 'none'
g %>% 
  layout(title = list(text = paste0('Total gambling losses for Victoria',
                                    '
', '', 'From 2002/03 to 2021/22 financial year (up to April 2022)', ''))) ``` *** **Key Points** - The COVID pandemic resulted in restrictions which shut pokies venues for a significant portion of the 2019/20 and 2020/21 financial years, which resulted in a sharp decline in losses. - But losses are beginning to increase again now that restrictions have been lifted. - Losses were steady pre-pandemic. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Map of Victoria's total gambling losses for 2021/22 financial year ```{r include=FALSE} vic.lga.shp <- rgdal::readOGR("vmlite_lga_cm/vmlite_lga_cm.shp") library(readxl) map_data <- read_excel("mapdates.xlsx") map_data$lga_name <- map_data$lga_name %>% toupper() map_data$lga_name = str_replace(map_data$lga_name, 'RURAL CITY OF ', '') map_data$lga_name = str_replace(map_data$lga_name, 'CITY OF ', '') map_data$lga_name = str_replace(map_data$lga_name, 'SHIRE OF ', '') map_data$lga_name = str_replace(map_data$lga_name, '-', ' ') lga.shp.f <- tidy(vic.lga.shp, region = "lga_name") lga.shp.f$lga_name <-lga.shp.f$id merge.lga.profiles<-merge(lga.shp.f, map_data, by="lga_name", all.x=TRUE) choro.data.frame<-merge.lga.profiles[order(merge.lga.profiles$order), ] ``` ```{r} p1 <- ggplot(data = choro.data.frame, aes(x = long, y = lat, group = group, label = lga_name, fill = Loss)) p1 <- p1 + geom_polygon(color = "black", size = 0.25) + coord_map(xlim = c(144.25, 146.5), ylim = c(-40, -32.5)) + scale_fill_distiller(name = "Loss ($)", guide ="colorbar", palette = "Reds", direction = 1, na.value = "#dddddd", labels = comma, limits = c(500000, 100000000), oob=squish) + 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="Gambling losses by LGA in Victoria (2021 financial year)") ggplotly(p1, tooltip= c( "label", "fill")) %>% layout(title = list(text = paste0('Total gambling losses in Victoria by Local Government Area (LGA)', '
', '', 'For current financial year (2021/22, up to April 2022)', ''))) %>% config(displayModeBar = FALSE) ``` *** **Key Points** - Metro areas appear to have higher total gambling losses. - Click and drag the cursor over the desired area to zoom in and double click to zoom out. **Notes** - This data combines regional LGAs: Whittlesea and Nillumbik, Ararat and Northern Grampians, Greater Geelong and Queenscliffe, Colac-Otway and Corangamite, Moorabool and Hepburn, Central Goldfields and Mount Alexander, Mitchell and Mansfield and Murrindindi, Alpine and Towong, Benalla and Moira and Strathbogie, Campaspe and Gannawarra, Southern Grampians and Glenelg. - Grey LGAs do not have pokies venues and therefore have no recorded data for losses. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Map of Melbourne's total gambling losses for 2021/22 financial year ```{r} p1 <- ggplot(data = choro.data.frame, aes(x = long, y = lat, group = group, label = lga_name, fill = Loss)) p1 <- p1 + geom_polygon(color = "black", size = 0.25) + coord_map(xlim = c(144.25, 145.5), ylim = c(-38.4, -37.5)) + scale_fill_distiller(name = "Loss ($)", guide ="colorbar", palette = "Reds", direction = 1, na.value = "#dddddd", labels = comma, limits = c(500000, 100000000), oob=squish) + 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="Gambling losses by LGA in Victoria (2021 financial year)") ggplotly(p1, tooltip= c( "label", "fill")) %>% layout(title = list(text = paste0('Total gambling losses in Melbourne by Local Government Area (LGA)', '
', '', 'For current financial year (2021/22, up to April 2022)', ''))) %>% config(displayModeBar = FALSE) ``` *** **Key Points** - Brimbank in Melbourne's West and Casey and Dandenong in Melbourne's East have the highest total losses for this financial year. - Click and drag the cursor over the desired area to zoom in and double click to zoom out. **Notes** - Grey LGAs do not have pokies venues and therefore have no recorded data for losses. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Map of average gambling losses per adult for Victoria ```{r include=FALSE} vic.lga.shp <- rgdal::readOGR("vmlite_lga_cm/vmlite_lga_cm.shp") perperson <- read_excel("perperson.xlsx") perperson$lga_name <- perperson$lga_name %>% toupper() perperson$lga_name = str_replace(perperson$lga_name, 'RURAL CITY OF ', '') perperson$lga_name = str_replace(perperson$lga_name, 'CITY OF ', '') perperson$lga_name <- str_replace(perperson$lga_name, 'SHIRE OF ', '') perperson$lga_name <- str_replace(perperson$lga_name, '-', ' ') perperson$lga_name %>% head() lga.shp.f <- tidy(vic.lga.shp, region = "lga_name") head(lga.shp.f) # Step 4. Get the lga_name for merging purposes lga.shp.f$lga_name <-lga.shp.f$id head(lga.shp.f) head(lga.shp.f) # Step 5. Merge the two data sources merge.lga.profiles<-merge(lga.shp.f, perperson, by="lga_name", all.x=TRUE) #should keep all.x = TRUE head(merge.lga.profiles) #order data choro.data.frame<-merge.lga.profiles[order(merge.lga.profiles$order), ] ``` ```{r} p1 <- ggplot(data = choro.data.frame, aes(x = long, y = lat, group = group, label = lga_name, fill = `2018`)) p1 <- p1 + geom_polygon(color = "black", size = 0.25) + coord_map(xlim = c(144.25, 146.5), ylim = c(-40, -32.5)) + scale_fill_distiller(name = "Loss ($)", guide ="colorbar", palette = "Blues", direction = 1, na.value = "#dddddd", labels = comma, limits = c(0, 800), oob=squish) + 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="Gambling losses per adult by LGA in Victoria") ggplotly(p1, tooltip= c( "label", "fill")) %>% layout(title = list(text = paste0('Average gambling losses in Victoria per adult by Local Government Area (LGA)', '
', '', 'For 2020/21 financial year', ''))) %>% config(displayModeBar = FALSE) ``` *** **Key Points** - Latrobe and Central Goldfields have the highest average gambling losses per adult in regional Victoria. - Click and drag the cursor over the desired area to zoom in and double click to zoom out. **Notes** - Most recent per adult data for each LGA available is for the 2020/21 financial year. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Map of average gambling losses per adult for Melbourne ```{r} p1 <- ggplot(data = choro.data.frame, aes(x = long, y = lat, group = group, label = lga_name, fill = `2018`)) p1 <- p1 + geom_polygon(color = "black", size = 0.25) + coord_map(xlim = c(144.25, 145.5), ylim = c(-38.4, -37.5)) + scale_fill_distiller(name = "Loss per adult ($)", guide ="colorbar", palette = "Blues", direction = 1, na.value = "#dddddd", labels = comma, limits = c(0, 900), oob=squish) + 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="Gambling losses by LGA in Victoria per adult") ggplotly(p1, tooltip= c( "label", "fill")) %>% layout(title = list(text = paste0('Average gambling losses per adult in Melbourne by Local Government Area (LGA)', '
', '', 'For 2020/21 financial year', ''))) ``` *** **Key Points** - Greater Dandenong in Melbourne's East has the highest average gambling losses per adult followed by Brimbank in Melbourne's West. - Click and drag the cursor over the desired area to zoom in and double click to zoom out. **Notes** - Most recent per adult data for each LGA is for the 2020/21 financial year. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Where are the biggest losses? ```{r include=FALSE} play <- read_excel("~/Desktop/Assignment 3/playerandpop.xlsx", sheet = "Sheet1") #play play$`LGA Name` <- play$`LGA Name` %>% toupper() play$`LGA Name` = str_replace(play$`LGA Name`, 'RURAL CITY OF ', '') play$`LGA Name`= str_replace(play$`LGA Name`, 'CITY OF ', '') play$`LGA Name` = str_replace(play$`LGA Name`, 'SHIRE OF ', '') play$`LGA Name` = str_replace(play$`LGA Name`, 'BOROUGH OF ', '') play$`LGA Name` = str_replace(play$`LGA Name`, '-', ' ') play$`LGA Name` %>% head() ``` ```{r} now <- play %>% filter(Year == 2021) now$Region <- factor(now$Region) p <- ggplot(now, aes(x=`Loss per adult`, y=SEIFA, size=Population, label=`LGA Name`, fill=Region)) p <- p + geom_point(alpha=0.6) + labs(title = 'Gambling loss per person by SEIFA rating', subtitle = 'For 2020/21 financial year') + ylab('SEIFA score') + xlab('Loss per person ($)') + theme_bw() + geom_hline(yintercept = 1000, alpha=0.2) + xlim(c(0,575)) + scale_fill_manual(values=c("skyblue", "plum3")) + annotate("text", x = c(550, 550), y = c(1045,955), label = c('Advantaged', 'Disadvantaged'), size=2.5) g <- ggplotly(p, tooltip= c('label',"x", "y")) %>% config(displayModeBar = F) %>% layout(xaxis=list(fixedrange=TRUE)) %>% layout(yaxis=list(fixedrange=TRUE)) g <- g %>% layout(legend= list(itemsizing='constant')) g <- g %>% layout(legend= list(title=list(text=paste0('Population', '
','','Circle size', '', '
', '
', 'Region')))) g <- g %>% add_annotations( x= 550, y= 1040, xref = "x", yref = "y", text = "", showarrow = T, arrowsize=0.00004, ax = 0, ay = 50 ) %>% add_annotations( x= 550, y= 960, xref = "x", yref = "y", text = "", showarrow = T, arrowsize=0.00004, ax = 0, ay = -50 ) %>% layout(title = list(text = paste0('Average gambling loss per person by disadvantage in Local Government Area (LGA)', '
', '', 'For 2020/21 financial year', ''))) g$x$data[[4]]$hoverinfo <- 'none' g ``` *** **Key Points** - SEIFA stands for "Socio-Economic Indexes for Areas" and is the Australian Bureau of Statistics' way of measuring disadvantage and takes into account a number of factors. - The average SEIFA score is 1000. - A lower score means an area is relatively disadvantaged compared to an area with a higher score. - This graph suggests areas that are more disadvantaged tend to have higher gambling losses per person than areas that are more advantaged. **Notes** - Most recent per adult data for each LGA is for the 2020/21 financial year. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Where are the machines located? ```{r} now <- play %>% filter(Year == 2021) now$Region <- factor(now$Region) p <- ggplot(now, aes(x=Machines, y=SEIFA, size=Population, label=`LGA Name`, fill=Region)) p <- p + geom_point(alpha=0.6) + labs(title = 'Number of pokies machines by disadvantage in Local Government Area (LGA)', subtitle = 'For 2020/21 financial year') + ylab('SEIFA score') + xlab('Number of machines per 1000 population') + theme_bw() + geom_hline(yintercept = 1000, alpha=0.2) + xlim(c(0,13)) + scale_fill_manual(values=c("skyblue", "plum3")) + annotate("text", x = c(12,12), y = c(1045,955), label = c('Advantaged', 'Disadvantaged'), size=2.5) g <- ggplotly(p, tooltip= c('label',"x", "y")) %>% config(displayModeBar = F) %>% layout(xaxis=list(fixedrange=TRUE)) %>% layout(yaxis=list(fixedrange=TRUE)) g <- g %>% layout(legend= list(itemsizing='constant')) g <- g %>% layout(legend= list(title=list(text=paste0('Population', '
','','Circle size', '', '
', '
', 'Region')))) g <- g %>% add_annotations( x= 12, y= 1040, xref = "x", yref = "y", text = "", showarrow = T, arrowsize=0.00004, ax = 0, ay = 50 ) %>% add_annotations( x= 12, y= 960, xref = "x", yref = "y", text = "", showarrow = T, arrowsize=0.00004, ax = 0, ay = -50 ) %>% layout(title = list(text = paste0('Gambling loss per person by disadvantage in Local Government Area (LGA)', '
', '', 'For 2020/21 financial year', ''))) g$x$data[[4]]$hoverinfo <- 'none' g ``` *** **Key Points** - SEIFA stands for "Socio-Economic Indexes for Areas" and is the Australian Bureau of Statistics' way of measuring disadvantage and takes into account a number of factors. - The average SEIFA score is 1000. - A lower score means an area is relatively disadvantaged compared to an area with a higher score. - This graph suggests areas that are more disadvantaged tend to have more gambling machines per 1000 people than areas that are more advantaged. **Source** - Victorian Gambling and Casino Control Commission 2022. ### Conclusion and references **Conclusion** - More disadvantaged Victorians appear to be losing more on gambling in Victoria — but they also have more pokies machines close-by. **References** - Convery, S 2022,''Sobering reminder': Victorians lose record $251m to poker machines in a month', The Guardian, 26 February, viewed 5 June 2022, . - Miller, M 2022, 'In Australia, slot machines are everywhere. So is gambling addiction', The Washington Post, 26 April, viewed 5 June 2022, . - Victorian Gambling and Casino Control Commission 2022, Current gaming expenditure by LGA - monthly, Gaming expenditure by local area, data file, Victorian Government, viewed 28 May 2022, . - Victorian Gambling and Casino Control Commission 2022, Current LGA population density and gaming expenditure statistics, Population density and gaming expenditure, data file, Victorian Government, viewed 28 May 2022, . - Victorian Gambling and Casino Control Commission 2022, Historical LGA population density and gaming expenditure statistics , Population density and gaming expenditure, data file, Victorian Government, viewed 28 May 2022, . - Victorian Gambling and Casino Control Commission 2022, Historical yearly expenditure 2002-2020, Gaming expenditure by local area, data file, Victorian Government, viewed 28 May 2022, .