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

creer_tableau_2_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_2_1(
data = indicateurs_eptb,
annee = 2023,
titre = "Évolution des prix et des surfaces",
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 prix et des surfaces en Bretagne </caption>
#>  <thead>
#>   <tr>
#>    <th style="text-align:left;"> Zone </th>
#>    <th style="text-align:right;"> Prix des terrains (en €/m²) en 2023 </th>
#>    <th style="text-align:right;"> Évolution du prix des terrains 2023 / 2022 (en %) </th>
#>    <th style="text-align:right;"> Évolution du prix des terrains 2023 / 2018 (en %) </th>
#>    <th style="text-align:right;"> Surface moyenne achetée (en m²) en 2023 </th>
#>    <th style="text-align:right;"> Évolution de la surface moyenne achetée 2023 / 2022 (en %) </th>
#>    <th style="text-align:right;"> Évolution de la surface moyenne achetée 2023 / 2018 (en %) </th>
#>   </tr>
#>  </thead>
#> <tbody>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> Côtes-d'Armor </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 104 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 13,0 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 18,2 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 940 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -1,2 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 3,4 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> Finistère </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 102 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 13,3 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 12,1 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 957 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -4,7 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 7,8 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> Ille-et-Vilaine </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 100 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 9,9 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 16,3 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 929 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -4,3 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -1,4 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> Morbihan </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 99 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 12,5 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 11,2 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 934 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> -8,1 </td>
#>    <td style="text-align:right;font-weight: bold;background-color: rgba(255, 255, 255, 255) !important;"> 2,5 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;background-color: rgba(229, 229, 229, 255) !important;"> Bretagne </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 101 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 12,2 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 14,8 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 940 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> -5,0 </td>
#>    <td style="text-align:right;background-color: rgba(229, 229, 229, 255) !important;"> 3,0 </td>
#>   </tr>
#>   <tr>
#>    <td style="text-align:left;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> France métropolitaine </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> 100 </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> 8,7 </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> 16,3 </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> 953 </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> -2,4 </td>
#>    <td style="text-align:right;font-style: italic;background-color: rgba(196, 196, 196, 255) !important;"> 2,0 </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: 6 × 9
#>   TypeZone     Zone                 millesime prix_moy_m2 evolution_prix_moy_m…¹
#>   <chr>        <chr>                <chr>           <dbl>                  <dbl>
#> 1 Départements Côtes-d'Armor        2023              104                   13  
#> 2 Départements Finistère            2023              102                   13.3
#> 3 Départements Ille-et-Vilaine      2023              100                    9.9
#> 4 Départements Morbihan             2023               99                   12.5
#> 5 Régions      Bretagne             2023              101                   12.2
#> 6 France       France métropolitai… 2023              100                    8.7
#> # ℹ abbreviated name: ¹​evolution_prix_moy_m2_1an
#> # ℹ 4 more variables: evolution_prix_moy_m2_5ans <dbl>, surf_moy <dbl>,
#> #   evolution_surf_moy_1an <dbl>, evolution_surf_moy_5ans <dbl>
#> 
#> $meta
#>        onglet                              titre
#> 1 tableau_2_1 Évolution des prix et des surfaces
#>