Skip to content

Commit

Permalink
Tweak distr-by-decile; add pptx
Browse files Browse the repository at this point in the history
  • Loading branch information
HughParsonage committed Jan 29, 2019
1 parent 73bb934 commit c12e404
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 23 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified CGT-NG-atlas/NG-PG-by-age-1.pdf
Binary file not shown.
Binary file added CGT-NG-atlas/NG-vs-salary.pptx
Binary file not shown.
Binary file modified CGT-NG-atlas/PP-losers-salary-comparison-horiz-bar-1.pdf
Binary file not shown.
Binary file modified CGT-NG-atlas/Proportions-PP-losses-1.pdf
Binary file not shown.
Binary file removed CGT-NG-atlas/stacked-column-chart-1.pdf
Binary file not shown.
Binary file removed CGT-NG-atlas/stacked-column-chart-1.png
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions CGT_and_neg_gearing_parent-CHUNKTIMINGS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
0.0 Import-HILDA-all-waves-step-1
0.0 surya
0.4 surya-low-returns
2.0 NG-PG-by-age
1.5 PP-losers-salary-comparison-horiz-bar
0.9 Proportions-PP-losses
3.6 Distribution-taxes-income-vs-taxable-income-decile
1.1 PP-losers-salary-comparison-horiz-bar
0.8 Proportions-PP-losses
34 changes: 18 additions & 16 deletions CGT_and_neg_gearing_parent.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -2779,7 +2779,7 @@ Second, reducing the discount might not lead to much greater investment in owner



<<stacked-column-chart, fig.width = 22, out.width = "22in">>=
<<Distribution-taxes-income-vs-taxable-income-decile, fig.width = 2.2*fig_width, out.width=paste0(2.2*out_width), fig.height=1.2*fig_height, out.height=paste0(1.2*out_height, "in")>>=
new_lines_adder = function(x, interval) {
#add spaces after /
x = stringr::str_replace_all(x, "/", "/ ")
Expand Down Expand Up @@ -2820,14 +2820,15 @@ pDecile <-
group_by(Taxable_Income_decile = ntile(Taxable_Income, 10)) %>%
summarise(`No. Taxpayers` = n() * 50,
`Salary` = 50 * sum(as.numeric(Sw_amt)),
`Income tax (excl CGT)` = sum(income_tax(pmaxC(Taxable_Income - Net_CG_amt, 0), latest.sample.fy)),
`Income tax\n(excl CGT)` = sum(income_tax(pmaxC(Taxable_Income - Net_CG_amt, 0),
latest.sample.fy)),
`Capital gains` = sum(Net_CG_amt) * 50,
`Capital gains tax` = sum(income_tax(Taxable_Income, latest.sample.fy) - income_tax(pmaxC(Taxable_Income - Net_CG_amt, 0), latest.sample.fy))) %>%
CGT = sum(income_tax(Taxable_Income, latest.sample.fy) - income_tax(pmaxC(Taxable_Income - Net_CG_amt, 0), latest.sample.fy))) %>%
gather(type, value, -Taxable_Income_decile) %>%
mutate(type = factor(type, levels = unique(.$type), ordered = TRUE)) %>%
arrange(type, Taxable_Income_decile) %>%
grplot(aes(x = type, y = value, fill = factor(Taxable_Income_decile, levels = 10:1))) +
geom_bar(stat = "identity", position = "fill", width = 0.8) +
geom_bar(stat = "identity", position = "fill", width = 0.8, color = "white") +
scale_fill_manual(values = gpalx(10)) +
scale_y_continuous(label = percent, breaks = (0:10)/10) +
scale_x_discrete(labels = newliner, expand = c(0,0)) +
Expand All @@ -2841,29 +2842,30 @@ pDecile_no_CG <-
group_by(Taxable_Income_decile = ntile(Taxable_Income - Net_CG_amt, 10)) %>%
summarise(`No. Taxpayers` = n() * 50,
`Salary` = 50 * sum(as.numeric(Sw_amt)),
`Income tax (excl CGT)` = sum(income_tax(pmax0(Taxable_Income - Net_CG_amt), latest.sample.fy)),
`Income tax\n(excl CGT)` = sum(income_tax(pmax0(Taxable_Income - Net_CG_amt),
latest.sample.fy)),
`Capital gains` = sum(Net_CG_amt) * 50,
`Capital gains tax` = sum(income_tax(Taxable_Income, latest.sample.fy) - income_tax(pmax0(Taxable_Income - Net_CG_amt), latest.sample.fy))) %>%
CGT = sum(income_tax(Taxable_Income, latest.sample.fy) - income_tax(pmax0(Taxable_Income - Net_CG_amt), latest.sample.fy))) %>%
gather(type, value, -Taxable_Income_decile) %>%
mutate(type = factor(type, levels = unique(.$type), ordered = TRUE)) %>%
arrange(type, Taxable_Income_decile) %>%
grplot(aes(x = type, y = value, fill = factor(Taxable_Income_decile, levels = 10:1))) +
geom_bar(stat = "identity", position = "fill", width = 0.8) +
geom_bar(stat = "identity", position = "fill", width = 0.8,
color = "white") +
scale_fill_manual(values = gpalx(10)) +
scale_y_continuous(label = percent, breaks = (0:10)/10) +
scale_x_discrete(labels = newliner, expand = c(0,0)) +
scale_y_continuous(label = percent, breaks = (0:10)/10, position = "right") +
scale_x_discrete(labels = newliner, expand = c(0, 0)) +
facet_grid(~"Without CG") +
theme(strip.background = element_rect(fill=theGrey),
theme(strip.background = element_rect(fill = theGrey),
strip.text = element_text(face = "bold", color = "white"),
axis.title.x = element_blank(),
axis.text.x = element_text())
grid.arrange(pDecile, pDecile_no_CG, ncol = 2)
grid.arrange(pDecile, pDecile_no_CG, ncol = 2, clip = "off")
@
\begin{figure*}
\Caption{}{Distribution of taxes and income by taxable income decile}{fig:DecileStackedChart}
\includegraphics[width = \textwidth]{\Sexpr{atlas}/stacked-column-chart-1}
\the\textwidth
\includegraphics[width = \textwidth]{\Sexpr{atlas}/Distribution-taxes-income-vs-taxable-income-decile-1}
\end{figure*}

\chapter{Negative gearing}
Expand Down Expand Up @@ -3095,8 +3097,8 @@ prop_investors_over60_NG <-
@

\begin{figure}[p]
\Caption{More people negatively gear property investments in their peak earning years}{Percentage of \Sexpr{latest.sample.fy} taxpayers with }{fig:NG-PG-by-age}
<<NG-PG-by-age, fig.width=1.15*fig_width, out.width=paste0(1.15*out_width, "in"), fig.height=1.3*fig_height, out.height=paste0(1.3*out_height, "in")>>=
\Caption{More people negatively gear property investments in their peak earning years}{Percentage of \Sexpr{latest.sample.fy} taxpayers who are\dots{} }{fig:NG-PG-by-age}
<<NG-PG-by-age, fig.width=1.15*fig_width, out.width=paste0(1.15*out_width, "in"), fig.height=1.1*fig_height, out.height=paste0(1.1*out_height, "in")>>=
sample_file %>%
# filter(Gross_rent_amt > 0) %>%
group_by(age_range_description) %>%
Expand Down Expand Up @@ -3125,7 +3127,7 @@ sample_file %>%
stacked_bar_with_right_labels(x_continuous = TRUE,
scale_y_args = list(label = function(x) paste0(round(100 * x), "%"),
expand = c(0, 0)),
nudge_right = 5,
nudge_right = 5, # since ages are in 5-year grps
nudge_up = 0.01,
scale_x_args = list(name = "Age",
breaks = c(30, 50, 70)),
Expand Down
5 changes: 2 additions & 3 deletions CGT_and_neg_gearing_parent.tex
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,7 @@ \subsection{Distortion of investment choices}

\begin{figure*}
\Caption{}{Distribution of taxes and income by taxable income decile}{fig:DecileStackedChart}
\includegraphics[width = \textwidth]{CGT-NG-atlas//stacked-column-chart-1}
\the\textwidth
\includegraphics[width = \textwidth]{CGT-NG-atlas//Distribution-taxes-income-vs-taxable-income-decile-1}
\end{figure*}

\chapter{Negative gearing}
Expand Down Expand Up @@ -627,7 +626,7 @@ \section{Negative gearing provides a tax shelter against


\begin{figure}[p]
\Caption{More people negatively gear property investments in their peak earning years}{Percentage of 2015-16 taxpayers with }{fig:NG-PG-by-age}
\Caption{More people negatively gear property investments in their peak earning years}{Percentage of 2015-16 taxpayers who are\dots{} }{fig:NG-PG-by-age}

\includegraphics[width=1.225\columnwidth]{CGT-NG-atlas//NG-PG-by-age-1}
\source{2015-16 sample file.}
Expand Down
2 changes: 1 addition & 1 deletion memory-usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
0.0 Import-HILDA-all-waves-step-1
0.0 surya
0.0 surya-low-returns
0.3 NG-PG-by-age
0.5 Distribution-taxes-income-vs-taxable-income-decile
0.1 PP-losers-salary-comparison-horiz-bar
0.1 Proportions-PP-losses

0 comments on commit c12e404

Please sign in to comment.