Professional Documents
Culture Documents
Exploratory Analysis
Exploratory Analysis
In this section we will explore data associated with climate vulnerability assessment of a river
basin system. At the end of this section of chapter you will be able to;
First step towards performing climate vulnerability assessment of a river basin system is to
explore the historical data for the system under consideration. We will scan through the inflow
data at the sukkur barrage. The objectives of this part are to; i) Calculate the Descriptive
statistics; and ii) Perform drought analysis using deviation method.
We will use pandas package in python (http://pandas.pydata.org/) to perform the analysis. The
first step to move forwards is to get started with pandas and get use to of the functions that can
help us to explore the flow time series.
Getting started [30 mins]
Steps below will help you to get familiarize with the functions in pandas package. You will use
these functions for perform the task to achieve the objectives.
97
Now in Step 01 write the following code, you only have to write that do not have # in
start. This will import all required functions from the packages required for this exercise
Now in Step 02 write the following code. This will import data file and index the dates as
unique values
98
Now in Step 03 write the following code. This will let you to print data and plot the time
series and save it as a figure
Now in Step 04 write the following code. This will let you to calculate the summary
statistics and individual statistical parameters
Now in Step 05 write the following code. This will let you to query and create new
columns in data frame
Now in Step 06 write the following code. This will let you group the data by year
99
Task # 1 [30 mins]
Calculate the following statistical parameters for each year for the given dataset.
Min Max Range Mean Stdev Skew
100
Task # 2 [30 mins]
Perform drought analysis using deviation method and fill the following table;
Q Qmean
Dev 100
Qmean
3. Use following criteria to decide the years
S. No Years Deviation Range
Open Task2.py for guidelines. Write the script in Task2.py and save.
101