From fc828baa9d6ea877d2fb931ee22265af83d6446e Mon Sep 17 00:00:00 2001
From: Christine Gallais Jouadet
 <christine.gallais-jouadet@developpement-durable.gouv.fr>
Date: Thu, 16 Jan 2025 15:52:54 +0100
Subject: [PATCH] =?UTF-8?q?Int=C3=A9gration=20des=20Actions=20Coeur=20de?=
 =?UTF-8?q?=20Ville=20en=20base?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ANCT/CDV.Rmd | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 ANCT/CDV.Rmd

diff --git a/ANCT/CDV.Rmd b/ANCT/CDV.Rmd
new file mode 100644
index 0000000..366f72d
--- /dev/null
+++ b/ANCT/CDV.Rmd
@@ -0,0 +1,46 @@
+---
+title: "CDV"
+author: "christine.gallais-jouadet"
+date: "`r Sys.Date()`"
+output: html_document
+---
+
+```{r setup, include=FALSE}
+knitr::opts_chunk$set(echo = TRUE)
+
+#remotes::install_github("MaelTheuliere/COGiter")
+library(COGiter)
+#remotes::install_gitlab('dreal-pdl/csd/collectr', host="gitlab-forge.din.developpement-durable.gouv.fr")
+library(collectr)
+#remotes::install_gitlab('dreal-pdl/csd/datalibaba', host = "gitlab-forge.din.developpement-durable.gouv.fr")
+library(datalibaba)
+library(DBI)
+library(dplyr)
+#devtools::install_github("hadley/emo")
+library(emo)
+library(httr)
+library(readxl)
+library(RPostgres)
+library(sf)
+
+knitr::opts_chunk$set(echo=TRUE, message = FALSE, warning = FALSE, error = FALSE, cache=TRUE, eval=FALSE)
+
+library(tidyverse)
+
+```
+# Chargement des données Action coeur de ville sur datagouv
+ 
+```{r}
+acv <- read_delim(file = "https://static.data.gouv.fr/resources/programme-action-coeur-de-ville/20241205-103920/liste-acv-com2024-20241202.csv")
+```
+# Chargement SGBD
+```{r}
+datalibaba::poster_data(data = acv,
+                        table = "n_acv_000",
+                        schema = "sial_zonages_habitat",
+                        db = "production",
+                        overwrite = TRUE,
+                        pk = "insee_com",
+                        user = "does")
+```
+
-- 
GitLab