Mise en page du tableau du chapitre 1 au format html.

creer_tableau_1_1(data, annee, titre, note_de_lecture, add_scroll)

Arguments

data

La table d'indicateurs préparée par dataprep() selon les inputs de l'utilisateur.

annee

Le millesime renseigné par l'utilisateur.

titre

une chaine de caractère si vous voulez ajouter un titre spécifique.

note_de_lecture

une chaine de caractère si vous voulez ajouter une note de lecture en dessous des sources

add_scroll

un booleen pour indique si l'on souhaite inserer une scrollbox. (par défaut FALSE)

Value

Un tableau mis en page au format html.

Examples

indicateurs_eptb <- lire_eptb_exemple()
creer_tableau_1_1(
data = indicateurs_eptb,
annee = 2023,
titre = "Évolution des projets de construction de maisons individuelles",
add_scroll = FALSE,
note_de_lecture = ""
)
#> $viz
#> <table class="table" style="font-size: 12px; margin-left: auto; margin-right: auto;border-bottom: 0;">
#> <caption style="font-size: initial !important;">Évolution des projets de construction de maisons individuelles en Bretagne</caption>
#>  <thead>
#>   <tr>
#>    <th style="text-align:left;"> Zone </th>
#>    <th style="text-align:right;"> Nombre de projets </th>
#>    <th style="text-align:right;"> Part dans le total du territoire (en %) </th>
#>    <th style="text-align:right;"> Évolution entre 2023 et 2022 (en %) </th>
#>    <th style="text-align:right;"> Évolution entre 2023 et 2018 (en %) </th>
#>   </tr>
#>  </thead>
#> <tbody>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> Côtes-d'Armor </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 1 624 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 19,3 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -32,1 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -9,4 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> Finistère </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 2 389 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 28,3 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -26,6 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -14,8 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> Ille-et-Vilaine </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 2 085 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 24,7 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -35,9 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -31,6 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> Morbihan </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 2 337 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 27,7 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -34,7 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> -30,0 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(229, 229, 229, 255) !important;"> Communes de densité intermédiaire </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 1 766 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 20,9 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -37,3 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -44,3 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(229, 229, 229, 255) !important;"> Communes densément peuplées </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 301 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 3,6 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -40,5 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -45,3 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(229, 229, 229, 255) !important;"> Communes rurales </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 6 368 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 75,5 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -30,4 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -12,3 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> Bretagne </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 8 435 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 100,0 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -32,4 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -23,2 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(196, 196, 196, 255) !important;"> France métropolitaine </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(196, 196, 196, 255) !important;"> 69 766 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(196, 196, 196, 255) !important;"> 100,0 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(196, 196, 196, 255) !important;"> -36,1 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(196, 196, 196, 255) !important;"> -34,8 </td>
#>   </tr>
#> </tbody>
#> <tfoot><tr><td style="padding: 0; " colspan="100%">
#> <sup></sup> Source : SDES, EPTB en 2023</td></tr></tfoot>
#> </table>
#> $tab_xls
#> # A tibble: 9 × 7
#>   TypeZone     Zone                   millesime nb_projet evolution_nb_projet_…¹
#>   <chr>        <chr>                  <chr>         <dbl>                  <dbl>
#> 1 Départements Côtes-d'Armor          2023          1624.                  -32.1
#> 2 Départements Finistère              2023          2389.                  -26.6
#> 3 Départements Ille-et-Vilaine        2023          2085.                  -35.9
#> 4 Départements Morbihan               2023          2337.                  -34.7
#> 5 Densité      Communes de densité i… 2023          1766.                  -37.3
#> 6 Densité      Communes densément pe… 2023           301.                  -40.5
#> 7 Densité      Communes rurales       2023          6368.                  -30.4
#> 8 Régions      Bretagne               2023          8435.                  -32.4
#> 9 France       France métropolitaine  2023         69766.                  -36.1
#> # ℹ abbreviated name: ¹​evolution_nb_projet_1an
#> # ℹ 2 more variables: evolution_nb_projet_5ans <dbl>, part <dbl>
#> 
#> $meta
#>        onglet                                                          titre
#> 1 tableau_1_1 Évolution des projets de construction de maisons individuelles
#>