4 city graphs

This commit is contained in:
2026-04-29 22:24:18 +02:00
parent 5959cfbc75
commit c6095a7990
3 changed files with 14 additions and 3 deletions

No files matched your search

+8 -2
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.
+6 -1
View File
@@ -4,6 +4,7 @@ author: "Michał Hiszpański, Nikola Kubiczek, Adrian Mirecki"
date: "2026-04-29"
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
@@ -50,6 +51,8 @@ rent[has_cols] <- lapply(rent[has_cols], function(x) {
})
summary(rent)
ggplot(rent) + geom_point(aes(x=city, y=price, col=centreDistance), alpha=0.1, size=0.5) + scale_color_viridis_c()
rent_norm <- rent %>%
group_by(city) %>%
mutate(
@@ -63,7 +66,9 @@ rent_norm <- rent %>%
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()
ggplot(rent[rent$city=="krakow", ]) + geom_point(aes(x=longitude, y=latitude, col=log(price)), alpha=0.1, size=0.5) + scale_color_viridis_c()
ggplot(rent[rent$city=="gdansk", ]) + geom_point(aes(x=longitude, y=latitude, col=log(price)), alpha=0.1, size=0.5) + scale_color_viridis_c()
ggplot(rent[rent$city=="wroclaw", ]) + geom_point(aes(x=longitude, y=latitude, col=log(price)), alpha=0.1, size=0.5) + scale_color_viridis_c()
ggplot(rent[rent$city=="poznan", ]) + geom_point(aes(x=longitude, y=latitude, col=log(price)), alpha=0.1, size=0.5) + scale_color_viridis_c()
ggplot(rent, aes(x = rooms)) +
geom_histogram(aes(y = after_stat(density)), binwidth = 1, fill = "steelblue", color = "white") +