West Roxbury Community Skyline
include = FALSE prevents code and results from appearing in the finished file. R Markdown still runs the code in the chunk, and the results can be used by other chunks.echo = FALSE prevents code, but not the results from appearing in the finished file. This is a useful way to embed figures.message = FALSE prevents messages that are generated by code from appearing in the finished file.warning = FALSE prevents warnings that are generated by code from appearing in the finished.fig.cap = "..." adds a caption to graphical results.# Read the data
df <- read.csv("data/WestRoxbury.csv")
t(t(names(df))) ##display column names in a user friendly manner
## [,1]
## [1,] "TOTAL.VALUE"
## [2,] "TAX"
## [3,] "LOT.SQFT"
## [4,] "YR.BUILT"
## [5,] "GROSS.AREA"
## [6,] "LIVING.AREA"
## [7,] "FLOORS"
## [8,] "ROOMS"
## [9,] "BEDROOMS"
## [10,] "FULL.BATH"
## [11,] "HALF.BATH"
## [12,] "KITCHEN"
## [13,] "FIREPLACE"
## [14,] "REMODEL"
names(df)[3]<- "LOT.SIZE" #change the column name if so desired
names(df) <- tolower(names(df)) #change to lowercase if so desired
dim(df) #Show the number of rows and columns
## [1] 5802 14
head(df, n = 3)
## total.value tax lot.size yr.built gross.area living.area floors rooms
## 1 344.2 4330 9965 1880 2436 1352 2 6
## 2 412.6 5190 6590 1945 3108 1976 2 10
## 3 330.1 4152 7500 1890 2294 1371 2 8
## bedrooms full.bath half.bath kitchen fireplace remodel
## 1 3 1 1 1 0 None
## 2 4 2 1 1 0 Recent
## 3 4 1 1 1 0 None
Fig. 1.1
Fig. 1.2
## <ScaleContinuousPosition>
## Range:
## Limits: 0 -- 1
Fig. 1.3
Fig. 1.4
Fig. 1.5
## floors
## remodel 1 1.5 2 2.5 3
## None 1246 560 2490 48 2
## Old 112 89 361 18 1
## Recent 147 124 564 39 1