Power cuts in Bangalore happen for many reasons.
- Rain
- Scheduled maintenance downtime
- Overload
- Load shedding
The goal is to understand which of the reasons causes majority power cuts.
As someone who has lived in Bangalore for over 6 years, here are some things i have observed over a period of time:
- Scheduled maintenance causes 10% or less power cuts per month (depending on the area, if there is a maintenance planned, else the value for this factor would be 0%).
- Less then 40% power cuts in a month are the result of rain.
- Rest of the power cuts are due to Load shedding or Overload in subdivisions due to bad infrastructure.
- Twitter for user complains.
- BESCOM's site for monthly maintenance schedules.
- OpenWeather API for historic montly data.
- Tweet can contain only insults or sarcasm and no location.
- Tweets can contain sarcasm and location.
- Tweets can contain only pincode.
- Tweets can contain only location (correct spelling).
- Tweets can contain only location (incorrect spelling).
- Tweets can contain location(incorrect spelling) and pincode.
- Tweets can contain location(correct spelling) and pincode.
- Tweets can contain only appreciation.
- Tweets in local language, Kannada.
- Point 1 and 8 are of no use to us.
- Point 3, did not visit in stage 1 analysis
- Point 6 & 7, partly covered in stage 1 analysis (no Pincode analysis)
- Point 9, did not visit in stage 1 analysis
This is because to source data for scheduled downtime, BESCOM only provides monthly excel files. The older months data is deleted from public eye. Hence we can do October months Analysis once October ends. This is because we need to wait for the month to end to scrape tweets from twitter.
To understand which areas have been the most affected (extracted from complains on twitter), i webscrapped data from 01/01/2022 until 30/09/2022. (you can find the cleaned data with just locations,date and time in the repo)
The process here is straight forward. I took down all the localities of bangalore and made a list out of them. Then we itterate through the tweets till we extract our locations. Create an aggregate of all the locations and plot them in a visual.
The problem with my current approach is that it uses partial string matching so i had to re arrange few location name in the list so it would correctly extract the locations. After some manipulation, i achieved 90% accuracy.
I then created 2 datasets, one raw, and the other grouped.
- Grouped: locations with similar names like 'Koramangala 5th Block', 'Koramangala 8th Block' are now both under the alias 'Koramangala'.Not only this, but also smaller localities falling within bigger locations are grouped under the parent.
- Raw contains locations name as written by users on twitter.
Note: Also cleaned up any typos/incorrect spellings directly in excel. This is captured in the grouped dataset.
Tableau Dashboard: Grouped | Raw
Findings from Stage 1:
- Locations with very high population also resulted in many more complains on twitter.
- Just because one location as less complains does not mean it has less power cuts, but rather fewer people live in such locations to complain on twitter or are unaware of BESCOM's presence on twitter or do not use twitter.
WORK IN PROGRESS
- Use NLP and create a custom model to capture local locations.
- Ability to capture pincode and map to a location.
- Create pincode attribute in CSV and load in Tableau/Power BI to create a heat map of Bangalore City