This is a script which I developed for DataMeet Pune which takes an .xls file which has rainfall data of India and generates state-wise .csv files in an unpivoted format which can be useful for further analysis.
Look at the unpivoting example.xlsx file and this link you'll get a hang of what the script does. :)
Source of Data: http://www.indiawaterportal.org/articles/district-wise-monthly-rainfall-data-list-raingauge-stations-india-meteorological-department
Issues with the Raw data: Chandigarh
data is given under Chhattisgarh
sheet. A sepreated sheet had to be manually created so that the script can run smoothy on the .xls file.
- You'll have to choose the
.xlsx
file which has to be processed. However the code does have manual logic as well which can be uncommented and you can create .CSV files of specific sheets instead of the all the sheets in the .xls file. - The
.csv
file would be store in the./Processed-Data
folder and You'll have to manually add"Sr.No",
to the start of the .csv file.
- A choropleth map of the country with a timeline, the colours changing to show amount of rainfall.
- A predective model for drought detection can be created.