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

creer_tableau_4_1(data, annee, titre, 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. par défaut "Projets de construction par tranche d’âge des maîtres d’ouvrage"

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_4_1(
data = indicateurs_eptb,
annee = 2023,
titre = "Projets de construction par tranche d\u2019\u00e2ge des ma\u00eetres d\u2019ouvrage",
add_scroll = FALSE
)
#> $viz
#> <table class="table" style="font-size: 12px; margin-left: auto; margin-right: auto;border-bottom: 0;">
#> <caption style="font-size: initial !important;">Projets de construction par tranche d’âge des maîtres d’ouvrage</caption>
#>  <thead>
#>   <tr>
#>    <th style="text-align:left;"> Tranches d’âge </th>
#>    <th style="text-align:right;"> Répartition des projets (%) </th>
#>    <th style="text-align:right;"> Prix moyen du projet (€) </th>
#>    <th style="text-align:right;"> Part du terrain dans le coût du projet (%) </th>
#>    <th style="text-align:right;"> Part des constructions destinées à l’habitation (%) </th>
#>   </tr>
#>  </thead>
#> <tbody>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> Moins de 30 ans </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 17,2 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 256 061 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 27,5 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 97,8 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> 30 à 39 ans </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> NA </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 319 268 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 32,0 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> NA </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> 40 à 49 ans </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> NA </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 329 900 </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;"> NA </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> 50 à 59 ans </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 15,0 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 334 114 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 31,1 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> NA </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(255, 255, 255, 255) !important;"> 60 ans et plus </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 18,7 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 329 830 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> 28,2 </td>
#>    <td style="text-align:right;background-color: rgba(255, 255, 255, 255) !important;"> NA </td>
#>   </tr>
#> </tbody>
#> <tfoot>
#> <tr><td style="padding: 0; " colspan="100%"><span style="font-style: italic;">Note: </span></td></tr>
#> <tr><td style="padding: 0; " colspan="100%">
#> <sup></sup> Un 's' remplace une valeur quand cette dernière a été masquée compte tenu du secret statistique et/ou de la qualité des données d'enquête.<br><br>Source : SDES, EPTB en 2023</td></tr>
#> </tfoot>
#> </table>
#> $tab_xls
#> # A tibble: 5 × 7
#>   Zone  millesime tranche_age part_projet cout_projet_moy part_prix_terrain_co…¹
#>   <chr> <chr>     <chr>             <dbl>           <dbl>                  <dbl>
#> 1 Bret… 2023      Moins de 3…        17.2          256061                   27.5
#> 2 Bret… 2023      30 à 39 ans        NA            319268                   32  
#> 3 Bret… 2023      40 à 49 ans        NA            329900                   32.1
#> 4 Bret… 2023      50 à 59 ans        15            334114                   31.1
#> 5 Bret… 2023      60 ans et …        18.7          329830                   28.2
#> # ℹ abbreviated name: ¹​part_prix_terrain_cout_projet
#> # ℹ 1 more variable: part_residence_princ <dbl>
#> 
#> $meta
#>        onglet                                                           titre
#> 1 tableau_4_1 Projets de construction par tranche d’âge des maîtres d’ouvrage
#>