diff --git a/projekt.html b/projekt.html deleted file mode 100644 index a4d9a77..0000000 --- a/projekt.html +++ /dev/null @@ -1,499 +0,0 @@ - - - - - - - - - - - - - - - -Projekt Zaliczeniowy 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Data Fields

-
    -
  1. city - the name of the city where the property is -located
  2. -
  3. type - type of the building
  4. -
  5. squareMeters - the size of the apartment in square -meters
  6. -
  7. rooms - number of rooms in the apartment
  8. -
  9. floor / floorCount - the floor where the apartment is -located and the total number of floors in the building
  10. -
  11. buildYear - the year when the building was built
  12. -
  13. latitude, longitude - geo coordinate of -the property
  14. -
  15. centreDistance - distance from the city centre in -km
  16. -
  17. poiCount - number of points of interest in 500m range -from the apartment (schools, clinics, post offices, kindergartens, -restaurants, colleges, pharmacies)
  18. -
  19. [poiName]Distance - distance to the nearest point of -interest (schools, clinics, post offices, kindergartens, restaurants, -colleges, pharmacies)
  20. -
  21. ownership - the type of property ownership
  22. -
  23. condition - the condition of the apartment
  24. -
  25. has[features] - whether the property has key features -such as assigned parking space, balcony, elevator, security, storage -room
  26. -
  27. price - offer price in Polish Zloty -apartments_pl_YYYY_MM.csv: sale price apartments_rent_pl_YYYY_MM.csv: -monthly rent
  28. -
-
files <- list.files("rent", pattern = "\\.csv$", full.names = TRUE)
-files <- sort(files)
-
-df_list <- lapply(seq_along(files), function(i) {
-  d <- read.csv(files[i])
-  d$month_id <- i
-  d
-})
-
-rent <- do.call(rbind, df_list)
-
-has_cols <- grep("^has", names(rent), value = TRUE)
-
-rent[has_cols] <- lapply(rent[has_cols], function(x) {
-  tolower(x) == "yes"
-})
-
-rent_norm <- rent %>%
-  group_by(city) %>%
-  mutate(
-    latitude_n  = as.numeric(scale(latitude)),
-    longitude_n = as.numeric(scale(longitude)),
-    price_n = (price - min(price)) / (max(price) - min(price))
-  ) %>%
-  mutate() %>%
-  ungroup()
-
-
-

Ceny, heatmapy

-
ggplot(rent) + geom_point(aes(x=city, y=price, col=centreDistance), alpha=0.1, size=0.5) + scale_color_viridis_c()
-

-
ggplot(rent_norm) + geom_point(aes(x=longitude_n, y=latitude_n, col=log(price)), alpha=0.01, size=0.2) + facet_wrap(~ city) + scale_color_viridis_c()
-

-
ggplot(rent[rent$city=="warszawa", ]) + geom_point(aes(x=longitude, y=latitude, col=log(price)), alpha=0.1, size=0.1) + scale_color_viridis_c()
-

-
-
-

Czy ceny normalne?

-
prices_overall <- rent$price
-lillie.test(prices_overall)
-
## 
-##  Lilliefors (Kolmogorov-Smirnov) normality test
-## 
-## data:  prices_overall
-## D = 0.18915, p-value < 2.2e-16
-
prices_warsaw <- rent[rent$city=="bialystok", ]$price
-lillie.test(prices_warsaw)
-
## 
-##  Lilliefors (Kolmogorov-Smirnov) normality test
-## 
-## data:  prices_warsaw
-## D = 0.089354, p-value = 5.716e-09
-
prices_without_warsaw <- rent[rent$city!="warszawa", ]$price
-lillie.test(prices_without_warsaw)
-
## 
-##  Lilliefors (Kolmogorov-Smirnov) normality test
-## 
-## data:  prices_without_warsaw
-## D = 0.15724, p-value < 2.2e-16
-
- - - - -
- - - - - - - - - - - - - - - diff --git a/projekt.pdf b/projekt.pdf deleted file mode 100644 index e7ba1e7..0000000 Binary files a/projekt.pdf and /dev/null differ