Uploaded by Sejal Hirpara

CODE DAIGRAM C197

advertisement
Chemical formula for water is ​H​2​O
Chemical formula for Oxygen is ​O₂
Similarly the column which we will be using are ● SO2 - Sulfur dioxide
● CO - Carbon monoxide
● UVB - UVI - Ultraviolet index
Sample Heatmap
Conclusion - ​looking at the heatmap we can say that in year 1960 during
july and august most number of passengers travelled via airplane
Activity 1
Objective - Plot a heatmap to show maximum UVB value throughout
various different times of the day
1. Import all the libraries and read the data from the csv file and
store it in a variable
Dataframe:
2. Add 2 new columns to the dataframe
Output:
3. Clean the data by replacing the null, 0 and values ending with #
to nan values
Running the above code might take some time as we are replacing
many things
4. Set the type of 'UVB' column to float
Output:
Ignore the warning!
5. groupby the month and time for getting the maximum of UVB
value
Output:
6. Plot a heatmap to show the UV value for through various times
of the day
Plot:
Conclusion - In the month of 5th to 8th (i.e from May to August)
at the time between 11 am to 1 pm, the UVB rays can affect
people the most and may lead to sun burn and skin cancer.
Activity 2
Objective - Plot a heatmap to show when the air was most clean as
per release of Carbon monoxide and Sulfur dioxide at various
different times of the day
1. Clean the data by replacing the null, 0 and values ending with x
to nan values
Running the above code might take some time as we are replacing
many things
2. Set the type of 'SO2' column to float
Output:
Ignore the warning!
3. Set the type of 'CO' column to float
Output:
Ignore the warning!
4. Groupby the month and time for getting the maximum of CO and
SO2
Output:
5. Plot a heatmap to show the the amount of carbon monoxide
release through various different times of the day
Plot:
Conclusion - In the month of 3th to 7th (i.e from March to July)
between 12 pm to 2 pm the air contained least amount of Carbon
monoxide
6. Plot a heatmap to show the amount Sulfur dioxide released
through various different times of the day
Plot:
Conclusion - In the month of 1st to 5th (i.e from January to May)
between 11 am to 4 pm the air contained least amount of carbon
monoxide
7. Plot both the amount of carbon monoxide and sulfur dioxide
released during different hours of the day and find the time and
month during which both the gases where at its minimum which
is clean air
Plot -
Conclusion - In the month of 1st to 6th (i.e from January to June)
between 11 am to 4 pm the air was the most cleanest
Additional information All the column mentioned in the dataset are ●
●
●
●
●
SO2 - Sulfur dioxide
CO - Carbon monoxide
O3 - ozone
NOx - Nitrogen oxides
NO - Nitric oxide
●
●
●
●
●
●
●
NO2 - Nitrogen dioxide
THC - Total Hydrocarbons
NMHC - Non-Methane Hydrocarbon
CH4 - Methane
UVB - UVI - Ultraviolet index
AMB_TEMP - Ambient air temperature
RAINFALL - mm
Download