Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit db9a605

Browse files
requested changes made
1 parent 943b055 commit db9a605

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎Air pollution prediction/code.py‎ renamed to ‎Air pollution prediction/CodeAP.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import requests
22
import matplotlib.pyplot as plt
3-
city = input("Enter your city name")
3+
city = input("Enter you city : ")
44
url = 'http://api.waqi.info/feed/' + city + '/?token='
5-
api_key = input("Enter you API key here")
5+
api_key = input("Enter your API key: ")
66

77
main_url = url + api_key
88
r = requests.get(main_url)
99
data = r.json()['data']
1010
aqi = data['aqi']
1111
iaqi = data['iaqi']
1212

13-
deliaqi['p']
13+
1414

1515
for i in iaqi.items():
1616
print(i[0],':',i[1]['v'])
@@ -29,7 +29,6 @@
2929
print('sulphur :',so2)
3030
print('pm10 :',so2)
3131
print('pm25 :',pm25)
32-
3332
pollutants = [i for i in iaqi]
3433
values = [i['v'] for i in iaqi.values()]
3534

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /