Skip to content

Commit b422428

Browse files
committed
graphs
1 parent f599cdc commit b422428

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

graph_tax.R

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1+
library(cairoDevice)
2+
13
taxes <- read.csv("taxes.csv", header=TRUE)
24

3-
chicago_tax <- taxes[taxes$tax_type == "CHMR",]
5+
chicago_rate = c(rep(.01, 24), rep(.0125, 28))
6+
7+
chicago_tax <- taxes[taxes$tax_type == "HMR",]
8+
9+
chicago_total <- aggregate(chicago_tax$total,
10+
by=list(paste(chicago_tax$year,
11+
chicago_tax$quarter)),
12+
FUN=sum)
13+
14+
chicago_total <- ts(chicago_total$x, c(1999,3), c(2012,2), 4)
15+
chicago_total <- chicago_total/chicago_rate
16+
17+
18+
png('sales.png')
19+
plot(chicago_total/1000000000, ylab="Dollars, billions", main="Taxable Sales in Chicago")
20+
dev.off()
421

5-
chicago_total <- ts(chicago_tax$total, c(1999,3), c(2012,2), 4)
6-
chicago_payers <- ts(chicago_tax$number_taxpayers, c(1999,3), c(2012,2), )
22+
chicago_payers <- aggregate(chicago_tax$number_taxpayers,
23+
by=list(paste(chicago_tax$year,
24+
chicago_tax$quarter)),
25+
FUN=sum)
726

8-
plot(chicago_total/1000000, ylab="Dollars, millions", main="Chicago Home Rule Revenue by Quarter")
27+
chicago_payers <- ts(chicago_payers$x, c(1999,3), c(2012,2), 4)
928

29+
png('retailers.png')
30+
plot(chicago_payers, main="Retailers in Chicago")
31+
dev.off()

retailers.png

14.1 KB
Loading

sales.png

16.4 KB
Loading

0 commit comments

Comments
 (0)