Différents filtres
library(readr)
library(dplyr)
library(ggplot2)
library(scales)
athome <- read_csv( 'data/athome.csv')
Vente
vente <- athome %>%
filter(quartier %in% c('Limpertsberg', 'Belair', 'Bonnevoie','Kirchberg') &
type_annonce=='vente')
graph_vente <- ggplot(vente)+
geom_point(aes(x=surface, y=prix, color=quartier)) +
scale_y_continuous(labels = label_number(suffix = " K", scale = 1e-3)) +
ggtitle("Vente d'appartements en Ville par\n rapport à la surface au 1er Juin 2020") +
labs(fill = "Quartiers") +
xlab("Surface (m²)") +
ylab("Prix de vente (€)") +
theme_minimal()
tab_vente <- reactable(vente,
height = 400)
bscols(widths= c(6,6),
ggplotly(graph_vente,
height = 400) %>% config(displayModeBar=FALSE),
tab_vente)
Location
location <- athome %>%
filter(quartier %in% c('Limpertsberg', 'Belair', 'Bonnevoie','Kirchberg') &
type_annonce=='location')
graph_location <- ggplot(location)+
geom_point(aes(x=surface, y=prix, color=quartier)) +
scale_y_continuous(labels = label_number(suffix = " K", scale = 1e-3)) +
ggtitle("Vente d'appartements en Ville par\n rapport à la surface au 1er Juin 2020") +
labs(fill = "Quartiers") +
xlab("Surface (m²)") +
ylab("Prix de location (€)") +
theme_minimal()
tab_location <- reactable(location)
bscols(widths= c(6,6),
ggplotly(graph_location) %>% config(displayModeBar=FALSE),
tab_location)