August 14, 2024

Introduction

Welcome to the presentation on Household Expenditure Statistics. In this project, we analyze and visualize household expenditure data from New Zealand to understand distribution patterns across different tables and HEC codes.

Data Preprocessing

Before creating the plot, we performed data preprocessing, including filtering, removing NA values, and ensuring that relevant columns are correctly formatted. Here’s a brief overview of the data:

## 'data.frame':    41 obs. of  10 variables:
##  $ Table   : Factor w/ 4 levels "T1","T2","T3",..: 1 1 1 2 2 2 2 2 2 3 ...
##  $ Year    : chr  "2019" "2023" "D001" "2023" ...
##  $ MsCode  : chr  "M001" "M001" "M001" "M001" ...
##  $ CatCode : chr  "C000A" "C000A" "C000A" "C001A" ...
##  $ HECCode : chr  "04" "04" "04" "04" ...
##  $ Estimate: num  344.5 398 15.5 467.8 457 ...
##  $ RSE     : num  4.8 4.3 8 7.1 13.6 6.4 16.2 13.2 4.3 60.7 ...
##  $ LowerCIB: num  327.9 380.8 7.5 434.5 394.7 ...
##  $ UpperCIB: num  361.2 415.2 23.5 501.2 519.3 ...
##  $ Flag    : chr  " " " " " " " " ...

Visualization

Here we visualize the distribution of household expenditure using a boxplot. The plot below shows the expenditure distribution across different tables and HEC codes.

plotly_plot <- ggplotly(plot)
plotly_plot

Conclusion

Thank you for viewing my presentation.