Evolutions
Globales

Row

janv. 2020


Note explicative :

Les chiffres publiés dans ce document sont élaborés à partir de résultats issus de la base de données Sit@del2. Celle-ci rassemble les informations relatives aux autorisations de construire (permis délivrés) et aux mises en chantier transmises par les services instructeurs au Ministère de la Transition Écologique et Solidaire. Ils sont exprimés en date de prise en compte, c’est-à-dire à la date à laquelle l’événement (autorisation, ouverture de chantier, etc.) est enregistré dans la base de données Sit@del2.


Définitions :

En 2015, les publications conjoncturelles sur la construction de logements ont évolué. De nouveaux indicateurs visant à retracer les autorisations et les mises en chantier à leur date réelle sont diffusés. Ces nouvelles séries améliorent le diagnostic conjoncturel produit à partir de la base Sit@del2, en corrigeant notamment les défauts de collecte. Elles distinguent les logements individuels (purs et groupés) et les logements collectifs et en résidence. Les logements en résidence (pour personnes âgées, pour étudiants, pour touristes, etc.) se caractérisent par la fourniture de services individualisés (de loisirs, de restauration, de soins ou autres) en sus du gîte. Les foyers et les hôtels qui ne comportent que des chambres et des services communs ne sont pas classés dans les logements mais dans les locaux d’hébergement. Les estimations de la France entière n’intègrent pas le territoire de Mayotte.

Row

Nombre de logements cumulé sur 12 mois en Hauts-de-France

Nombre de logements cumulé sur 3 mois en Hauts-de-France

Row

Nombre de logements cumulé sur 12 mois en France

Nombre de logements cumulé sur 3 mois en France

Evolutions par type
Logements Autorisés

Row


LOGEMENTS AUTORISÉS


Les taux d’évolution représentés dans les graphiques rapportent le cumul des douze derniers mois à celui des douze mois précédents.

Row

évolution en Hauts-de-France

évolution département de l’Aisne

évolution département du Nord

Row

évolution département de l’Oise

évolution département du Pas-de-Calais

évolution département de la Somme

Evolutions par type
Logements Commencés

Row


LOGEMENTS COMMENCÉS


Les taux d’évolution représentés dans les graphiques rapportent le cumul des douze derniers mois à celui des douze mois précédents.

Row

évolution en Hauts-de-France

évolution département de l’Aisne

évolution département du Nord

Row

évolution département de l’Oise

évolution département du Pas-de-Calais

évolution département de la Somme

Volumes par type
Logements Autorisés

Row


LOGEMENTS AUTORISÉS


Les volumes rapportés dans les graphiques représentent le cumul des douze derniers mois.

Row

volumes en Hauts-de-France

volumes département de l’Aisne

volumes département du Nord

Row

volumes département de l’Oise

volumes département du Pas-de-Calais

volumes département de la Somme

Volumes par type
Logements Commencés

Row


LOGEMENTS COMMENCÉS


Les volumes rapportés dans les graphiques représentent le cumul des douze derniers mois.

Row

volumes en Hauts-de-France

volumes département de l’Aisne

volumes département du Nord

Row

volumes département de l’Oise

volumes département du Pas-de-Calais

volumes département de la Somme

Tableau
Logements Autorisés

Row


\(^{(1)}\) Nombres de logements autorisés à la fin janv. 2020
\(^{(2)}\) Trois derniers mois par rapport aux trois mêmes mois de l’année précédente
\(^{(3)}\) Douze derniers mois par rapport aux douze mois précédents



Avertissement : Dans les tableaux, en raison des arrondis, des totaux peuvent légèrement différer de la somme des éléments qui les composent.

Row

Hauts-de-France \(^{(3)}\)

Ces jauges représentent le taux d’évolution entre le volume total cumulé des douze derniers mois, rapporté à celui des douze mois précédents.

Aisne \(^{(3)}\)
Nord \(^{(3)}\)
Oise \(^{(3)}\)
Pas-de-Calais \(^{(3)}\)
Somme \(^{(3)}\)

LOGEMENTS AUTORISÉS

Tableau
Logements Commencés

Row


\(^{(1)}\) Nombres de logements commencés à la fin janv. 2020
\(^{(2)}\) Trois derniers mois par rapport aux trois mêmes mois de l’année précédente
\(^{(3)}\) Douze derniers mois par rapport aux douze mois précédents



Avertissement : Dans les tableaux, en raison des arrondis, des totaux peuvent légèrement différer de la somme des éléments qui les composent.

Row

Hauts-de-France \(^{(3)}\)

Ces jauges représentent le taux d’évolution entre le volume total cumulé des douze derniers mois, rapporté à celui des douze mois précédents.

Aisne \(^{(3)}\)
Nord \(^{(3)}\)
Oise \(^{(3)}\)
Pas-de-Calais \(^{(3)}\)
Somme \(^{(3)}\)

LOGEMENTS COMMENCÉS

Cartes
France

Column


LOGEMENTS AUTORISÉS 
  FRANCE
  Résultats à fin janv. 2020
Les cercles opaques représentent le volume total cumulé des logements
autorisés
sur les douze derniers mois. Les évolutions désignent le rapport entre le volume total cumulé des douze derniers mois et celui des douze mois précédents

Column

Column


LOGEMENTS COMMENCÉS 
  FRANCE
  Résultats à fin janv. 2020
Les cercles opaques représentent le volume total cumulé des logements
commencés
sur les douze derniers mois. Les évolutions désignent le rapport entre le volume total cumulé des douze derniers mois et celui des douze mois précédents

Column

Cartes
Hauts-de-France

Row

Row

LOGEMENTS AUTORISÉS 
  HAUTS-de-FRANCE par EPCI
  Résultats à fin janv. 2020
évolution : douze derniers mois par rapport aux douze mois précédents

LOGEMENTS COMMENCÉS 
  HAUTS-de-FRANCE par EPCI
  Résultats à fin janv. 2020
évolution : douze derniers mois par rapport aux douze mois précédents

Row

---
title: "HAUTS-de-FRANCE"
author:    |
 Construction neuve de logements
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
    logo: "P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif/Image_marianne_REG2.png"
    source_code: embed
---
   
```{r setup,include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)

# valeurs à remplacer pour la prochaine publication (par Ctrl+f - All) : 202001 par mois suivant
# copier/coller le fichier "ROES_202001.xls" du mois concerné dans le répertoire indiqué ligne 41
# rapatrier dans ce même répertoire le fichier mis à jour "Sit@del2_log_mens_EPCI.xls" extrait de GéoKit3 (pour cartes EPCI).  Il se trouve dans l'univers "GéoKit3" sous Dossiers/dossiers publics/GéoKit3/Région Hauts-de-France/Dossiers/Publications

library(flexdashboard)
library(XLConnect)
library(tidyverse)
library(dplyr)
library(tidyr)
library(RcppRoll)
library(dygraphs)
library(xts)
library(zoo)
library(DT)
library(questionr)

setwd("P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif")
```

```{r donnees_graphes_tableaux,echo=F}
# LOGEMENTS AUTORISES ----

hdf_AUT <- readWorksheetFromFile("ROES_202001.xls",sheet="AUT_NEW_REG") %>% 
  rename(code=reg,zone=nom_REG) %>% filter(code==32)
national_AUT <- readWorksheetFromFile("ROES_202001.xls",sheet="AUT_FR") %>% mutate(code="000",zone="national",
                                                colres_AUT=col_AUT+res_AUT)
national_AUT <- national_AUT[c(1,7,8,2:4,9)]
dept_AUT <- readWorksheetFromFile("ROES_202001.xls",sheet="AUT_DPT") %>%  rename(code=dpt) %>% 
  filter(code %in% c("002","059","060","062","080")) %>% mutate(zone=case_when(code=="002"~"Aisne",
                                                                                code=="059"~"Nord",
                                                                                code=="060"~"Oise",
                                                                                code=="062"~"Pas-de-Calais",
                                                                                code=="080"~"Somme",T~"nc"))
dept_AUT <- dept_AUT[c(1,2,7,3:6)]
AUT <- rbind(national_AUT,hdf_AUT,dept_AUT)
AUT$date <- as.character(AUT$date)
AUT$date <- zoo::as.yearmon(AUT$date, "%Y%m")
rm(list=ls(pattern=".*_AUT.*"))

# Cumul et variations 3 et 12 mois
CUM_3_AUT <-  AUT %>% mutate_if (is.numeric, funs (cumul3 = roll_sumr (., n = 3))) %>%
  mutate_at (vars (ends_with ("cumul3")), funs (evo_3 = 100 * . / lag (., 12) - 100))
CUM_12_AUT <- AUT %>% mutate_if (is.numeric, funs (cumul12 = roll_sumr (., n = 12))) %>%
  mutate_at (vars (ends_with ("cumul12")), funs (evo_12 = 100 * . / lag (., 12) - 100))
AUT <- cbind(AUT,CUM_3_AUT,CUM_12_AUT)
AUT <- AUT[-c(8:14,23:29)]

# LOGEMENTS COMMENCES ----

hdf_COM <- readWorksheetFromFile("ROES_202001.xls",sheet="COM_NEW_REG") %>% 
  rename(code=REG,zone=nom_REG) %>% filter(code==32)
national_COM <- readWorksheetFromFile("ROES_202001.xls",sheet="COM_FR") %>% mutate(code="000",zone="national",
                                                colres_COM=col_COM+res_COM)
national_COM <- national_COM[c(1,7,8,2:4,9)]
dept_COM <- readWorksheetFromFile("ROES_202001.xls",sheet="COM_DPT") %>%  rename(code=dpt) %>% 
  filter(code %in% c("002","059","060","062","080")) %>% mutate(zone=case_when(code=="002"~"Aisne",
                                                                                code=="059"~"Nord",
                                                                                code=="060"~"Oise",
                                                                                code=="062"~"Pas-de-Calais",
                                                                                code=="080"~"Somme",T~"nc"))
dept_COM <- dept_COM[c(1,2,7,3:6)]
COM <- rbind(national_COM,hdf_COM,dept_COM)
COM$date <- as.character(COM$date)
COM$date <- zoo::as.yearmon(COM$date, "%Y%m")
rm(list=ls(pattern=".*_COM.*"))

# Cumul et variations 3 et 12 mois
CUM_3_COM <-  COM %>% mutate_if (is.numeric, funs (cumul3 = roll_sumr (., n = 3))) %>%
  mutate_at (vars (ends_with ("cumul3")), funs (evo_3 = 100 * . / lag (., 12) - 100))
CUM_12_COM <- COM %>% mutate_if (is.numeric, funs (cumul12 = roll_sumr (., n = 12))) %>%
  mutate_at (vars (ends_with ("cumul12")), funs (evo_12 = 100 * . / lag (., 12) - 100))
COM <- cbind(COM,CUM_3_COM,CUM_12_COM)
COM <- COM[-c(8:14,23:29)]

rm(list=ls(pattern=".*CUM.*"))

# CHOIX DES DEPARTEMENTS
AUT_002 <- filter(AUT,code %in% "002")
COM_002 <- filter(COM,code %in% "002")
AUT_059 <- filter(AUT,code %in% "059")
COM_059 <- filter(COM,code %in% "059")
AUT_060 <- filter(AUT,code %in% "060")
COM_060 <- filter(COM,code %in% "060")
AUT_062 <- filter(AUT,code %in% "062")
COM_062 <- filter(COM,code %in% "062")
AUT_080 <- filter(AUT,code %in% "080")
COM_080 <- filter(COM,code %in% "080")

# CHOIX DE LA REGION
AUT_REG <- filter(AUT,code %in% "32")
COM_REG <- filter(COM,code %in% "32")


# Niveau national
AUT_NAT <- filter(AUT,code %in% "000")
COM_NAT <- filter(COM,code %in% "000")
```

Evolutions
Globales ===================================== Row {data-height=290} ------------------------------------------------------------------ ### {data-width=100} ```{r} valueBox(AUT[nrow(AUT),1], icon = "fa-home fa-3x",color="SandyBrown") # "Mois en cours" avec icône maison ``` ### {data-width=280}
**Note explicative :**

Les chiffres publiés dans ce document sont élaborés à partir de résultats issus de la base de données Sit@del2. Celle-ci rassemble les informations relatives aux autorisations de construire (permis délivrés) et aux mises en chantier transmises par les services instructeurs au Ministère de la Transition Écologique et Solidaire. Ils sont exprimés en date de prise en compte, c'est-à-dire à la date à laquelle l'événement (autorisation, ouverture de chantier, etc.) est enregistré dans la base de données Sit@del2.

### {data-width=450}
**Définitions :**

En 2015, les publications conjoncturelles sur la construction de logements ont évolué. De nouveaux indicateurs visant à retracer les autorisations et les mises en chantier à leur date réelle sont diffusés. Ces nouvelles séries améliorent le diagnostic conjoncturel produit à partir de la base Sit@del2, en corrigeant notamment les défauts de collecte. Elles distinguent les logements individuels (purs et groupés) et les logements collectifs et en résidence. Les logements en résidence (pour personnes âgées, pour étudiants, pour touristes, etc.) se caractérisent par la fourniture de services individualisés (de loisirs, de restauration, de soins ou autres) en sus du gîte. Les foyers et les hôtels qui ne comportent que des chambres et des services communs ne sont pas classés dans les logements mais dans les locaux d'hébergement. Les estimations de la France entière n’intègrent pas le territoire de Mayotte.

Row {data-height=450} ------------------------------------------------------------------ ### Nombre de logements cumulé sur 12 mois en Hauts-de-France ```{r} fusion_AUT_XTS <- xts(round(AUT_REG[16]),order.by=AUT_REG$date) fusion_COM_XTS <- xts(round(COM_REG[16]),order.by=COM_REG$date) DPC_graph_1 <- cbind(fusion_AUT_XTS,fusion_COM_XTS) date_t <- nrow(fusion_AUT_XTS) # axe X fin (mois en cours dernière ligne) date_t_10 <- nrow(fusion_AUT_XTS)-120 # axe X début (-10 ans soit 120 mois) DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Autorisés","Commencés") dygraph(DPC_graph_1) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) %>% dySeries("Autorisés", color = "#FF8000", strokeWidth = 2) %>% dySeries("Commencés", color = "#FA5858", strokeWidth = 2) %>% dyLegend(width = 500) ``` ### Nombre de logements cumulé sur 3 mois en Hauts-de-France ```{r} fusion_AUT_XTS <- xts(round(AUT_REG[8]),order.by=AUT_REG$date) fusion_COM_XTS <- xts(round(COM_REG[8]),order.by=COM_REG$date) DPC_graph_1 <- cbind(fusion_AUT_XTS,fusion_COM_XTS) date_t <- nrow(fusion_AUT_XTS) date_t_10 <- nrow(fusion_AUT_XTS)-120 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Autorisés","Commencés") dygraph(DPC_graph_1) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dySeries("Autorisés", color = "#FF8000", strokeWidth = 2) %>% dySeries("Commencés", color = "#FA5858", strokeWidth = 2) %>% dyLegend(width = 500) ``` Row {data-height=450} ------------------------------------------------------------------ ### Nombre de logements cumulé sur 12 mois en France ```{r} fusion_AUT_XTS <- xts(round(AUT_NAT[16]),order.by=AUT_NAT$date) fusion_COM_XTS <- xts(round(COM_NAT[16]),order.by=COM_NAT$date) DPC_graph_1 <- cbind(fusion_AUT_XTS,fusion_COM_XTS) date_t <- nrow(fusion_AUT_XTS) date_t_10 <- nrow(fusion_AUT_XTS)-120 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Autorisés","Commencés") dygraph(DPC_graph_1) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dySeries("Autorisés", color = "#FF8000", strokeWidth = 2) %>% dySeries("Commencés", color = "#FA5858", strokeWidth = 2) %>% dyLegend(width = 500) ``` ### Nombre de logements cumulé sur 3 mois en France ```{r} fusion_AUT_XTS <- xts(round(AUT_NAT[8]),order.by=AUT_NAT$date) fusion_COM_XTS <- xts(round(COM_NAT[8]),order.by=COM_NAT$date) DPC_graph_1 <- cbind(fusion_AUT_XTS,fusion_COM_XTS) date_t <- nrow(fusion_AUT_XTS) date_t_10 <- nrow(fusion_AUT_XTS)-120 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Autorisés","Commencés") dygraph(DPC_graph_1) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dySeries("Autorisés", color = "#FF8000", strokeWidth = 2) %>% dySeries("Commencés", color = "#FA5858", strokeWidth = 2) %>% dyLegend(width = 500) ``` Evolutions par type
Logements Autorisés ===================================== Row {data-height=80} ------------------------------------------------------------------ ### {data-width=100}

LOGEMENTS AUTORISÉS
###

Les taux d'évolution représentés dans les graphiques rapportent le cumul des douze derniers mois à celui des douze mois précédents.
Row ------------------------------------------------------------------ ### évolution en Hauts-de-France ```{r} fusion_tot_XTS <- xts(round(AUT_REG[20]),order.by=AUT_REG$date) fusion_ip_XTS <- xts(round(AUT_REG[21]),order.by=AUT_REG$date) fusion_ig_XTS <- xts(round(AUT_REG[22]),order.by=AUT_REG$date) fusion_cr_XTS <- xts(round(AUT_REG[23]),order.by=AUT_REG$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` ### évolution département de l'Aisne ```{r} fusion_tot_XTS <- xts(round(AUT_002[20]),order.by=AUT_002$date) fusion_ip_XTS <- xts(round(AUT_002[21]),order.by=AUT_002$date) fusion_ig_XTS <- xts(round(AUT_002[22]),order.by=AUT_002$date) fusion_cr_XTS <- xts(round(AUT_002[23]),order.by=AUT_002$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-60, 150)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` ### évolution département du Nord ```{r} fusion_tot_XTS <- xts(round(AUT_059[20]),order.by=AUT_059$date) fusion_ip_XTS <- xts(round(AUT_059[21]),order.by=AUT_059$date) fusion_ig_XTS <- xts(round(AUT_059[22]),order.by=AUT_059$date) fusion_cr_XTS <- xts(round(AUT_059[23]),order.by=AUT_059$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-60, 150)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` Row ------------------------------------------------------------------ ### évolution département de l'Oise ```{r} fusion_tot_XTS <- xts(round(AUT_060[20]),order.by=AUT_060$date) fusion_ip_XTS <- xts(round(AUT_060[21]),order.by=AUT_060$date) fusion_ig_XTS <- xts(round(AUT_060[22]),order.by=AUT_060$date) fusion_cr_XTS <- xts(round(AUT_060[23]),order.by=AUT_060$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-60, 150)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` ### évolution département du Pas-de-Calais ```{r} fusion_tot_XTS <- xts(round(AUT_062[20]),order.by=AUT_062$date) fusion_ip_XTS <- xts(round(AUT_062[21]),order.by=AUT_062$date) fusion_ig_XTS <- xts(round(AUT_062[22]),order.by=AUT_062$date) fusion_cr_XTS <- xts(round(AUT_062[23]),order.by=AUT_062$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-60, 150)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` ### évolution département de la Somme ```{r} fusion_tot_XTS <- xts(round(AUT_080[20]),order.by=AUT_080$date) fusion_ip_XTS <- xts(round(AUT_080[21]),order.by=AUT_080$date) fusion_ig_XTS <- xts(round(AUT_080[22]),order.by=AUT_080$date) fusion_cr_XTS <- xts(round(AUT_080[23]),order.by=AUT_080$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-60, 150)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -60, axis = "y", color="#F5D0A9") ``` Evolutions par type
Logements Commencés ===================================== Row {data-height=80} ------------------------------------------------------------------ ### {data-width=100}

LOGEMENTS COMMENCÉS
###

Les taux d'évolution représentés dans les graphiques rapportent le cumul des douze derniers mois à celui des douze mois précédents.
Row ------------------------------------------------------------------ ### évolution en Hauts-de-France ```{r} fusion_tot_XTS <- xts(round(COM_REG[20]),order.by=COM_REG$date) fusion_ip_XTS <- xts(round(COM_REG[21]),order.by=COM_REG$date) fusion_ig_XTS <- xts(round(COM_REG[22]),order.by=COM_REG$date) fusion_cr_XTS <- xts(round(COM_REG[23]),order.by=COM_REG$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` ### évolution département de l'Aisne ```{r} fusion_tot_XTS <- xts(round(COM_002[20]),order.by=COM_002$date) fusion_ip_XTS <- xts(round(COM_002[21]),order.by=COM_002$date) fusion_ig_XTS <- xts(round(COM_002[22]),order.by=COM_002$date) fusion_cr_XTS <- xts(round(COM_002[23]),order.by=COM_002$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-70, 200)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` ### évolution département du Nord ```{r} fusion_tot_XTS <- xts(round(COM_059[20]),order.by=COM_059$date) fusion_ip_XTS <- xts(round(COM_059[21]),order.by=COM_059$date) fusion_ig_XTS <- xts(round(COM_059[22]),order.by=COM_059$date) fusion_cr_XTS <- xts(round(COM_059[23]),order.by=COM_059$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-70, 200)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` Row ------------------------------------------------------------------ ### évolution département de l'Oise ```{r} fusion_tot_XTS <- xts(round(COM_060[20]),order.by=COM_060$date) fusion_ip_XTS <- xts(round(COM_060[21]),order.by=COM_060$date) fusion_ig_XTS <- xts(round(COM_060[22]),order.by=COM_060$date) fusion_cr_XTS <- xts(round(COM_060[23]),order.by=COM_060$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-70, 200)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` ### évolution département du Pas-de-Calais ```{r} fusion_tot_XTS <- xts(round(COM_062[20]),order.by=COM_062$date) fusion_ip_XTS <- xts(round(COM_062[21]),order.by=COM_062$date) fusion_ig_XTS <- xts(round(COM_062[22]),order.by=COM_062$date) fusion_cr_XTS <- xts(round(COM_062[23]),order.by=COM_062$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-70, 200)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` ### évolution département de la Somme ```{r} fusion_tot_XTS <- xts(round(COM_080[20]),order.by=COM_080$date) fusion_ip_XTS <- xts(round(COM_080[21]),order.by=COM_080$date) fusion_ig_XTS <- xts(round(COM_080[22]),order.by=COM_080$date) fusion_cr_XTS <- xts(round(COM_080[23]),order.by=COM_080$date) DPC_graph_1 <- cbind(fusion_tot_XTS,fusion_ip_XTS,fusion_ig_XTS,fusion_cr_XTS) date_t <- nrow(fusion_tot_XTS) date_t_10 <- nrow(fusion_tot_XTS)-60 DPC_graph_1 <- DPC_graph_1[c(date_t_10 :date_t),] names(DPC_graph_1) <- c("Total","Ind. pur","Ind. groupé","Coll. et en Rés.") dygraph(DPC_graph_1) %>% dyAxis("y", label = "évolution", independentTicks = TRUE, valueFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}', axisLabelFormatter = 'function(d){return Math.round(d*100)/1e2 + "%"}') %>% dyRangeSelector()%>% dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))%>% dyAxis("y", valueRange = c(-70, 200)) %>% dySeries("Total", color = "#DF0101", strokeWidth = 2, strokePattern = "dotted") %>% dySeries("Ind. pur", color = "#FF8000", strokeWidth = 1) %>% dySeries("Ind. groupé", color = "#74DF00", strokeWidth = 1) %>% dySeries("Coll. et en Rés.", color = "#0489B1", strokeWidth = 1) %>% dyLegend(width = 500) %>% dyShading(from = 0, to = -70, axis = "y", color="#F5D0A9") ``` Volumes par type
Logements Autorisés ===================================== Row {data-height=80} ------------------------------------------------------------------ ### {data-width=100}

LOGEMENTS AUTORISÉS
###

Les volumes rapportés dans les graphiques représentent le cumul des douze derniers mois.
Row ------------------------------------------------------------------ ### volumes en Hauts-de-France ```{r barplots_aut_reg} AUT_REG_XTS <- AUT_REG [c(1,16:19)] AUT_REG_XTS <- xts(AUT_REG_XTS[2:5],order.by=AUT_REG_XTS$date) date_t <- nrow(AUT_REG_XTS) date_t_10 <- nrow(AUT_REG_XTS)-120 AUT_REG_XTS <- AUT_REG_XTS[c(date_t_10 :date_t),] names(AUT_REG_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dyBarChart <- function(dygraph) { dyPlotter(dygraph = dygraph, name = "BarChart", path = system.file("plotters/barchart.js", package = "dygraphs")) } dygraph(AUT_REG_XTS) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département de l'Aisne ```{r barplots_aut_Aisne} AUT_002_XTS <- AUT_002 [c(1,16:19)] AUT_002_XTS <- xts(AUT_002_XTS[2:5],order.by=AUT_002_XTS$date) date_t <- nrow(AUT_002_XTS) date_t_10 <- nrow(AUT_002_XTS)-120 AUT_002_XTS <- AUT_002_XTS[c(date_t_10 :date_t),] names(AUT_002_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(AUT_002_XTS) %>% dyAxis("y", valueRange = c(0, 20000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département du Nord ```{r barplots_aut_Nord} AUT_059_XTS <- AUT_059 [c(1,16:19)] AUT_059_XTS <- xts(AUT_059_XTS[2:5],order.by=AUT_059_XTS$date) date_t <- nrow(AUT_059_XTS) date_t_10 <- nrow(AUT_059_XTS)-120 AUT_059_XTS <- AUT_059_XTS[c(date_t_10 :date_t),] names(AUT_059_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(AUT_059_XTS) %>% dyAxis("y", valueRange = c(0, 20000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` Row ------------------------------------------------------------------ ### volumes département de l'Oise ```{r barplots_aut_Oise} AUT_060_XTS <- AUT_060 [c(1,16:19)] AUT_060_XTS <- xts(AUT_060_XTS[2:5],order.by=AUT_060_XTS$date) date_t <- nrow(AUT_060_XTS) date_t_10 <- nrow(AUT_060_XTS)-120 AUT_060_XTS <- AUT_060_XTS[c(date_t_10 :date_t),] names(AUT_060_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(AUT_060_XTS) %>% dyAxis("y", valueRange = c(0, 20000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département du Pas-de-Calais ```{r barplots_aut_PdC} AUT_062_XTS <- AUT_062 [c(1,16:19)] AUT_062_XTS <- xts(AUT_062_XTS[2:5],order.by=AUT_062_XTS$date) date_t <- nrow(AUT_062_XTS) date_t_10 <- nrow(AUT_062_XTS)-120 AUT_062_XTS <- AUT_062_XTS[c(date_t_10 :date_t),] names(AUT_062_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(AUT_062_XTS) %>% dyAxis("y", valueRange = c(0, 20000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département de la Somme ```{r barplots_aut_Somme} AUT_080_XTS <- AUT_080 [c(1,16:19)] AUT_080_XTS <- xts(AUT_080_XTS[2:5],order.by=AUT_080_XTS$date) date_t <- nrow(AUT_080_XTS) date_t_10 <- nrow(AUT_080_XTS)-120 AUT_080_XTS <- AUT_080_XTS[c(date_t_10 :date_t),] names(AUT_080_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(AUT_080_XTS) %>% dyAxis("y", valueRange = c(0, 20000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` Volumes par type
Logements Commencés ===================================== Row {data-height=80} ------------------------------------------------------------------ ### {data-width=100}

LOGEMENTS COMMENCÉS
###

Les volumes rapportés dans les graphiques représentent le cumul des douze derniers mois.
Row ------------------------------------------------------------------ ### volumes en Hauts-de-France ```{r barplots_COM_reg} COM_REG_XTS <- COM_REG [c(1,16:19)] COM_REG_XTS <- xts(COM_REG_XTS[2:5],order.by=COM_REG_XTS$date) date_t <- nrow(COM_REG_XTS) date_t_10 <- nrow(COM_REG_XTS)-120 COM_REG_XTS <- COM_REG_XTS[c(date_t_10 :date_t),] names(COM_REG_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dyBarChart <- function(dygraph) { dyPlotter(dygraph = dygraph, name = "BarChart", path = system.file("plotters/barchart.js", package = "dygraphs")) } dygraph(COM_REG_XTS) %>% dyAxis("y", valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département de l'Aisne ```{r barplots_COM_Aisne} COM_002_XTS <- COM_002 [c(1,16:19)] COM_002_XTS <- xts(COM_002_XTS[2:5],order.by=COM_002_XTS$date) date_t <- nrow(COM_002_XTS) date_t_10 <- nrow(COM_002_XTS)-120 COM_002_XTS <- COM_002_XTS[c(date_t_10 :date_t),] names(COM_002_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(COM_002_XTS) %>% dyAxis("y", valueRange = c(0, 16000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département du Nord ```{r barplots_COM_Nord} COM_059_XTS <- COM_059 [c(1,16:19)] COM_059_XTS <- xts(COM_059_XTS[2:5],order.by=COM_059_XTS$date) date_t <- nrow(COM_059_XTS) date_t_10 <- nrow(COM_059_XTS)-120 COM_059_XTS <- COM_059_XTS[c(date_t_10 :date_t),] names(COM_059_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(COM_059_XTS) %>% dyAxis("y", valueRange = c(0, 16000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` Row ------------------------------------------------------------------ ### volumes département de l'Oise ```{r barplots_COM_Oise} COM_060_XTS <- COM_060 [c(1,16:19)] COM_060_XTS <- xts(COM_060_XTS[2:5],order.by=COM_060_XTS$date) date_t <- nrow(COM_060_XTS) date_t_10 <- nrow(COM_060_XTS)-120 COM_060_XTS <- COM_060_XTS[c(date_t_10 :date_t),] names(COM_060_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(COM_060_XTS) %>% dyAxis("y", valueRange = c(0, 16000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département du Pas-de-Calais ```{r barplots_COM_PdC} COM_062_XTS <- COM_062 [c(1,16:19)] COM_062_XTS <- xts(COM_062_XTS[2:5],order.by=COM_062_XTS$date) date_t <- nrow(COM_062_XTS) date_t_10 <- nrow(COM_062_XTS)-120 COM_062_XTS <- COM_062_XTS[c(date_t_10 :date_t),] names(COM_062_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(COM_062_XTS) %>% dyAxis("y", valueRange = c(0, 16000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` ### volumes département de la Somme ```{r barplots_COM_Somme} COM_080_XTS <- COM_080 [c(1,16:19)] COM_080_XTS <- xts(COM_080_XTS[2:5],order.by=COM_080_XTS$date) date_t <- nrow(COM_080_XTS) date_t_10 <- nrow(COM_080_XTS)-120 COM_080_XTS <- COM_080_XTS[c(date_t_10 :date_t),] names(COM_080_XTS) <- c("Total Logements Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") dygraph(COM_080_XTS) %>% dyAxis("y", valueRange = c(0, 16000), valueFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}', axisLabelFormatter = 'function(d){return d.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, " ");}') %>% dyRangeSelector() %>% dySeries("Total Logements Autorisés", color = "#CB0002", strokeWidth = 3) %>% dySeries("Individuel Pur", color = "#ED5851") %>% dySeries("Individuel Groupé", color = "#D0585E") %>% dySeries("Collectif et en Résidence", color = "#FF9C3C") %>% dyLegend(width = 300,labelsSeparateLines = TRUE, show="onmouseover") %>% dyStackedBarGroup(c("Individuel Pur","Individuel Groupé","Collectif et en Résidence")) ``` Tableau
Logements Autorisés ===================================== Row {data-height=60} ------------------------------------------------------------------ ### {data-width=250}
$^{(1)}$ Nombres de logements autorisés à la fin ```r AUT[nrow(AUT),1]```
$^{(2)}$ Trois derniers mois par rapport aux trois mêmes mois de l'année précédente
$^{(3)}$ Douze derniers mois par rapport aux douze mois précédents ###


**Avertissement :** Dans les tableaux, en raison des arrondis, des totaux peuvent légèrement différer de la somme des éléments qui les composent.
Row {data-height=450} ------------------------------------------------------------------ ### {data-width=70}
Hauts-de-France $^{(3)}$
```{r, fig.width=0.5} evo <- round(AUT_REG[nrow(AUT_REG),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```

Ces jauges représentent le taux d'évolution entre le volume total cumulé des douze derniers mois, rapporté à celui des douze mois précédents.

### {data-width=70}
Aisne $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(AUT_002[nrow(AUT_002),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Nord $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(AUT_059[nrow(AUT_059),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Oise $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(AUT_060[nrow(AUT_060),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Pas-de-Calais $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(AUT_062[nrow(AUT_062),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Somme $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(AUT_080[nrow(AUT_080),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ``` ###
LOGEMENTS AUTORISÉS
```{r Données_Autorisés} creations <- AUT_REG[nrow(AUT_REG),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] libelle <- c("Total Autorisés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") cumul3 <- AUT_REG[nrow(AUT_REG),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_REG[nrow(AUT_REG),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_REG[nrow(AUT_REG),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_REG[nrow(AUT_REG),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) hdf_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Hauts-de-France") hdf_aut <- hdf_aut[c(7,1:6)] hdf_aut$zone[duplicated(hdf_aut$zone)] <- paste(rep("" , 4) , collapse = "") # ne conserve que le premier libellé # des 4 lignes "zone" creations <- AUT_002[nrow(AUT_002),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- AUT_002[nrow(AUT_002),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_002[nrow(AUT_002),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_002[nrow(AUT_002),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_002[nrow(AUT_002),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) aisne_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Aisne") aisne_aut <- aisne_aut[c(7,1:6)] aisne_aut$zone[duplicated(aisne_aut$zone)] <- paste(rep("" , 4) , collapse = "") creations <- AUT_059[nrow(AUT_059),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- AUT_059[nrow(AUT_059),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_059[nrow(AUT_059),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_059[nrow(AUT_059),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_059[nrow(AUT_059),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) nord_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Nord") nord_aut <- nord_aut[c(7,1:6)] nord_aut$zone[duplicated(nord_aut$zone)] <- paste(rep("" , 4) , collapse = "") creations <- AUT_060[nrow(AUT_060),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- AUT_060[nrow(AUT_060),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_060[nrow(AUT_060),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_060[nrow(AUT_060),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_060[nrow(AUT_060),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) oise_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Oise") oise_aut <- oise_aut[c(7,1:6)] oise_aut$zone[duplicated(oise_aut$zone)] <- paste(rep("" , 4) , collapse = "") creations <- AUT_062[nrow(AUT_062),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- AUT_062[nrow(AUT_062),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_062[nrow(AUT_062),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_062[nrow(AUT_062),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_062[nrow(AUT_062),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) pdc_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Pas-de-Calais") pdc_aut <- pdc_aut[c(7,1:6)] pdc_aut$zone[duplicated(pdc_aut$zone)] <- paste(rep("" , 4) , collapse = "") creations <- AUT_080[nrow(AUT_080),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- AUT_080[nrow(AUT_080),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- AUT_080[nrow(AUT_080),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- AUT_080[nrow(AUT_080),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- AUT_080[nrow(AUT_080),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) somme_aut <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Somme") somme_aut <- somme_aut[c(7,1:6)] somme_aut$zone[duplicated(somme_aut$zone)] <- paste(rep("" , 4) , collapse = "") tab1_aut <- rbind(hdf_aut,aisne_aut,nord_aut,oise_aut,pdc_aut,somme_aut) # Définition des libellés en-têtes de colonnes names(tab1_aut) <- c("","","Autorisations (1)","Cumul des trois derniers mois","Variation en % (2)", "Cumul des douze derniers mois","Variation en % (3)") # Création (tab2_aut) et ajout d'une dernière ligne vide ("NA") afin d'éviter l'affichage tronqué de la ligne "Collectif et en Résidence" de la Somme en fin de tableau tab2_aut <- as.data.frame(setNames(replicate(7,NA, simplify = F), c())) names(tab2_aut) <- c("","","Autorisations (1)","Cumul des trois derniers mois","Variation en % (2)", "Cumul des douze derniers mois","Variation en % (3)") tab1_aut <- rbind(tab1_aut,tab2_aut) DT::datatable(tab1_aut, extensions = 'Buttons', options = list(autoWidth = TRUE, bPaginate = F, dom = 'Bt', columnDefs = list(list(className = 'dt-center', targets = 2:6),list(width = '20px', targets = c(4,6)), list(width = '240px', targets = 0)), buttons = c('copy','csv', 'excel', 'pdf', 'print')),rownames = F) %>% formatStyle(1:7, fontWeight = 'bold') %>% # formatage du séparateur de milliers " " pour les nombres entiers : formatRound(c('Autorisations (1)','Cumul des trois derniers mois','Cumul des douze derniers mois'), digits=0, mark=" ") %>% formatStyle('Autorisations (1)', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#f9e79f'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Cumul des trois derniers mois', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#f5b041'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Cumul des douze derniers mois', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#ff8000'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Variation en % (2)', color = styleInterval(c(0),c('red', 'green'))) %>% formatStyle('Variation en % (3)', color = styleInterval(c(0), c('red', 'green'))) ``` Tableau
Logements Commencés ===================================== Row {data-height=60} ------------------------------------------------------------------ ### {data-width=250}
$^{(1)}$ Nombres de logements commencés à la fin ```r COM[nrow(COM),1]```
$^{(2)}$ Trois derniers mois par rapport aux trois mêmes mois de l'année précédente
$^{(3)}$ Douze derniers mois par rapport aux douze mois précédents ###


**Avertissement :** Dans les tableaux, en raison des arrondis, des totaux peuvent légèrement différer de la somme des éléments qui les composent.
Row {data-height=450} ------------------------------------------------------------------ ### {data-width=70}
Hauts-de-France $^{(3)}$
```{r, fig.width=0.5} evo <- round(COM_REG[nrow(COM_REG),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```

Ces jauges représentent le taux d'évolution entre le volume total cumulé des douze derniers mois, rapporté à celui des douze mois précédents.

### {data-width=70}
Aisne $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(COM_002[nrow(COM_002),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Nord $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(COM_059[nrow(COM_059),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Oise $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(COM_060[nrow(COM_060),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Pas-de-Calais $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(COM_062[nrow(COM_062),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ```
Somme $^{(3)}$
```{r, fig.height=2, fig.width=2} evo <- round(COM_080[nrow(COM_080),20],1) gauge(evo, min = -100, max = 100, symbol = '%', gaugeSectors(success = c(0, 100), warning = c(-25, 0), danger = c(-100, -25.0000001))) ``` ###
LOGEMENTS COMMENCÉS
```{r Données_Commencés} creations <- COM_REG[nrow(COM_REG),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] libelle <- c("Total Commencés","Individuel Pur","Individuel Groupé","Collectif et en Résidence") cumul3 <- COM_REG[nrow(COM_REG),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_REG[nrow(COM_REG),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_REG[nrow(COM_REG),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_REG[nrow(COM_REG),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) hdf_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Hauts-de-France") hdf_com <- hdf_com[c(7,1:6)] hdf_com$zone[duplicated(hdf_com$zone)] <- paste(rep("" , 4) , collapse = "") creations <- COM_002[nrow(COM_002),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- COM_002[nrow(COM_002),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_002[nrow(COM_002),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_002[nrow(COM_002),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_002[nrow(COM_002),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) aisne_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Aisne") aisne_com <- aisne_com[c(7,1:6)] aisne_com$zone[duplicated(aisne_com$zone)] <- paste(rep("" , 4) , collapse = "") creations <- COM_059[nrow(COM_059),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- COM_059[nrow(COM_059),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_059[nrow(COM_059),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_059[nrow(COM_059),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_059[nrow(COM_059),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) nord_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Nord") nord_com <- nord_com[c(7,1:6)] nord_com$zone[duplicated(nord_com$zone)] <- paste(rep("" , 4) , collapse = "") creations <- COM_060[nrow(COM_060),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- COM_060[nrow(COM_060),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_060[nrow(COM_060),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_060[nrow(COM_060),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_060[nrow(COM_060),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) oise_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Oise") oise_com <- oise_com[c(7,1:6)] oise_com$zone[duplicated(oise_com$zone)] <- paste(rep("" , 4) , collapse = "") creations <- COM_062[nrow(COM_062),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- COM_062[nrow(COM_062),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_062[nrow(COM_062),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_062[nrow(COM_062),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_062[nrow(COM_062),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) pdc_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Pas-de-Calais") pdc_com <- pdc_com[c(7,1:6)] pdc_com$zone[duplicated(pdc_com$zone)] <- paste(rep("" , 4) , collapse = "") creations <- COM_080[nrow(COM_080),c(4:7)] creations <- gather(creations,"a","créations",1:4) creations <- creations[,2] cumul3 <- COM_080[nrow(COM_080),c(8:11)] cumul3 <- gather(cumul3,"a","créations",1:4) cumul3 <- cumul3[,2] evo3 <- COM_080[nrow(COM_080),c(12:15)] evo3 <- gather(evo3,"a","créations",1:4) evo3 <- evo3[,2] evo3 <- round(evo3,1) cumul12 <- COM_080[nrow(COM_080),c(16:19)] cumul12 <- gather(cumul12,"a","créations",1:4) cumul12 <- cumul12[,2] evo12 <- COM_080[nrow(COM_080),c(20:23)] evo12 <- gather(evo12,"a","créations",1:4) evo12 <- evo12[,2] evo12 <- round(evo12,1) somme_com <- data.frame(libelle,creations,cumul3,evo3,cumul12,evo12) %>% mutate(zone="Somme") somme_com <- somme_com[c(7,1:6)] somme_com$zone[duplicated(somme_com$zone)] <- paste(rep("" , 4) , collapse = "") tab1_com <- rbind(hdf_com,aisne_com,nord_com,oise_com,pdc_com,somme_com) names(tab1_com) <- c("","","Mises en chantier (1)","Cumul des trois derniers mois","Variation en % (2)", "Cumul des douze derniers mois","Variation en % (3)") tab2_com <- as.data.frame(setNames(replicate(7,NA, simplify = F), c())) names(tab2_com) <- c("","","Mises en chantier (1)","Cumul des trois derniers mois","Variation en % (2)", "Cumul des douze derniers mois","Variation en % (3)") tab1_com <- rbind(tab1_com,tab2_com) DT::datatable(tab1_com, extensions = 'Buttons', options = list(autoWidth = TRUE, bPaginate = F, dom = 'Bt', columnDefs = list(list(className = 'dt-center', targets = 2:6),list(width = '20px', targets = c(4,6)), list(width = '240px', targets = 0)), buttons = c('copy','csv', 'excel', 'pdf', 'print')),rownames = F) %>% formatStyle(1:7, fontWeight = 'bold') %>% formatRound(c('Mises en chantier (1)','Cumul des trois derniers mois','Cumul des douze derniers mois'), digits=0, mark=" ") %>% formatStyle('Mises en chantier (1)', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#f9e79f'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Cumul des trois derniers mois', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#f5b041'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Cumul des douze derniers mois', textAlign="right", background = styleColorBar(tab1_aut$`Autorisations (1)`, '#ff8000'), backgroundSize = '100% 40%', backgroundRepeat = 'no-repeat', backgroundPosition = 'center') %>% formatStyle('Variation en % (2)', color = styleInterval(c(0),c('red', 'green'))) %>% formatStyle('Variation en % (3)', color = styleInterval(c(0), c('red', 'green'))) ``` Cartes
France {data-orientation=columns} ===================================== ```{r Données_cartes_France,include=FALSE} REG_AUT <- readWorksheetFromFile("ROES_202001.xls",sheet="AUT_NEW_REG") %>% rename(code=reg,zone=nom_REG) REG_COM <- readWorksheetFromFile("ROES_202001.xls",sheet="COM_NEW_REG") %>% rename(code=REG,zone=nom_REG) # Cumul et variations 12 mois ----- CUM_12_REG_AUT <- REG_AUT %>% mutate_if (is.numeric, funs (cumul12 = roll_sumr (., n = 12))) %>% mutate_at (vars (ends_with ("cumul12")), funs (evo_12 = 100 * . / lag (., 12) - 100)) REG_AUT <- cbind(REG_AUT,CUM_12_REG_AUT) REG_AUT <- REG_AUT[-c(8:14)] CUM_12_REG_COM <- REG_COM %>% mutate_if (is.numeric, funs (cumul12 = roll_sumr (., n = 12))) %>% mutate_at (vars (ends_with ("cumul12")), funs (evo_12 = 100 * . / lag (., 12) - 100)) REG_COM <- cbind(REG_COM,CUM_12_REG_COM) REG_COM <- REG_COM[-c(8:14)] REG_AUT_last <- REG_AUT[REG_AUT$date %in% REG_AUT[[nrow(REG_AUT),1]],] REG_COM_last <- REG_COM[REG_COM$date %in% REG_COM[[nrow(REG_COM),1]],] REG_AUT_last <- REG_AUT_last %>% # ajout de 2 colonnes longitude et latitude (coordonnées décimales des villes-centre de chaque région) afin de positionner les cercles proportionnels au centre de chaque région mutate(long = c(-61.5,-61.0,-53.2,55.5,2.5,1.7,4.8,0.1,2.8,5.6,-0.8,-2.9,0.2,2.1,4.5,6.0,9.2)) %>% mutate(lat = c(16.2,14.7,3.6,-21.1,48.7,47.5,47.2,49.1,49.9,48.7,47.5,48.2,45.2,43.7,45.5,43.9,42.2)) %>% mutate(radius_aut = log_AUT_cumul12) %>% # affectation de la variable radius-aut (taille des cercles proportionnels) mutate(code_insee = c(971,972,973,974,0,0,0,0,0,0,0,0,0,0,0,0,0)) # création de la variable de jointure pour les cartes des D.O.M. REG_COM_last <- REG_COM_last %>% mutate(long = c(-61.5,-61.0,-53.2,55.5,2.5,1.7,4.8,0.1,2.8,5.6,-0.8,-2.9,0.2,2.1,4.5,6.0,9.2)) %>% mutate(lat = c(16.2,14.7,3.6,-21.1,48.7,47.5,47.2,49.1,49.9,48.7,47.5,48.2,45.2,43.7,45.5,43.9,42.2)) %>% mutate(radius_com = log_COM_cumul12) %>% mutate(code_insee =c (971,972,973,974,0,0,0,0,0,0,0,0,0,0,0,0,0)) colnames(REG_AUT_last)[2] <- "CODE_REG" colnames(REG_COM_last)[2] <- "CODE_REG" REG_AUT_last[12:15] <- round(REG_AUT_last[12:15],digits=1) REG_COM_last[12:15] <- round(REG_COM_last[12:15],digits=1) REG_AUT_last[4:11] <- format(REG_AUT_last[4:11],big.mark = " ") REG_COM_last[4:11] <- format(REG_COM_last[4:11],big.mark = " ") library(cartography) library(rgdal) # chargement du fond de carte .shp des régions métropolitaines françaises FR_REG <- readOGR(dsn="P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif/region_2016_s_fr.shp", layer="region_2016_s_fr", stringsAsFactors = FALSE) FR_REG <- spTransform(FR_REG, "+init=epsg:4326") # transformation des coordonnées spatiales FR_REG_AUT <- merge(FR_REG,REG_AUT_last, by="CODE_REG") # jointure spdf/df via "CODE_REG" FR_REG_COM <- merge(FR_REG,REG_COM_last, by="CODE_REG") # Définition des étiquettes (passage souris sur les régions) ; "%s" pour intitulé ou valeur entière, "%.1f" pour pourcentage avec "1" décimale popup_aut <- sprintf("%s
Cumul 12 derniers mois :
%s
logts autorisés - évolution : %.1f %%
dont :
%s en Individuel pur - évolution : %.1f %%
%s en Individuel groupé - évolution : %.1f %%
%s en Coll. et résidence - évolution : %.1f %%", FR_REG_AUT$zone, FR_REG_AUT$log_AUT_cumul12, FR_REG_AUT$log_AUT_cumul12_evo_12, FR_REG_AUT$ip_AUT_cumul12, FR_REG_AUT$ip_AUT_cumul12_evo_12, FR_REG_AUT$ig_AUT_cumul12, FR_REG_AUT$ig_AUT_cumul12_evo_12, FR_REG_AUT$colres_AUT_cumul12, FR_REG_AUT$colres_AUT_cumul12_evo_12) %>% lapply(htmltools::HTML) popup_com <- sprintf("%s
Cumul 12 derniers mois :
%s
logts commencés - évolution : %.1f %%
dont :
%s en Individuel pur - évolution : %.1f %%
%s en Individuel groupé - évolution : %.1f %%
%s en Coll. et résidence - évolution : %.1f %%", FR_REG_COM$zone, FR_REG_COM$log_COM_cumul12, FR_REG_COM$log_COM_cumul12_evo_12, FR_REG_COM$ip_COM_cumul12, FR_REG_COM$ip_COM_cumul12_evo_12, FR_REG_COM$ig_COM_cumul12, FR_REG_COM$ig_COM_cumul12_evo_12, FR_REG_COM$colres_COM_cumul12, FR_REG_COM$colres_COM_cumul12_evo_12) %>% lapply(htmltools::HTML) ``` Column {data-width=400} ------------------------------------------------------------------ ### {data-height=30}
LOGEMENTS AUTORISÉS 
  FRANCE
  Résultats à fin ```r AUT[nrow(AUT),1]```
Les cercles opaques représentent le volume total cumulé des logements
autorisés
sur les douze derniers mois. Les évolutions désignent le rapport entre le volume total cumulé des douze derniers mois et celui des douze mois précédents
```{r france_aut, echo=FALSE, fig.align="center"} # AUTORISES library(sp) library(leaflet) m <- leaflet(options = leafletOptions(zoomControl = FALSE)) m <- addTiles(map = m) # définition des intervalles de représentation des taux pour la carte choroplèthe bins <- c(-15,-10,-5,-2.5,-1,0,1,2.5,5,10,15, Inf) # définition de la palette de couleur (5 tons "taupe" -négatifs-, 6 tons "orange" -positifs-) tauporange <- c("#30291E","#877C69","#B7AC99","#D2C9B9","#E8E0D4", "#FFEB97","#FFC970","#FFA749","#FF7A16","#F84E00","#E50000") pal <- colorBin(tauporange, domain = REG_AUT_last$log_AUT_cumul12_evo_12, bins = bins) a <- addPolygons(map = m, data = FR_REG_AUT, fillColor = ~pal(log_AUT_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = popup_aut, # étiquette définie ligne 1274 labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "15px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) %>% addLegend(pal = pal, values = bins, opacity = 0.5, title = "évolution", position="topright", labFormat = labelFormat(suffix = "%")) # Ajout des cercles proportionnels (pas de légende, si vous avez une astuce merci de la partager ;) ) a <- addCircleMarkers(map = a, lng = FR_REG_AUT$long, lat = FR_REG_AUT$lat, radius = FR_REG_AUT$radius_aut/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#088A08", fillOpacity = 0.7, color = "#088A08") a ``` Column {data-width=100} ------------------------------------------------------------------ ```{r DOM_données, echo=FALSE, include=FALSE} FR_guad <- readOGR(dsn="P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif", layer="guadeloupe_contour_simple", stringsAsFactors = FALSE) FR_guad <- spTransform(FR_guad, "+init=epsg:4326") # transformation des coordonnées spatiales FR_guad_AUT <- merge(FR_guad,REG_AUT_last, by="code_insee") # jointure spdf/df via "CODE_REG" FR_guad_COM <- merge(FR_guad,REG_COM_last, by="code_insee") etiq_aut_guad <- sprintf("%s
Cumul 12 derniers mois :
%s
logts autorisés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_guad_AUT$zone, FR_guad_AUT$log_AUT_cumul12, FR_guad_AUT$log_AUT_cumul12_evo_12, FR_guad_AUT$ip_AUT_cumul12, FR_guad_AUT$ip_AUT_cumul12_evo_12, FR_guad_AUT$ig_AUT_cumul12, FR_guad_AUT$ig_AUT_cumul12_evo_12, FR_guad_AUT$colres_AUT_cumul12, FR_guad_AUT$colres_AUT_cumul12_evo_12) %>% lapply(htmltools::HTML) etiq_com_guad <- sprintf("%s
Cumul 12 derniers mois :
%s
logts commencés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_guad_COM$zone, FR_guad_COM$log_COM_cumul12, FR_guad_COM$log_COM_cumul12_evo_12, FR_guad_COM$ip_COM_cumul12, FR_guad_COM$ip_COM_cumul12_evo_12, FR_guad_COM$ig_COM_cumul12, FR_guad_COM$ig_COM_cumul12_evo_12, FR_guad_COM$colres_COM_cumul12, FR_guad_COM$colres_COM_cumul12_evo_12) %>% lapply(htmltools::HTML) FR_mart <- readOGR(dsn="P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif", layer="martinique_contour_simple", stringsAsFactors = FALSE) FR_mart <- spTransform(FR_mart, "+init=epsg:4326") # transformation des coordonnées spatiales FR_mart_AUT <- merge(FR_mart,REG_AUT_last, by="code_insee") # jointure spdf/df via "CODE_REG" FR_mart_COM <- merge(FR_mart,REG_COM_last, by="code_insee") etiq_aut_mart <- sprintf("%s
Cumul 12 derniers mois :
%s
logts autorisés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_mart_AUT$zone, FR_mart_AUT$log_AUT_cumul12, FR_mart_AUT$log_AUT_cumul12_evo_12, FR_mart_AUT$ip_AUT_cumul12, FR_mart_AUT$ip_AUT_cumul12_evo_12, FR_mart_AUT$ig_AUT_cumul12, FR_mart_AUT$ig_AUT_cumul12_evo_12, FR_mart_AUT$colres_AUT_cumul12, FR_mart_AUT$colres_AUT_cumul12_evo_12) %>% lapply(htmltools::HTML) etiq_com_mart <- sprintf("%s
Cumul 12 derniers mois :
%s
logts commencés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_mart_COM$zone, FR_mart_COM$log_COM_cumul12, FR_mart_COM$log_COM_cumul12_evo_12, FR_mart_COM$ip_COM_cumul12, FR_mart_COM$ip_COM_cumul12_evo_12, FR_mart_COM$ig_COM_cumul12, FR_mart_COM$ig_COM_cumul12_evo_12, FR_mart_COM$colres_COM_cumul12, FR_mart_COM$colres_COM_cumul12_evo_12) %>% lapply(htmltools::HTML) FR_guya <- readOGR(dsn="P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif", layer="guyane_contour_simple", stringsAsFactors = FALSE) FR_guya <- spTransform(FR_guya, "+init=epsg:4326") # transformation des coordonnées spatiales FR_guya_AUT <- merge(FR_guya,REG_AUT_last, by="code_insee") # jointure spdf/df via "CODE_REG" FR_guya_COM <- merge(FR_guya,REG_COM_last, by="code_insee") etiq_aut_guya <- sprintf("%s
Cumul 12 derniers mois :
%s
logts autorisés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_guya_AUT$zone, FR_guya_AUT$log_AUT_cumul12, FR_guya_AUT$log_AUT_cumul12_evo_12, FR_guya_AUT$ip_AUT_cumul12, FR_guya_AUT$ip_AUT_cumul12_evo_12, FR_guya_AUT$ig_AUT_cumul12, FR_guya_AUT$ig_AUT_cumul12_evo_12, FR_guya_AUT$colres_AUT_cumul12, FR_guya_AUT$colres_AUT_cumul12_evo_12) %>% lapply(htmltools::HTML) etiq_com_guya <- sprintf("%s
Cumul 12 derniers mois :
%s
logts commencés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_guya_COM$zone, FR_guya_COM$log_COM_cumul12, FR_guya_COM$log_COM_cumul12_evo_12, FR_guya_COM$ip_COM_cumul12, FR_guya_COM$ip_COM_cumul12_evo_12, FR_guya_COM$ig_COM_cumul12, FR_guya_COM$ig_COM_cumul12_evo_12, FR_guya_COM$colres_COM_cumul12, FR_guya_COM$colres_COM_cumul12_evo_12) %>% lapply(htmltools::HTML) FR_reun <- readOGR(dsn="P:/services/SIDDEE/PAD/Publications/Sitadel2/Logements/PgmR/Logements_interactif", layer="reunion_contour_simple", stringsAsFactors = FALSE) FR_reun <- spTransform(FR_reun, "+init=epsg:4326") # transformation des coordonnées spatiales FR_reun_AUT <- merge(FR_reun,REG_AUT_last, by="code_insee") # jointure spdf/df via "CODE_REG" FR_reun_COM <- merge(FR_reun,REG_COM_last, by="code_insee") etiq_aut_reun <- sprintf("%s
Cumul 12 derniers mois :
%s
logts autorisés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_reun_AUT$zone, FR_reun_AUT$log_AUT_cumul12, FR_reun_AUT$log_AUT_cumul12_evo_12, FR_reun_AUT$ip_AUT_cumul12, FR_reun_AUT$ip_AUT_cumul12_evo_12, FR_reun_AUT$ig_AUT_cumul12, FR_reun_AUT$ig_AUT_cumul12_evo_12, FR_reun_AUT$colres_AUT_cumul12, FR_reun_AUT$colres_AUT_cumul12_evo_12) %>% lapply(htmltools::HTML) etiq_com_reun <- sprintf("%s
Cumul 12 derniers mois :
%s
logts commencés
- évolution : %.1f %%
dont :
%s en Individuel pur
- évolution : %.1f %%
%s en Individuel groupé
- évolution : %.1f %%
%s en Coll. et résidence
- évolution : %.1f %%", FR_reun_COM$zone, FR_reun_COM$log_COM_cumul12, FR_reun_COM$log_COM_cumul12_evo_12, FR_reun_COM$ip_COM_cumul12, FR_reun_COM$ip_COM_cumul12_evo_12, FR_reun_COM$ig_COM_cumul12, FR_reun_COM$ig_COM_cumul12_evo_12, FR_reun_COM$colres_COM_cumul12, FR_reun_COM$colres_COM_cumul12_evo_12) %>% lapply(htmltools::HTML) ``` ### {data-height=100} ```{r guadeloupe_aut_carte, echo=FALSE, fig.align="center"} aguad <- addPolygons(map = m, data = FR_guad_AUT, fillColor = ~pal(log_AUT_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_aut_guad, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) aguad <- addCircleMarkers(map = aguad, lng = FR_guad_AUT$long, lat = FR_guad_AUT$lat, radius = FR_guad_AUT$radius_aut/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#088A08", fillOpacity = 0.7, color = "#088A08") aguad ``` ### {data-height=100} ```{r martinique_aut_carte, echo=FALSE, fig.align="center"} amart <- addPolygons(map = m, data = FR_mart_AUT, fillColor = ~pal(log_AUT_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_aut_mart, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) amart <- addCircleMarkers(map = amart, lng = FR_mart_AUT$long, lat = FR_mart_AUT$lat, radius = FR_mart_AUT$radius_aut/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#088A08", fillOpacity = 0.7, color = "#088A08") amart ``` ### {data-height=100} ```{r reunion_aut_carte, echo=FALSE, fig.align="center"} areun <- addPolygons(map = m, data = FR_reun_AUT, fillColor = ~pal(log_AUT_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_aut_reun, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) areun <- addCircleMarkers(map = areun, lng = FR_reun_AUT$long, lat = FR_reun_AUT$lat, radius = FR_reun_AUT$radius_aut/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#088A08", fillOpacity = 0.7, color = "#088A08") areun ``` ### {data-height=100} ```{r guyane_aut_carte, echo=FALSE, fig.align="center"} aguya <- addPolygons(map = m, data = FR_guya_AUT, fillColor = ~pal(log_AUT_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_aut_guya, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) aguya <- addCircleMarkers(map = aguya, lng = FR_guya_AUT$long, lat = FR_guya_AUT$lat, radius = FR_guya_AUT$radius_aut/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#088A08", fillOpacity = 0.7, color = "#088A08") aguya ``` Column {data-width=400} ------------------------------------------------------------------ ### {data-height=30}
LOGEMENTS COMMENCÉS 
  FRANCE
  Résultats à fin ```r AUT[nrow(AUT),1]```
Les cercles opaques représentent le volume total cumulé des logements
commencés
sur les douze derniers mois. Les évolutions désignent le rapport entre le volume total cumulé des douze derniers mois et celui des douze mois précédents
```{r france_com, echo=FALSE, fig.align="center"} # COMMENCES pal <- colorBin(tauporange, domain = REG_COM_last$log_COM_cumul12_evo_12, bins = bins) c <- addPolygons(map = m, data = FR_REG_COM, fillColor = ~pal(log_COM_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = popup_com, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "15px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) %>% addLegend(pal = pal, values = bins, opacity = 0.5, title = "évolution", position = "topright", labFormat = labelFormat(suffix = "%")) c <- addCircleMarkers(map = c, lng = FR_REG_COM$long, lat = FR_REG_COM$lat, radius = FR_REG_COM$radius_com/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#084B8A", fillOpacity = 0.7, color = "#084B8A") c ``` Column {data-width=100} ------------------------------------------------------------------ ### {data-height=100} ```{r guad_com, echo=FALSE, fig.align="center"} aguad <- addPolygons(map = m, data = FR_guad_COM, fillColor = ~pal(log_COM_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_com_guad, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) aguad <- addCircleMarkers(map = aguad, lng = FR_guad_COM$long, lat = FR_guad_COM$lat, radius = FR_guad_COM$radius_com/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#084B8A", fillOpacity = 0.7, color = "#084B8A") aguad ``` ### {data-height=100} ```{r mart_com, echo=FALSE, fig.align="center"} amart <- addPolygons(map = m, data = FR_mart_COM, fillColor = ~pal(log_COM_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_com_mart, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) amart <- addCircleMarkers(map = amart, lng = FR_mart_COM$long, lat = FR_mart_COM$lat, radius = FR_mart_COM$radius_com/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#084B8A", fillOpacity = 0.7, color = "#084B8A") amart ``` ### {data-height=100} ```{r reun_com, echo=FALSE, fig.align="center"} areun <- addPolygons(map = m, data = FR_reun_COM, fillColor = ~pal(log_COM_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_com_reun, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) areun <- addCircleMarkers(map = areun, lng = FR_reun_COM$long, lat = FR_reun_COM$lat, radius = FR_reun_COM$radius_com/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#084B8A", fillOpacity = 0.7, color = "#084B8A") areun ``` ### {data-height=100} ```{r guya_com, echo=FALSE, fig.align="center"} aguya <- addPolygons(map = m, data = FR_guya_COM, fillColor = ~pal(log_COM_cumul12_evo_12), weight = 1, opacity = 3, color = "black", label = etiq_com_guya, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "11px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) aguya <- addCircleMarkers(map = aguya, lng = FR_guya_COM$long, lat = FR_guya_COM$lat, radius = FR_guya_COM$radius_com/2000, weight = 1, stroke = T, opacity = 0.7, fill = T, fillColor = "#084B8A", fillOpacity = 0.7, color = "#084B8A") aguya rm(list=ls(pattern=".*CUM.*")) rm(list=ls(pattern=".*etiq.*")) rm(list=ls(pattern=".*FR_.*")) rm(list=ls(pattern=".*popup.*")) rm(list=ls(pattern=".*REG_.*")) ``` Cartes
Hauts-de-France ===================================== ```{r données_cartes_région-EPCI, echo=FALSE, fig.align="center", results="hide"} # Carte EPCI 2018 ----- aut <- readWorksheetFromFile("Sit@del2_log_mens_EPCI.xls",sheet="Autorisés") com <- readWorksheetFromFile("Sit@del2_log_mens_EPCI.xls",sheet="Commencés") aut <- gather(aut,"MOIS","AUT",3:26) aut$MOIS <- as.character(aut$MOIS) aut$MOIS <- str_sub(aut$MOIS,-6) com <- gather(com,"MOIS","COM",3:26) com$MOIS <- as.character(com$MOIS) com$MOIS <- str_sub(com$MOIS,-6) data_epci <- cbind(aut,com) data_epci <- data_epci[-c(5:7)] %>% arrange(CODE_EPCI,MOIS) %>% mutate_if (is.numeric, funs (cum12 = roll_sumr (., n = 12))) %>% mutate_at (vars (ends_with ("cum12")), funs (evo12 = 100 * . / lag (., 12) - 100)) %>% filter(MOIS=="202001") data_epci$CODE_EPCI <- str_sub(data_epci$CODE_EPCI,-9) data_epci$AUT_cum12 <- format(data_epci$AUT_cum12,big.mark = " ") data_epci$COM_cum12 <- format(data_epci$COM_cum12,big.mark = " ") epci19 <- readOGR("P:/services/SIDDEE/PAD/Publications/Sitadel2/Locaux/PgmR/Locaux_résultats_chiffrés", layer="EPCI_19") epci19_bis <- spTransform(epci19, "+init=epsg:4326") epci19_int <- merge(epci19_bis,data_epci, by="CODE_EPCI") popup_aut <- sprintf("%s
Cumul 12 derniers mois : %s logts autorisés
évolution : %.1f %%", epci19_int$EPCI, epci19_int$AUT_cum12, epci19_int$AUT_cum12_evo12) %>% lapply(htmltools::HTML) popup_com <- sprintf("%s
Cumul 12 derniers mois : %s logts commencés
évolution : %.1f %%", epci19_int$EPCI, epci19_int$COM_cum12, epci19_int$COM_cum12_evo12) %>% lapply(htmltools::HTML) ``` Row {data-height=15} ------------------------------------------------------------------ Row {data-height=30} ------------------------------------------------------------------ ###
LOGEMENTS AUTORISÉS 
  HAUTS-de-FRANCE par EPCI
  Résultats à fin ```r AUT[nrow(AUT),1]```
évolution : douze derniers mois par rapport aux douze mois précédents
###
LOGEMENTS COMMENCÉS 
  HAUTS-de-FRANCE par EPCI
  Résultats à fin ```r AUT[nrow(AUT),1]```
évolution : douze derniers mois par rapport aux douze mois précédents
Row ------------------------------------------------------------------ ### ```{r epci_aut, echo=FALSE, fig.align="center"} # AUTORISÉS m <- leaflet() m <- addTiles(map = m) bins <- c(-150,-100,-75,-50,-25,0,25,50,75,100,150, Inf) tauporange <- c("#30291E","#877C69","#B7AC99","#D2C9B9","#E8E0D4", "#FFEB97","#FFC970","#FFA749","#FF7A16","#F84E00","#E50000") pal <- colorBin(tauporange, domain = data_epci$AUT_cum12_evo12, bins = bins) a <- addPolygons(map = m, data = epci19_int, fillColor = ~pal(AUT_cum12_evo12), weight = 1, opacity = 3, color = "black", label = popup_aut, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "15px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) %>% addLegend(pal = pal, values = bins, opacity = 0.5, title = "évolution", position = "bottomleft", labFormat = labelFormat(suffix = "%")) a ``` ### ```{r epci_com, echo=FALSE, fig.align="center"} # COMMENCÉS c <- addPolygons(map = m, data = epci19_int, fillColor = ~pal(COM_cum12_evo12), weight = 1, opacity = 3, color = "black", label = popup_com, labelOptions = labelOptions(style = list("font-weight" = "normal", padding = "3px 8px"), textsize = "15px", direction = "auto"), fillOpacity = 0.5, highlight = highlightOptions(weight = 5,color = "#666", fillOpacity = 0.7, bringToFront = TRUE)) %>% addLegend(pal = pal, values = bins, opacity = 0.5, title = "évolution", position = "bottomleft", labFormat = labelFormat(suffix = "%")) c # Réalisation : DREAL Hauts-de-France, Service Information, Développement Durable et Évaluation Environnementale - Pôle Atelier des Données - Unité Statistique - Nicolas LESCASTREYRES et Franck LEQUESNE ```