Logements modif
Compare changes
- Marguerite de La Tullaye authored
+ 54
− 190
select sum(st_area(wkb_geometry::geography)::float)/1000000 from ign_region where insee_reg != '03';
where code_insee_commune_actualise in ('2B029','2B030','2B033','2B037','2B042','2B043','2B046','2B086','2B107','2B109','2B120','2B136','2B148','2B152','2B159','2B170','2B183','2B184','2B185','2B187','2B188','2B205','2B224','2B223','2B230','2B233','2B239','2B257','2B261','2B265','2B298','2B301','2B305','2B309','2B314','2B281','2B287','2B327','2B332','2B333','2B353','2B058','2B172','2B178','2B350')
SELECT classe_consommation_energie, coalesce(a.annee_2021, 0) as annee_2021, coalesce(a.annee_2022, 0) as annee_2022, coalesce(a.annee_2023, 0) as annee_2023 FROM (
$$SELECT d.etiquette_dpe, LEFT(d.date_etablissement_dpe,4) as annee_etablissement_DPE, coalesce(count(DISTINCT d.ndpe), 0) as nb_dpe
/datacirco/notebooks/datacirco/modules_data/logement_data.py:314: UserWarning: pandas only supports SQLAlchemy connectable (engine/connection) or database string URI or sqlite3 DBAPI2 connection. Other DBAPI2 objects are not tested. Please consider using SQLAlchemy.
df_logement_pre_2021 = pd.read_sql(sql=sql1, con=self.db.connection).rename(columns = {"annee_2021" : "annee_2021_avant"})
/datacirco/notebooks/datacirco/modules_data/logement_data.py:316: UserWarning: pandas only supports SQLAlchemy connectable (engine/connection) or database string URI or sqlite3 DBAPI2 connection. Other DBAPI2 objects are not tested. Please consider using SQLAlchemy.
df_logement_post_2021 = pd.read_sql(sql=sql2, con=self.db.connection).rename(columns = {"annee_2021" : "annee_2021_apres"})
SELECT classe_ges, coalesce(a.annee_2021, 0) as annee_2021, coalesce(a.annee_2022, 0) as annee_2022, coalesce(a.annee_2023, 0) as annee_2023 FROM (
$$SELECT d.etiquette_ges, LEFT(d.date_etablissement_dpe,4) as annee_etablissement_GES, coalesce(count(DISTINCT d.ndpe), 0) as nb_dpe