<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Mapping location of air quality sensing in India
In this notebook, I'll show a quick example of how to use Folium (which internally uses LeafletJS) for visualising the location of air quality monitors in India. The purpose of this notebook is eductional in nature.
Standard Imports
Step1:  Downloading data from OpenAQ for 2018-04-06
Step2:  Downloading World GeoJson file
Step3:  Creating india.json correspdonding to Indian data
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
Explanation: Mapping location of air quality sensing in India
In this notebook, I'll show a quick example of how to use Folium (which internally uses LeafletJS) for visualising the location of air quality monitors in India. The purpose of this notebook is eductional in nature.
Standard Imports
End of explanation
!wget --no-check-certificate https://openaq-data.s3.amazonaws.com/2018-04-06.csv -P /Users/nipun/Downloads/
import pandas as pd
df = pd.read_csv("/Users/nipun/Downloads/2018-04-06.csv")
df = df[(df.country=='IN')&(df.parameter=='pm25')].dropna().groupby("location").mean()
df
Explanation: Downloading data from OpenAQ for 2018-04-06
End of explanation
!wget --no-check-certificate https://raw.githubusercontent.com/python-visualization/folium/master/examples/data/world-countries.json
Explanation: Downloading World GeoJson file
End of explanation
import json
e = json.load(open('world-countries.json','r'))
json.dump(e['features'][73], open('india.json','w'))
import folium
folium_map = folium.Map(width = '60%',height=800,location=[20, 77],
                        zoom_start=5,
                        tiles="Stamen Terrain",min_lat=7, max_lat=35, min_lon=73, max_lon=90)
for x in df.iterrows():
    name = x[0]
    lat, lon = x[1]['latitude'], x[1]['longitude']
    folium.CircleMarker([lat, lon], radius=5, color='#000000',fill_color='#D3D3D3' , fill_opacity=1).add_to(folium_map)
folium.GeoJson('india.json').add_to(folium_map)
folium_map
Explanation: Creating india.json correspdonding to Indian data
End of explanation
<END_TASK>