This project aims to perform exploratory data analysis (EDA) using visualizations on the floods in Pakistan. The goal is to extract insights and patterns from the flood data and create meaningful visualizations to better understand the situation. The project involves data scraping, data preprocessing, and data visualization using Python libraries like Selenium matplotlib and Seaborn.
The latest data on the flood situation in Pakistan was collected from multiple sources, including the National Disaster Management Authority ISLAMABAD (NDMA), Pakistan Bureau of Statistics and ICIMOD. The data was collected using web scraping techniques with Python libraries like Selenium.
The collected data was preprocessed by removing duplicates, handling missing values, and transforming the data into a usable format. The data was then cleaned and processed to create visualizations.
The data was analyzed using visualizations like bar charts and piecharts. The visualizations were used to identify patterns, trends, and outliers in the data. The analysis revealed that the floods in Pakistan have affected millions of people, causing widespread damage to infrastructure, agriculture, and homes.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need to have Python 3.x installed on your machine. You can download the latest version of Python here.
You will also need to have Anaconda on your machine. You can download the latest version of Anaconda here.
Clone this repository onto your local machine.
git clone https://github.com/MuhammadAhmedSuhail/EDA-on-Pakistan-Floods.git
Run scrape.ipynb
for web scraping from all sources and Run analysis.ipynb
for Data Analysis
The key findings of the data analysis show that the floods in Pakistan have caused significant damage and displacement, with over 20 million people affected and more than four million homeless. The analysis also revealed that the floods have caused damage to infrastructure, agriculture, and homes, with billions of dollars needed for recovery efforts. The visualizations provided insights into the scale and impact of the floods, which can be used to guide relief efforts and policy decisions.
We can see that all provinces this year experienced more than 30-year average rainfall, and this had a significant impact on the whole country where our northern provinces and southern provinces both experienced the worst flood in history and the main reason for that is increased rainfall and melting glaciers. Both contributed to the rising water levels in our rivers thus making a flood.
Due to the severity of this flood, this country unfortunately faced many deaths majority of them in Sindh, we can see that a big portion of deaths in Sindh is of children, followed by death of men and then women. Islamabad and GB faced small number of deaths during these floods. A total of 1541 people died in which Sindh had 680 deaths while Baluchistan and KP had around 300, Punjab had just over 200, AJ&K had 40 while GB had around 20 and ICT had only 1 death
We can see that Sindh not only has the highest number of deaths but also the highest number of injuries and a large portion of it is comprised by children followed by males. Punjab has the second highest rate of injury just under 4000 with a large portion of it comprised of male injuries.
Just like deaths and injuries Sindh is the most effected by Flood in terms of Road Damage too with over 8000 roads being destroyed by flood, this flood had a little impact on other provinces because Baluchistan, KP and Punjab faced little damage while ICT, GB and AJ&K had no damage by this flood.
Sindh and KP faced a lot of bridge damage due to this flood with over 100 bridges destroyed it made mobility harder which means that the relief team had trouble rescuing and reaching people in affected areas. Balochistan and Punjab faced moderate amount of damage and ICT and AJ&K faced no damage.
Balochistan was the most effected in terms of livestock with over 250K animals lost due to flooding following this Punjab and Sindh both had around 200K animals lost due to the flood. Thankfully there were no animals lost in the northern areas and ICT.
Sindh had to face one of the worst infrastructural damages in history of Pakistan as around a million people had their homes partially destroyed and around 700K people’s homes were fully destroyed due to the flood. There was very less impact of flood on other provinces as on average only 15K homes were lost in other provinces
Many districts in Sindh had a huge loss of rice production, the aftereffects of something with this magnitude will send shockwaves to our agriculture exports and local market for years to come. As the total loss of rice production is way over a two million metric tones, to fill in the demand we will have to import this much and this would be something which will negatively impact the country’s economy
Similarly, we faced a huge loss in our cotton produce this year due to the floods, with production loss way over a million bales to fill in this demand we will have to not only import the deficit, but we won’t be able to export enough to keep the economy stable, later this would play a major role in the decline of our country’s economy.
Around 50% of the districts producing sugarcane lost over a million metric tones each that would take the total of production loss around 10 million metric tones only from Sindh as a country whose backbone is agriculture, we have suffered a great loss we now can’t only export this but to meet the demand of the local market we would have to import impacting our economy negatively
Not only did we face loss of production, but we also faced loss of land, that land was used by people for commercial activities, residence or even agriculture but that land is still not available for any of those activities as it is drenched in flood water.
Four main districts faced the most loss of land i.e., Jaffarabad, Musakhel, Jhal Masgsi and Lehri, they had around 1000 km^2 area under flood water while the other districts had little to no loss of land
Only Dera Ismail Khan faced a considerable amount of loss of land which is about 1750 km^2 while the other districts faced little to no damage.
Majority of the land in Punjab has been affected by Flood water, Rajanpur and Dera Ghazi Khan were the two districts which were the most effected around 1500 km^2 land is under flood water.
Around 40% of the districts had 2500km^2 of area under flood water the rest of the districts had moderate land damages.
As people living in northern and southern parts are affected by flood meaning that their houses, and livelihoods being destroyed by flood water they rush to a safer area with their families and as this flood increases the people will be heading to middle areas of this country which are still safe from flood water. This will increase the influx of people in only a selected few areas which would give rise to a lot of problems like overcrowding.
Jaffarabad and Musakhel were the most effected in Balochistan thus will force people to migrate to other areas within the province.
Sialkot was the most effected in Punjab and it is likely that people living there will be forced to migrate to other areas.
Over 250K people in Dera Ismail Khan were affected by this flood which means that its likely people would migrate to other areas in this province.
Around 50% of the districts in Sindh were largely affected by this flood which means that we can except mass migration from this province. The people will likely migrate within the province to other areas
As we have seen before how this country’s produce and land has been badly affected by this flood it has also had an impact on other food items as we can see that as soon as flood hit this country there is a rise on essential items in this country. We see that Tomatoes’ price increased by 50% in a week followed by price increase in other items.
As we have seen before Sindh had suffered the most in terms of infrastructure, people, crops and land so it got the most relief to support that, Sindh got over 14 billion PKR while the other provinces got around 3 billion each as relief.
The major reason for this flood was increased rainfall due to climate change, The amount of rainfall Pakistan faced this year had not been seen for the past 30 years due to this Pakistan is currently facing floods. The initial damage of this was that many people in lower areas of Pakistan had died or were injured especially the people in Sindh. After this the infrastructure like roads, bridges or houses were damaged most of which was experienced in Sindh then Balochistan faced the most loss in livestock. Crops worth over 15 million tones were lost this year due to floods in Sindh. The aftereffects of this flood include diseases, mass migration and inflation in food prices as Pakistan’s economy benefits from agriculture exports, this year we would see the impact of this flood on our economy and our local market as we would struggle to fill in the deficit it would take us years to undo the damage done to our agriculture.
- Muhammad Ahmed Suhail ( Founder and CEO DatumDive )