#地区改为自己所在地区

#导入数据库
import pandas as pd
import numpy as np

#设置表头
header=['日期','时间','市县(区)','省份','温度','湿度','气候','气候(英)','气候代码','空气质量(AQI)','PM2.5计算的空气质量','气压','能见度','风力','风力等级','风速','实时降水量','24小时降水量']
#将每天天气读出
data1 = pd.read_csv('weatherdata2022-10-01.csv',names=header)
data2 = pd.read_csv('weatherdata2022-10-02.csv',names=header)
data3 = pd.read_csv('weatherdata2022-10-03.csv',names=header)
data4 = pd.read_csv('weatherdata2022-10-04.csv',names=header)
data5 = pd.read_csv('weatherdata2022-10-05.csv',names=header)
data6 = pd.read_csv('weatherdata2022-10-06.csv',names=header)
data7 = pd.read_csv('weatherdata2022-10-07.csv',names=header)
data8 = pd.read_csv('weatherdata2022-10-08.csv',names=header)
data9 = pd.read_csv('weatherdata2022-10-09.csv',names=header)
data10 = pd.read_csv('weatherdata2022-10-10.csv',names=header)
data11 = pd.read_csv('weatherdata2022-10-11.csv',names=header)
data12 = pd.read_csv('weatherdata2022-10-12.csv',names=header)
data13 = pd.read_csv('weatherdata2022-10-13.csv',names=header)
data14 = pd.read_csv('weatherdata2022-10-14.csv',names=header)
data15 = pd.read_csv('weatherdata2022-10-15.csv',names=header)
data16 = pd.read_csv('weatherdata2022-10-16.csv',names=header)
data17 = pd.read_csv('weatherdata2022-10-17.csv',names=header)
data18 = pd.read_csv('weatherdata2022-10-18.csv',names=header)
data19 = pd.read_csv('weatherdata2022-10-19.csv',names=header)
data20 = pd.read_csv('weatherdata2022-10-20.csv',names=header)
data21 = pd.read_csv('weatherdata2022-10-21.csv',names=header)
data22 = pd.read_csv('weatherdata2022-10-22.csv',names=header)
data23 = pd.read_csv('weatherdata2022-10-23.csv',names=header)
data24 = pd.read_csv('weatherdata2022-10-24.csv',names=header)
data25 = pd.read_csv('weatherdata2022-10-25.csv',names=header)
data26 = pd.read_csv('weatherdata2022-10-26.csv',names=header)
data27 = pd.read_csv('weatherdata2022-10-27.csv',names=header)
data28 = pd.read_csv('weatherdata2022-10-28.csv',names=header)
data29 = pd.read_csv('weatherdata2022-10-29.csv',names=header)
data30 = pd.read_csv('weatherdata2022-10-30.csv',names=header)

#筛选出自己所在城市每天天气
data1['市县(区)']=='地区'
data2['市县(区)']=='地区'
data3['市县(区)']=='地区'
data4['市县(区)']=='地区'
data5['市县(区)']=='地区'
data6['市县(区)']=='地区'
data7['市县(区)']=='地区'
data8['市县(区)']=='地区'
data9['市县(区)']=='地区'
data10['市县(区)']=='地区'
data11['市县(区)']=='地区'
data12['市县(区)']=='地区'
data13['市县(区)']=='地区'
data14['市县(区)']=='地区'
data15['市县(区)']=='地区'
data16['市县(区)']=='地区'
data17['市县(区)']=='地区'
data18['市县(区)']=='地区'
data19['市县(区)']=='地区'
data20['市县(区)']=='地区'
data21['市县(区)']=='地区'
data22['市县(区)']=='地区'
data23['市县(区)']=='地区'
data24['市县(区)']=='地区'
data25['市县(区)']=='地区'
data26['市县(区)']=='地区'
data27['市县(区)']=='地区'
data28['市县(区)']=='地区'
data29['市县(区)']=='地区'
data30['市县(区)']=='地区'

bd_data1 = data1[data1['市县(区)']=='地区']
bd_data2 = data2[data2['市县(区)']=='地区']
bd_data3 = data3[data3['市县(区)']=='地区']
bd_data4 = data4[data4['市县(区)']=='地区']
bd_data5 = data5[data5['市县(区)']=='地区']
bd_data6 = data6[data6['市县(区)']=='地区']
bd_data7 = data7[data7['市县(区)']=='地区']
bd_data8 = data8[data8['市县(区)']=='地区']
bd_data9 = data9[data9['市县(区)']=='地区']
bd_data10 = data10[data10['市县(区)']=='地区']
bd_data11 = data11[data11['市县(区)']=='地区']
bd_data12 = data12[data12['市县(区)']=='地区']
bd_data13 = data13[data13['市县(区)']=='地区']
bd_data14 = data14[data14['市县(区)']=='地区']
bd_data15 = data15[data15['市县(区)']=='地区']
bd_data16 = data16[data16['市县(区)']=='地区']
bd_data17 = data17[data17['市县(区)']=='地区']
bd_data18 = data18[data18['市县(区)']=='地区']
bd_data19 = data19[data19['市县(区)']=='地区']
bd_data20 = data20[data20['市县(区)']=='地区']
bd_data21 = data21[data21['市县(区)']=='地区']
bd_data22 = data22[data22['市县(区)']=='地区']
bd_data23 = data23[data23['市县(区)']=='地区']
bd_data24 = data24[data24['市县(区)']=='地区']
bd_data25 = data25[data25['市县(区)']=='地区']
bd_data26 = data26[data26['市县(区)']=='地区']
bd_data27 = data27[data27['市县(区)']=='地区']
bd_data28 = data28[data28['市县(区)']=='地区']
bd_data29 = data29[data29['市县(区)']=='地区']
bd_data30 = data30[data30['市县(区)']=='地区']

#每天的最大温度
max(bd_data1['温度'])
max(bd_data2['温度'])
max(bd_data3['温度'])
max(bd_data4['温度'])
max(bd_data5['温度'])
max(bd_data6['温度'])
max(bd_data7['温度'])
max(bd_data8['温度'])
max(bd_data9['温度'])
max(bd_data10['温度'])
max(bd_data11['温度'])
max(bd_data12['温度'])
max(bd_data13['温度'])
max(bd_data14['温度'])
max(bd_data15['温度'])
max(bd_data16['温度'])
max(bd_data17['温度'])
max(bd_data18['温度'])
max(bd_data19['温度'])
max(bd_data20['温度'])
max(bd_data21['温度'])
max(bd_data22['温度'])
max(bd_data23['温度'])
max(bd_data24['温度'])
max(bd_data25['温度'])
max(bd_data26['温度'])
max(bd_data27['温度'])
max(bd_data28['温度'])
max(bd_data29['温度'])
max(bd_data30['温度'])

#每天的最小温度
min(bd_data1['温度'])
min(bd_data2['温度'])
min(bd_data3['温度'])
min(bd_data4['温度'])
min(bd_data5['温度'])
min(bd_data6['温度'])
min(bd_data7['温度'])
min(bd_data8['温度'])
min(bd_data9['温度'])
min(bd_data10['温度'])
min(bd_data11['温度'])
min(bd_data12['温度'])
min(bd_data13['温度'])
min(bd_data14['温度'])
min(bd_data15['温度'])
min(bd_data16['温度'])
min(bd_data17['温度'])
min(bd_data18['温度'])
min(bd_data19['温度'])
min(bd_data20['温度'])
min(bd_data21['温度'])
min(bd_data22['温度'])
min(bd_data23['温度'])
min(bd_data24['温度'])
min(bd_data25['温度'])
min(bd_data26['温度'])
min(bd_data27['温度'])
min(bd_data28['温度'])
min(bd_data29['温度'])
min(bd_data30['温度'])

#算出平均数
a = (max(bd_data1['温度'])+max(bd_data2['温度'])+max(bd_data3['温度'])+max(bd_data4['温度'])+max(bd_data5['温度'])+max(bd_data6['温度'])+max(bd_data7['温度'])+max(bd_data8['温度'])+max(bd_data9['温度'])+max(bd_data10['温度'])+max(bd_data11['温度'])+max(bd_data12['温度'])+max(bd_data13['温度'])+max(bd_data14['温度'])+max(bd_data15['温度'])+max(bd_data16['温度'])+max(bd_data17['温度'])+max(bd_data18['温度'])+max(bd_data19['温度'])+max(bd_data20['温度'])+max(bd_data21['温度'])+max(bd_data22['温度'])+max(bd_data23['温度'])+max(bd_data24['温度'])+max(bd_data25['温度'])+max(bd_data26['温度'])+max(bd_data27['温度'])+max(bd_data28['温度'])+max(bd_data29['温度'])+max(bd_data30['温度']))/30

b = (min(bd_data1['温度'])+min(bd_data2['温度'])+min(bd_data3['温度'])+min(bd_data4['温度'])+min(bd_data5['温度'])+min(bd_data6['温度'])+min(bd_data7['温度'])+min(bd_data8['温度'])+min(bd_data9['温度'])+min(bd_data10['温度'])+min(bd_data11['温度'])+min(bd_data12['温度'])+min(bd_data13['温度'])+min(bd_data14['温度'])+min(bd_data15['温度'])+min(bd_data16['温度'])+min(bd_data17['温度'])+min(bd_data18['温度'])+min(bd_data19['温度'])+min(bd_data20['温度'])+min(bd_data21['温度'])+min(bd_data22['温度'])+min(bd_data23['温度'])+min(bd_data24['温度'])+min(bd_data25['温度'])+min(bd_data26['温度'])+min(bd_data27['温度'])+min(bd_data28['温度'])+min(bd_data29['温度'])+min(bd_data30['温度']))/30

#画图
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.sans-serif']=['SimHei']
y1 = [max(bd_data1['温度']),
max(bd_data2['温度']),
max(bd_data3['温度']),
max(bd_data4['温度']),
max(bd_data5['温度']),
max(bd_data6['温度']),
max(bd_data7['温度']),
max(bd_data8['温度']),
max(bd_data9['温度']),
max(bd_data10['温度']),
max(bd_data11['温度']),
max(bd_data12['温度']),
max(bd_data13['温度']),
max(bd_data14['温度']),
max(bd_data15['温度']),
max(bd_data16['温度']),
max(bd_data17['温度']),
max(bd_data18['温度']),
max(bd_data19['温度']),
max(bd_data20['温度']),
max(bd_data21['温度']),
max(bd_data22['温度']),
max(bd_data23['温度']),
max(bd_data24['温度']),
max(bd_data25['温度']),
max(bd_data26['温度']),
max(bd_data27['温度']),
max(bd_data28['温度']),
max(bd_data29['温度']),
max(bd_data30['温度'])]
y2=[min(bd_data1['温度']),
min(bd_data2['温度']),
min(bd_data3['温度']),
min(bd_data4['温度']),
min(bd_data5['温度']),
min(bd_data6['温度']),
min(bd_data7['温度']),
min(bd_data8['温度']),
min(bd_data9['温度']),
min(bd_data10['温度']),
min(bd_data11['温度']),
min(bd_data12['温度']),
min(bd_data13['温度']),
min(bd_data14['温度']),
min(bd_data15['温度']),
min(bd_data16['温度']),
min(bd_data17['温度']),
min(bd_data18['温度']),
min(bd_data19['温度']),
min(bd_data20['温度']),
min(bd_data21['温度']),
min(bd_data22['温度']),
min(bd_data23['温度']),
min(bd_data24['温度']),
min(bd_data25['温度']),
min(bd_data26['温度']),
min(bd_data27['温度']),
min(bd_data28['温度']),
min(bd_data29['温度']),
min(bd_data30['温度'])]
plt.plot(y1,"r",markersize=5,label='高温')
plt.plot(y2,"b",markersize=5,label='低温')
plt.ylabel("摄氏度/℃")
plt.legend(loc='lower right')
plt.show

#去除‘’和%
d = bd_data10['湿度']
np.array(d)
d=np.array(d)
bi = []
for i in d:
    bi.append(int(i[:-1]))
d = np.array(bi)
len(d)

#湿度图
matplotlib.rcParams['font.sans-serif']=['SimHei']
y=list(range(1,len(d)+1))
plt.scatter(y,d,s=100,c='b')
plt.ylabel("相对湿度/%")
plt.title("温湿度相关性分析图")
plt.show

e = bd_data30['PM2.5计算的空气质量']
e = list(map(int,e))
len(e)

#一天中每个阶段的空气质量平均数
e1=np.mean(e[:10])
e2=np.mean(e[10:19])
e3=np.mean(e[19:28])
e4=np.mean(e[28:37])
e5=np.mean(e[37:46])
e6=np.mean(e[46:55])
e7=np.mean(e[55:64])
e8=np.mean(e[64:73])
e9=np.mean(e[73:82])
e10=np.mean(e[82:91])
e11=np.mean(e[91:100])
e12=np.mean(e[100:109])
e13=np.mean(e[109:118])
e14=np.mean(e[118:127])
e15=np.mean(e[127:136])
e16=np.mean(e[136:145])
e17=np.mean(e[145:154])
e18=np.mean(e[154:163])
e19=np.mean(e[163:172])
e20=np.mean(e[172:181])
e21=np.mean(e[181:190])
e22=np.mean(e[190:199])
e23=np.mean(e[199:208])
e24=np.mean(e[208:217])
h = [e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20,e21,e22,e23,e24]

#画图
matplotlib.rcParams['font.sans-serif']=['SimHei']
y3=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]
plt.bar(y3,h,alpha=0.7, color='g')
plt.ylabel("空气质量指数AQI")
plt.title("一天空气变化曲线图")
plt.show

#在所有天气中查找多云、晴、雨、阴、雾的天数
bin11=len(bd_data1[bd_data1['气候']=='多云'])
bin12=len(bd_data1[bd_data1['气候']=='晴'])
bin13=len(bd_data1[bd_data1['气候']=='雨'])
bin14=len(bd_data1[bd_data1['气候']=='阴'])
bin15=len(bd_data1[bd_data1['气候']=='雾'])
bin21=len(bd_data2[bd_data2['气候']=='多云'])
bin22=len(bd_data2[bd_data2['气候']=='晴'])
bin23=len(bd_data2[bd_data2['气候']=='雨'])
bin24=len(bd_data2[bd_data2['气候']=='阴'])
bin25=len(bd_data2[bd_data2['气候']=='雾'])
bin31=len(bd_data3[bd_data3['气候']=='多云'])
bin32=len(bd_data3[bd_data3['气候']=='晴'])
bin33=len(bd_data3[bd_data3['气候']=='雨'])
bin34=len(bd_data3[bd_data3['气候']=='阴'])
bin35=len(bd_data3[bd_data3['气候']=='雾'])
bin41=len(bd_data4[bd_data4['气候']=='多云'])
bin42=len(bd_data4[bd_data4['气候']=='晴'])
bin43=len(bd_data4[bd_data4['气候']=='雨'])
bin44=len(bd_data4[bd_data4['气候']=='阴'])
bin45=len(bd_data4[bd_data4['气候']=='雾'])
bin51=len(bd_data5[bd_data5['气候']=='多云'])
bin52=len(bd_data5[bd_data5['气候']=='晴'])
bin53=len(bd_data5[bd_data5['气候']=='雨'])
bin54=len(bd_data5[bd_data5['气候']=='阴'])
bin55=len(bd_data5[bd_data5['气候']=='雾'])
bin61=len(bd_data6[bd_data6['气候']=='多云'])
bin62=len(bd_data6[bd_data6['气候']=='晴'])
bin63=len(bd_data6[bd_data6['气候']=='雨'])
bin64=len(bd_data6[bd_data6['气候']=='阴'])
bin65=len(bd_data6[bd_data6['气候']=='雾'])
bin71=len(bd_data7[bd_data7['气候']=='多云'])
bin72=len(bd_data7[bd_data7['气候']=='晴'])
bin73=len(bd_data7[bd_data7['气候']=='雨'])
bin74=len(bd_data7[bd_data7['气候']=='阴'])
bin75=len(bd_data7[bd_data7['气候']=='雾'])
bin81=len(bd_data8[bd_data8['气候']=='多云'])
bin82=len(bd_data8[bd_data8['气候']=='晴'])
bin83=len(bd_data8[bd_data8['气候']=='雨'])
bin84=len(bd_data8[bd_data8['气候']=='阴'])
bin85=len(bd_data8[bd_data8['气候']=='雾'])
bin91=len(bd_data9[bd_data9['气候']=='多云'])
bin92=len(bd_data9[bd_data9['气候']=='晴'])
bin93=len(bd_data9[bd_data9['气候']=='雨'])
bin94=len(bd_data9[bd_data9['气候']=='阴'])
bin95=len(bd_data9[bd_data9['气候']=='雾'])
bin101=len(bd_data10[bd_data10['气候']=='多云'])
bin102=len(bd_data10[bd_data10['气候']=='晴'])
bin103=len(bd_data10[bd_data10['气候']=='雨'])
bin104=len(bd_data10[bd_data10['气候']=='阴'])
bin105=len(bd_data10[bd_data10['气候']=='雾'])
bin111=len(bd_data11[bd_data11['气候']=='多云'])
bin112=len(bd_data11[bd_data11['气候']=='晴'])
bin113=len(bd_data11[bd_data11['气候']=='雨'])
bin114=len(bd_data11[bd_data11['气候']=='阴'])
bin115=len(bd_data11[bd_data11['气候']=='雾'])
bin121=len(bd_data12[bd_data12['气候']=='多云'])
bin122=len(bd_data12[bd_data12['气候']=='晴'])
bin123=len(bd_data12[bd_data12['气候']=='雨'])
bin124=len(bd_data12[bd_data12['气候']=='阴'])
bin125=len(bd_data12[bd_data12['气候']=='雾'])
bin131=len(bd_data13[bd_data13['气候']=='多云'])
bin132=len(bd_data13[bd_data13['气候']=='晴'])
bin133=len(bd_data13[bd_data13['气候']=='雨'])
bin134=len(bd_data13[bd_data13['气候']=='阴'])
bin135=len(bd_data13[bd_data13['气候']=='雾'])
bin141=len(bd_data14[bd_data14['气候']=='多云'])
bin142=len(bd_data14[bd_data14['气候']=='晴'])
bin143=len(bd_data14[bd_data14['气候']=='雨'])
bin144=len(bd_data14[bd_data14['气候']=='阴'])
bin145=len(bd_data14[bd_data14['气候']=='雾'])
bin151=len(bd_data15[bd_data15['气候']=='多云'])
bin152=len(bd_data15[bd_data15['气候']=='晴'])
bin153=len(bd_data15[bd_data15['气候']=='雨'])
bin154=len(bd_data15[bd_data15['气候']=='阴'])
bin155=len(bd_data15[bd_data15['气候']=='雾'])
bin161=len(bd_data16[bd_data16['气候']=='多云'])
bin162=len(bd_data16[bd_data16['气候']=='晴'])
bin163=len(bd_data16[bd_data16['气候']=='雨'])
bin164=len(bd_data16[bd_data16['气候']=='阴'])
bin165=len(bd_data16[bd_data16['气候']=='雾'])
bin171=len(bd_data17[bd_data17['气候']=='多云'])
bin172=len(bd_data17[bd_data17['气候']=='晴'])
bin173=len(bd_data17[bd_data17['气候']=='雨'])
bin174=len(bd_data17[bd_data17['气候']=='阴'])
bin175=len(bd_data17[bd_data17['气候']=='雾'])
bin181=len(bd_data18[bd_data18['气候']=='多云'])
bin182=len(bd_data18[bd_data18['气候']=='晴'])
bin183=len(bd_data18[bd_data18['气候']=='雨'])
bin184=len(bd_data18[bd_data18['气候']=='阴'])
bin185=len(bd_data18[bd_data18['气候']=='雾'])
bin191=len(bd_data19[bd_data19['气候']=='多云'])
bin192=len(bd_data19[bd_data19['气候']=='晴'])
bin193=len(bd_data19[bd_data19['气候']=='雨'])
bin194=len(bd_data19[bd_data19['气候']=='阴'])
bin195=len(bd_data19[bd_data19['气候']=='雾'])
bin201=len(bd_data20[bd_data20['气候']=='多云'])
bin202=len(bd_data20[bd_data20['气候']=='晴'])
bin203=len(bd_data20[bd_data20['气候']=='雨'])
bin204=len(bd_data20[bd_data20['气候']=='阴'])
bin205=len(bd_data20[bd_data20['气候']=='雾'])
bin211=len(bd_data21[bd_data21['气候']=='多云'])
bin212=len(bd_data21[bd_data21['气候']=='晴'])
bin213=len(bd_data21[bd_data21['气候']=='雨'])
bin214=len(bd_data21[bd_data21['气候']=='阴'])
bin215=len(bd_data21[bd_data21['气候']=='雾'])
bin221=len(bd_data22[bd_data22['气候']=='多云'])
bin222=len(bd_data22[bd_data22['气候']=='晴'])
bin223=len(bd_data22[bd_data22['气候']=='雨'])
bin224=len(bd_data22[bd_data22['气候']=='阴'])
bin225=len(bd_data22[bd_data22['气候']=='雾'])
bin231=len(bd_data23[bd_data23['气候']=='多云'])
bin232=len(bd_data23[bd_data23['气候']=='晴'])
bin233=len(bd_data23[bd_data23['气候']=='雨'])
bin234=len(bd_data23[bd_data23['气候']=='阴'])
bin235=len(bd_data23[bd_data23['气候']=='雾'])
bin241=len(bd_data24[bd_data24['气候']=='多云'])
bin242=len(bd_data24[bd_data24['气候']=='晴'])
bin243=len(bd_data24[bd_data24['气候']=='雨'])
bin244=len(bd_data24[bd_data24['气候']=='阴'])
bin245=len(bd_data24[bd_data24['气候']=='雾'])
bin251=len(bd_data25[bd_data25['气候']=='多云'])
bin252=len(bd_data25[bd_data25['气候']=='晴'])
bin253=len(bd_data25[bd_data25['气候']=='雨'])
bin254=len(bd_data25[bd_data25['气候']=='阴'])
bin255=len(bd_data25[bd_data25['气候']=='雾'])
bin261=len(bd_data26[bd_data26['气候']=='多云'])
bin262=len(bd_data26[bd_data26['气候']=='晴'])
bin263=len(bd_data26[bd_data26['气候']=='雨'])
bin264=len(bd_data26[bd_data26['气候']=='阴'])
bin265=len(bd_data26[bd_data26['气候']=='雾'])
bin271=len(bd_data27[bd_data27['气候']=='多云'])
bin272=len(bd_data27[bd_data27['气候']=='晴'])
bin273=len(bd_data27[bd_data27['气候']=='雨'])
bin274=len(bd_data27[bd_data27['气候']=='阴'])
bin275=len(bd_data27[bd_data27['气候']=='雾'])
bin281=len(bd_data28[bd_data28['气候']=='多云'])
bin282=len(bd_data28[bd_data28['气候']=='晴'])
bin283=len(bd_data28[bd_data28['气候']=='雨'])
bin284=len(bd_data28[bd_data28['气候']=='阴'])
bin285=len(bd_data28[bd_data28['气候']=='雾'])
bin291=len(bd_data29[bd_data29['气候']=='多云'])
bin292=len(bd_data29[bd_data29['气候']=='晴'])
bin293=len(bd_data29[bd_data29['气候']=='雨'])
bin294=len(bd_data29[bd_data29['气候']=='阴'])
bin295=len(bd_data29[bd_data29['气候']=='雾'])
bin301=len(bd_data30[bd_data30['气候']=='多云'])
bin302=len(bd_data30[bd_data30['气候']=='晴'])
bin303=len(bd_data30[bd_data30['气候']=='雨'])
bin304=len(bd_data30[bd_data30['气候']=='阴'])
bin305=len(bd_data30[bd_data30['气候']=='雾'])

bin_1=bin301+bin291+bin281+bin271+bin261+bin251+bin241+bin231+bin221+bin211+bin201+bin191+bin181+bin171+bin161+bin151+bin141+bin131+bin121+bin111+bin101+bin91+bin81+bin71+bin61+bin51+bin41+bin31+bin21+bin11
bin_2=bin302+bin292+bin282+bin272+bin262+bin252+bin242+bin232+bin222+bin212+bin202+bin192+bin182+bin172+bin162+bin152+bin142+bin132+bin122+bin112+bin102+bin92+bin82+bin72+bin62+bin52+bin42+bin32+bin22+bin12
bin_3=bin303+bin293+bin283+bin273+bin263+bin253+bin243+bin233+bin223+bin213+bin203+bin193+bin183+bin173+bin163+bin153+bin143+bin133+bin123+bin113+bin103+bin93+bin83+bin73+bin63+bin53+bin43+bin33+bin23+bin13
bin_4=bin304+bin294+bin284+bin274+bin264+bin254+bin244+bin234+bin224+bin214+bin204+bin194+bin184+bin174+bin164+bin154+bin144+bin134+bin124+bin114+bin104+bin94+bin84+bin74+bin64+bin54+bin44+bin34+bin24+bin14
bin_5=bin305+bin295+bin285+bin275+bin265+bin255+bin245+bin235+bin225+bin215+bin205+bin195+bin185+bin175+bin165+bin155+bin145+bin135+bin125+bin115+bin105+bin95+bin85+bin75+bin65+bin55+bin45+bin35+bin25+bin15
bin=[bin_1,bin_2,bin_3,bin_4,bin_5]
n=['多云','晴','雨','阴','雾']

#画图
matplotlib.rcParams['font.sans-serif']=['SimHei']
plt.pie(bin,labels=n,autopct='%1.1f%%')
plt.show