knitr::opts_chunk$set(
echo = FALSE,
warning = FALSE,
message = FALSE
)
## # A tibble: 84 × 17
## LinkComponent_anchor__JMkHs h…¹ Picture_fade__p2mMD …² LazyPicturestyles__S…³
## <chr> <chr> <chr>
## 1 https://www.realtor.com/rental… https://ap.rdcpix.com… https://ap.rdcpix.com…
## 2 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 3 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 4 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 5 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 6 https://www.realtor.com/rental… https://ap.rdcpix.com… https://ap.rdcpix.com…
## 7 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 8 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 9 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## 10 https://www.realtor.com/rental… <NA> https://ap.rdcpix.com…
## # ℹ 74 more rows
## # ℹ abbreviated names: ¹`LinkComponent_anchor__JMkHs href`,
## # ²`Picture_fade__p2mMD src`,
## # ³`LazyPicturestyles__StyledLazyPicture-rui__sc-1c3xalg-0 src`
## # ℹ 14 more variables:
## # `VisuallyHiddenstyles__StyledVisuallyHidden-rui__sc-1ohi4lq-0` <chr>,
## # `VisuallyHiddenstyles__StyledVisuallyHidden-rui__sc-1ohi4lq-0 2` <chr>, …
## listing_url property_type rent bedrooms bathrooms
## 0 0 0 0 2
## sqft pets pet_status address zip_code
## 0 15 15 0 0
## [1] "OK" NA
## [1] "Pets" "Dogs" NA
## # A tibble: 84 × 9
## listing_url property_type rent bedrooms bathrooms sqft pet_status address
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 https://www.… For Rent - H… 2255 4 2 1833 1 991 SW…
## 2 https://www.… For Rent - H… 2220 4 2 1833 1 1426 S…
## 3 https://www.… For Rent - H… 2685 4 2 1809 1 1671 S…
## 4 https://www.… For Rent - H… 2545 4 2 1820 1 857 SW…
## 5 https://www.… For Rent - H… 2515 4 2 1809 1 438 SE…
## 6 https://www.… For Rent - H… 2695 4 2 1908 1 3597 S…
## 7 https://www.… For Rent - H… 2840 4 2 1833 1 1692 S…
## 8 https://www.… For Rent - H… 2495 4 2 1809 1 317 SE…
## 9 https://www.… For Rent - H… 2820 4 2 1809 1 379 NW…
## 10 https://www.… For Rent - H… 2699 4 2 2236 1 3833 S…
## # ℹ 74 more rows
## # ℹ 1 more variable: zip_code <chr>
## # A tibble: 2 × 10
## listing_url property_type rent bedrooms bathrooms sqft pet_status address
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 https://www.r… For Rent - H… 12500 4 NA 4457 1 166 SE…
## 2 https://www.r… For Rent - H… 8800 5 5 4284 1 527 SE…
## # ℹ 2 more variables: zip_code <chr>, rent_zscore <dbl>
## # A tibble: 0 × 10
## # ℹ 10 variables: listing_url <chr>, property_type <chr>, rent <dbl>,
## # bedrooms <dbl>, bathrooms <dbl>, sqft <dbl>, pet_status <dbl>,
## # address <chr>, zip_code <chr>, rent_zscore <dbl>
| Metric | Value |
|---|---|
| Listings | 82.000000 |
| Average Rent | 3228.426829 |
| Median Rent | 2920.000000 |
| Average Sq Ft | 2270.707317 |
| Average Bedrooms | 4.121951 |
| Average Bathrooms | 2.425926 |
## # A tibble: 6 × 6
## zip_code listings average_rent median_rent min_rent max_rent
## <chr> <int> <dbl> <dbl> <dbl> <dbl>
## 1 34984 2 4498. 4498. 2495 6500
## 2 34986 5 4020 4000 3100 5500
## 3 34952 2 3775 3775 3300 4250
## 4 34987 33 3653. 3400 2685 7500
## 5 34983 12 2820. 2692. 2495 4250
## 6 34953 28 2633. 2680 2220 3500
## # A tibble: 6 × 6
## zip_code listings average_sqft median_sqft min_sqft max_sqft
## <chr> <int> <dbl> <dbl> <dbl> <dbl>
## 1 34952 2 3086. 3086. 2296 3877
## 2 34986 5 2899 2898 2054 3628
## 3 34987 33 2530. 2399 1809 4202
## 4 34984 2 2277 2277 1809 2745
## 5 34953 28 1956. 1833 1596 3200
## 6 34983 12 1894. 1828 1791 2342
## # A tibble: 6 × 4
## zip_code listings avg_rent_per_sqft median_rent_per_sqft
## <chr> <int> <dbl> <dbl>
## 1 34984 2 1.87 1.87
## 2 34983 12 1.49 1.46
## 3 34987 33 1.46 1.45
## 4 34986 5 1.43 1.41
## 5 34953 28 1.37 1.37
## 6 34952 2 1.35 1.35
## [1] 0.7199606
71% Correlation between rent and square footage.
##
## Call:
## lm(formula = rent ~ sqft + bedrooms + bathrooms + factor(zip_code),
## data = HouseData2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1558.37 -279.03 -22.29 198.89 1558.37
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1882.5969 774.5267 2.431 0.01756 *
## sqft 0.4504 0.1958 2.300 0.02436 *
## bedrooms -224.4579 195.5030 -1.148 0.25473
## bathrooms 466.6921 172.0893 2.712 0.00836 **
## factor(zip_code)34953 -224.7015 423.3981 -0.531 0.59725
## factor(zip_code)34983 28.7063 442.5219 0.065 0.94846
## factor(zip_code)34984 1320.4446 547.4812 2.412 0.01842 *
## factor(zip_code)34986 421.0107 450.6228 0.934 0.35328
## factor(zip_code)34987 221.4597 407.3323 0.544 0.58834
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 534.6 on 72 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.6321, Adjusted R-squared: 0.5912
## F-statistic: 15.46 on 8 and 72 DF, p-value: 5.635e-13
Forumla: Rent = Intercept + SqFT + Bathrooms + ZIP Adjustemnt
Example: Rent = $1882.59 + (your square footage * $0.45)sqft + (your # of Bathrooms * $466.69)
Hypotheses are:
H₀: Average rent is the same across all ZIP codes.
H₁: At least one ZIP code has a different average rent.
If the ANOVA gives:
Pr(>F) < 0.05
Then reject H₀ and conclude that average asking rent differs significantly among at least some Port St. Lucie ZIP codes.
## Df Sum Sq Mean Sq F value Pr(>F)
## factor(zip_code) 5 24828547 4965709 7.612 7.67e-06 ***
## Residuals 76 49580469 652375
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = rent ~ factor(zip_code), data = HouseData2)
##
## $`factor(zip_code)`
## diff lwr upr p adj
## 34953-34952 -1142.2500 -2870.65740 586.1574 0.3910049
## 34983-34952 -955.4167 -2759.00701 848.1737 0.6342141
## 34984-34952 722.5000 -1638.95407 3083.9541 0.9466986
## 34986-34952 245.0000 -1730.73423 2220.7342 0.9991479
## 34987-34952 -122.4545 -1842.11046 1597.2014 0.9999440
## 34983-34953 186.8333 -627.94573 1001.6124 0.9846632
## 34984-34953 1864.7500 136.34260 3593.1574 0.0269172
## 34986-34953 1387.2500 240.75423 2533.7458 0.0087378
## 34987-34953 1019.7955 413.04734 1626.5436 0.0000718
## 34984-34983 1677.9167 -125.67367 3481.5070 0.0830116
## 34986-34983 1200.4167 -56.56325 2457.3966 0.0696800
## 34987-34983 832.9621 36.91611 1629.0081 0.0349372
## 34986-34984 -477.5000 -2453.23423 1498.2342 0.9806085
## 34987-34984 -844.9545 -2564.61046 874.7014 0.7047945
## 34987-34986 -367.4545 -1500.71395 765.8049 0.9324906
34984-34983 $1677.9167 -125.67367 3481.5070 0.0830116 34986-34983 $1200.4167 -56.56325 2457.3966 0.0696800 34987-34983 $832.9621 36.91611 1629.0081 0.0349372
## [1] 12
## # A tibble: 1 × 7
## listings avg_rent median_rent avg_sqft avg_bathrooms min_rent max_rent
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 12 2820. 2692. 1894. 2.04 2495 4250
## # A tibble: 1 × 3
## total_listings listings_3600_plus percent_3600_plus
## <int> <int> <dbl>
## 1 12 1 8.33
## # A tibble: 1 × 7
## address rent sqft bedrooms bathrooms rent_per_sqft listing_url
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 302 NE Greenbrier Ave 4250 2093 4 2 2.03 https://ww…
https://www.realtor.com/rentals/details/302-NE-Greenbrier-Ave_Port-St-Lucie_FL_34983_M50864-62584