Project.Map.ConsumptionBy module

class Project.Map.ConsumptionBy.ConsumptionBy[source]

Bases: object

This class create a dataframe which provide the French electricity consumption from 2019 to 2021 by department or regions.

It uses two data from the following websites:

INSEE data: https://www.insee.fr/fr/information/5057840

ENEDIS data: https://data.enedis.fr/explore/dataset/consommation-annuelle-residentielle-par-adresse/information/

getDataFast()[source]

Take the data that is already created and stored in the ./DataSet repository. Please prefer this attribute to get the data.

Parameters

collectivity (str) – ‘DEP’ or ‘REG’

Returns

csv file with the consumption by collectivity

Return type

pandas.Series

getDataSlow()[source]

Create the data using those from the website specified above.

Warning

Be Careful! It takes around 8 minutes to create it, but the data will be up to date.

Parameters

collectivity (str) – ‘DEP’ or ‘REG’

Returns

csv file with the consumption by collectivity

Return type

pandas.Series