# Morocco Electricity Consumption Analysis for the year 2017
### Project Overview
This project focuses on analysing electricity consumption patterns across three zones in Morocco using Power BI. The primary objective is to gain actionable insights into how electricity is consumed over time, how consumption varies across different regions, and how external factors such as temperature influence energy demand.
### Data Source
The dataset used in this analysis contains detailed records of electricity consumption and related environmental conditions across three zones in Morocco. The data was collected at 10-minute intervals, providing high-resolution insights into energy usage patterns over time. The dataset was assessed from the Maven Analytics website.
Download Here
### Tools
- Power Query
- PowerBI
### Data Cleaning/Preparation
In carrying out the analysis, Power Query and PowerBI were used exclusively. The .csv file was imported into PowerBI, then transformed and analysed. The steps followed during the analysis process are listed below.
1. The datetime column was separated into separate columns, date, and time, to each contain the date and time data in that order.
2. Renamed Columns for better readability.
3. Set the proper data type for each column.
4. Created a new column, weekday, to include the day of the week each data was collected e.g. Monday, Tuesday etc. Another column was created labeled ‘weekday num’, which stores the numeric value of each day of the week, i.e. 1 for Sunday, 2 for Monday. This was used in sorting the Weekday column.
5. Data analysis expressions (DAX) was written to create some calculated measures needed for analysis. Measures created are:
- Average hourly consumption – to determine the trend of consumption hourly
- Average weekly consumption - to determine the trend of consumption weekly
- mom % growth – to determine the growth or decline rate of consumption across months
- total consumption – to determine the total usage. …