当前位置:首页>python>python绘制气象等值线图

python绘制气象等值线图

  • 2026-02-07 08:22:49
python绘制气象等值线图

本次使用python中requests和BeautifulSoup库对中国天气网当天和未来14天的数据进行获取,保存为csv文件,之后用matplotlib、numpy、pandas对数据进行可视化处理和分析,得到温湿度度变化曲线、空气质量图、风向雷达图等结果,为获得未来天气信息提供了有效方法python编程代码画红心。

1、数据获取

请求网站链接

首先查看中国天气网的网址:http://www.weather.com.cn/weather/101280701.shtml这里就访问本地的天气网址,如果想获取不同的地区只需修改最后的101280701地区编号即可,前面的weather代表是7天的网页,weather1d代表当天,weather15d代表未来14天。这里就主要访问7天和14天的中国天气网。采用requests.get()方法,请求网页,如果成功访问,则得到的是网页的所有字符串文本。这就是请求过程。

def getHTMLtext(url):      """请求获得网页内容""" try:           r = requests.get(url, timeout = 30)           r.raise_for_status()           r.encoding = r.apparent_encoding           print("成功访问")           return r.text      except:           print("访问错误")           return" "

提取有用信息

这里采用BeautifulSoup库对刚刚获取的字符串进行数据提取,首先对网页进行检查,找到需要获取数据的标签:

可以发现7天的数据信息在div标签中并且id=“7d”,并且日期、天气、温度、风级等信息都在ul和li标签中,所以我们可以使用BeautifulSoup对获取的网页文本进行查找div标签id=“7d”,找出他包含的所有的ul和li标签,之后提取标签中相应的数据值,保存到对应列表中。

这里要注意一个细节就是有时日期没有最高气温,对于没有数据的情况要进行判断和处理。另外对于一些数据保存的格式也要提前进行处理,比如温度后面的摄氏度符号,日期数字的提取,和风级文字的提取,这需要用到字符查找及字符串切片处理。

def get_content(html):"""处理得到有用信息保存数据文件"""final = []          # 初始化一个列表保存数据bs = BeautifulSoup(html, "html.parser")  # 创建BeautifulSoup对象body = bs.bodydata = body.find('div', {'id''7d'})    # 找到div标签且id = 7d

下面获取当天的数据

data2 = body.find_all('div',{'class':'left-div'})text = data2[2].find('').string text = text[text.index('=')+1 :-2]   # 移除改var data=将其变为json数据jd = json.loads(text)dayone = jd['od']['od2']     # 找到当天的数据final_day = []           # 存放当天的数据count = 0for i in dayone:temp = []if count <=23:temp.append(i['od21'])     # 添加时间temp.append(i['od22'])     # 添加当前时刻温度temp.append(i['od24'])     # 添加当前时刻风力方向temp.append(i['od25'])     # 添加当前时刻风级temp.append(i['od26'])     # 添加当前时刻降水量temp.append(i['od27'])     # 添加当前时刻相对湿度temp.append(i['od28'])     # 添加当前时刻控制质量#print(temp)final_day.append(temp)count = count +1

下面获取7天的数据

ul = data.find('ul')      # 找到所有的ul标签li = ul.find_all('li')      # 找到左右的li标签i = 0     # 控制获取的天数for day in li:          # 遍历找到的每一个liif i < 7 and i > 0:temp = []          # 临时存放每天的数据date = day.find('h1').string     # 得到日期date = date[0:date.index('日')]   # 取出日期号temp.append(date)    inf = day.find_all('p')      # 找出li下面的p标签,提取第一个p标签的值,即天气temp.append(inf[0].string)    tem_low = inf[1].find('i').string   # 找到最低气温    if inf[1].find('span') is None:   # 天气预报可能没有最高气温        tem_high = None    else:        tem_high = inf[1].find('span').string  # 找到最高气温    temp.append(tem_low[:-1])    if tem_high[-1] == '℃':     temp.append(tem_high[:-1])    else:     temp.append(tem_high)    wind = inf[2].find_all('span')  # 找到风向    for j in wind:     temp.append(j['title'])    wind_scale = inf[2].find('i').string # 找到风级    index1 = wind_scale.index('级')    temp.append(int(wind_scale[index1-1:index1]))    final.append(temp)i = i + 1return final_day,final

同样对于/weather15d:15天的信息,也做同样的处理,这里经过查看后发现他的15天网页中只有8-14天,前面的1-7天在/weather中,这里就分别访问两个网页将获取得到的数据进行合并得到最终14天的数据。- 前面是未来14天的数据获取过程,对于当天24小时的天气信息数据,经过查找发现他是一个json数据,可以通过json.loads()

方法获取当天的数据,进而对当天的天气信息进行提取。

保存csv文件

前面将获取的数据添加到列表中,这里引入csv库,利用f_csv.writerow(header)和f_csv.writerows(data)方法,分别写入表头和每一行的数据,这里将1天和未来14天的数据分开存储,分别保存为weather1.csv和weather14.csv,下面是他们保存的表格图:

2.可视化分析

当天温度变化曲线图

采用matplotlib中plt.plot()方法绘制出一天24小时的温度变化曲线,并用plt.text()方法点出最高温和最低温,并画出平均温度线,下图为温度变化曲线图:(代码见附录)

分析可以发现这一天最高温度为33℃,最低温度为28℃,并且平均温度在20.4℃左右,通过对时间分析,发现昼夜温差5℃,低温分布在凌晨,高温分布在中午到下午的时间段。

当天相对湿度变化曲线图

采用matplotlib中plt.plot()方法绘制出一天24小时的湿度变化曲线,并画出平均相对湿度线,下图为湿度变化曲线图:(代码见附录)

分析可以发现这一天最高相对湿度为86%,最低相对湿度为58℃,并且平均相对湿度在75%左右,通过对时间分析,清晨的湿度比较大,而下午至黄昏湿度较小。

温湿度相关性分析图

经过前面两个图的分析我们可以感觉到温度和湿度之间是有关系的,为了更加清楚直观地感受这种关系,使用plt.scatter()方法将温度为横坐标、湿度为纵坐标,每个时刻的点在图中点出来,并且计算相关系数,下图为结果图:

分析可以发现一天的温度和湿度具有强烈的相关性,他们呈负相关,这就说明他们时间是负相关关系,并且进一步分析,当温度较低时,空气中水分含量较多,湿度自然较高,而温度较高时,水分蒸发,空气就比较干 燥,湿度较低,符合平时气候现象。

空气质量指数柱状图

空气质量指数AQI是定量描述空气质量状况的指数,其数值越大说明空气污染状况越重,对人体健康的危害也就越大。一般将空气质量指数分为6个等级,等级越高说明污染越严重,下面使用plt.bar方法对一天24小时的空气质量进行了柱状图绘制,并且根据6个等级的不同,相应的柱状图的颜色也从浅到深,也表明污染逐步加重,更直观的显示污染情况,并且也将最高和最低的空气质量指数标出,用虚线画出平均的空气质量指数,下图是绘制结果图:

上面这张是南方珠海的控制质量图,可以看出空气质量指数最大也是在健康范围,说明珠海空气非常好,分析可以发现这一天最高空气质量指数达到了35,最低则只有14,并且平均在25左右,通过时间也可以发现,基本在清晨的时候是空气最好的时候(4-9点),在下午是空气污染最严重的时候,所以清晨一般可以去外面呼吸新鲜的空气,那时污染最小。

而下面这个空气质量图是选取的北方的一个城市,可以看到这里的环境远远比不上珠海。

风向风级雷达图

统计一天的风力和风向,由于风力风向使用极坐标的方式展现较好,所以这里采用的是极坐标的方式展现一天的风力风向图,将圆分为8份,每一份代表一个风向,半径代表平均风力,并且随着风级增高,蓝色加深,最后结果如下所示:

分析可以发现这一天西南风最多,平均风级达到了1.75级,东北风也有小部分1.0级,其余空白方向无来风。

未来14天高低温变化曲线图

统计未来14天的高低温度变化,并绘制出他们的变化曲线图,分别用虚线将他们的平均气温线绘制出来,最后结果如下所示:

分析可以发现未来14天高温平均气温为30.5℃,温度还是比较高,但是未来的第8天有降温,需要做好降温准备,低温前面处于平稳趋势,等到第8天开始下降,伴随着高温也下降,整体温度下降,低温平均在27℃左右。

未来14天风向风级雷达图

统计未来14天的风向和平均风力,并和前面一样采用极坐标形式,将圆周分为8个部分,代表8个方向,颜色越深代表风级越高,最后结果如下所示:

分析可以发现未来14天东南风、西南风所占主要风向,风级最高达到了5级,最低的西风平均风级也有3级。

未来14天气候分布饼图

统计未来14天的气候,并求每个气候的总天数,最后将各个气候的饼图绘制出来,结果如下所示:

分析可以发现未来14天气候基本是“雨”、“阴转雨”和“阵雨”,下雨的天数较多,结合前面的气温分布图可以看出在第8-9天气温高温下降,可以推测当天下雨,导致气温下降。

3、结论

1.首先根据获取的温湿度数据进行的分析,温度从早上低到中午高再到晚上低,湿度和温度的趋势相反,通过相关系数发现温度和湿度有强烈的负相关关系,经查阅资料发现因为随着温度升高水蒸汽蒸发加剧,空气中水分降低湿度降低。当然,湿度同时受气压和雨水的影响,下雨湿度会明显增高。

2.经查阅资料空气质量不仅跟工厂、汽车等排放的烟气、废气等有关,更为重要的是与气象因素有关。由于昼夜温差明显变化,当地面温度高于高空温度时,空气上升,污染物易被带到高空扩散;当地面温度低于一定高度的温度时,天空形成逆温层,它像一个大盖子一样压在地面上空,使地表空气中各种污染物不易扩散。一般在晚间和清晨影响较大,而当太阳出来后,地面迅速升温,逆温层就会逐渐消散,于是污染空气也就扩散了。

3.风是由气压在水平方向分布的不均匀导致的。风受大气环流、地形、水域等不同因素的综合影响,表现形式多种多样,如季风、地方性的海陆风、山谷风等,一天的风向也有不同的变化,根据未来14天的风向雷达图可以发现未来所有风向基本都有涉及,并且没有特别的某个风向,原因可能是近期没有降水和气文变化不大,导致风向也没有太大的变化规律。

4.天气是指某一个地区距离地表较近的大气层在短时间内的具体状态。跟某瞬时内大气中各种气象要素分布的综合表现。根据未来14天的天气和温度变化可以大致推断出某个时间的气候,天气和温度之间也是有联系的。

4、代码框架

代码主要分为weather.py:对中国天气网进行获取取天气数据并保存csv文件;data1_analysis.py:对当天的天气信息进行可视化处理;data14_analysis.py:对未来14天的天气信息进行可视化处理。下面是代码的结构图:

附源代码

weather.py

# weather.pyimport requestsfrom bs4 import BeautifulSoupimport csvimport jsondef getHTMLtext(url):      """请求获得网页内容""" try:           r = requests.get(url, timeout = 30)           r.raise_for_status()           r.encoding = r.apparent_encoding           print("成功访问")           return r.text      except:           print("访问错误")           return" " def get_content(html): """处理得到有用信息保存数据文件""" final = []          # 初始化一个列表保存数据 bs = BeautifulSoup(html, "html.parser")  # 创建BeautifulSoup对象 body = bs.body data = body.find('div', {<!-- -->'id''7d'})    # 找到div标签且id = 7d # 下面获取当天的数据 data2 = body.find_all('div',{<!-- -->'class':'left-div'}) text = data2[2].find('').string   text = text[text.index('=')+1 :-2]   # 移除改var data=将其变为json数据 jd = json.loads(text) dayone = jd['od']['od2']     # 找到当天的数据 final_day = []           # 存放当天的数据 count = 0 for i in dayone:  temp = []  if count &lt;=23:   temp.append(i['od21'])     # 添加时间   temp.append(i['od22'])     # 添加当前时刻温度   temp.append(i['od24'])     # 添加当前时刻风力方向   temp.append(i['od25'])     # 添加当前时刻风级   temp.append(i['od26'])     # 添加当前时刻降水量   temp.append(i['od27'])     # 添加当前时刻相对湿度   temp.append(i['od28'])     # 添加当前时刻控制质量#print(temp)   final_day.append(temp)  count = count +1 # 下面获取7天的数据  ul = data.find('ul')      # 找到所有的ul标签 li = ul.find_all('li')      # 找到左右的li标签 i = 0     # 控制获取的天数 for day in li:          # 遍历找到的每一个li     if i &lt; 7 and i &gt; 0:         temp = []          # 临时存放每天的数据         date = day.find('h1').string     # 得到日期         date = date[0:date.index('日')]   # 取出日期号         temp.append(date)                     inf = day.find_all('p')      # 找出li下面的p标签,提取第一个p标签的值,即天气         temp.append(inf[0].string)         tem_low = inf[1].find('i').string   # 找到最低气温         if inf[1].find('span'is None:   # 天气预报可能没有最高气温             tem_high = None         else:             tem_high = inf[1].find('span').string  # 找到最高气温         temp.append(tem_low[:-1])         if tem_high[-1] == '℃':          temp.append(tem_high[:-1])         else:          temp.append(tem_high)         wind = inf[2].find_all('span')  # 找到风向         for j in wind:          temp.append(j['title'])         wind_scale = inf[2].find('i').string # 找到风级         index1 = wind_scale.index('级')         temp.append(int(wind_scale[index1-1:index1]))         final.append(temp)     i = i + 1 return final_day,final#print(final)    def get_content2(html): """处理得到有用信息保存数据文件""" final = []                # 初始化一个列表保存数据 bs = BeautifulSoup(html, "html.parser")        # 创建BeautifulSoup对象 body = bs.body data = body.find('div', {<!-- -->'id''15d'})          # 找到div标签且id = 15d ul = data.find('ul')            # 找到所有的ul标签 li = ul.find_all('li')            # 找到左右的li标签 final = [] i = 0                 # 控制获取的天数 for day in li:               # 遍历找到的每一个li     if i &lt; 8:         temp = []               # 临时存放每天的数据         date = day.find('span',{<!-- -->'class':'time'}).string    # 得到日期         date = date[date.index('(')+1:-2]        # 取出日期号         temp.append(date)           weather = day.find('span',{<!-- -->'class':'wea'}).string    # 找到天气         temp.append(weather)         tem = day.find('span',{<!-- -->'class':'tem'}).text      # 找到温度         temp.append(tem[tem.index('/')+1:-1])     # 找到最低气温         temp.append(tem[:tem.index('/')-1])      # 找到最高气温         wind = day.find('span',{<!-- -->'class':'wind'}).string    # 找到风向         if '转' in wind:           # 如果有风向变化          temp.append(wind[:wind.index('转')])          temp.append(wind[wind.index('转')+1:])         else:             # 如果没有风向变化,前后风向一致          temp.append(wind)          temp.append(wind)         wind_scale = day.find('span',{<!-- -->'class':'wind1'}).string    # 找到风级         index1 = wind_scale.index('级')         temp.append(int(wind_scale[index1-1:index1]))         final.append(temp) return finaldef write_to_csv(file_name, data, day=14): """保存为csv文件""" with open(file_name, 'a', errors='ignore', newline=''as f:  if day == 14:   header = ['日期','天气','最低气温','最高气温','风向1','风向2','风级']  else:   header = ['小时','温度','风力方向','风级','降水量','相对湿度','空气质量']  f_csv = csv.writer(f)  f_csv.writerow(header)  f_csv.writerows(data)def main(): """主函数""" print("Weather test") # 珠海 url1 = 'http://www.weather.com.cn/weather/101280701.shtml'    # 7天天气中国天气网 url2 = 'http://www.weather.com.cn/weather15d/101280701.shtml' # 8-15天天气中国天气网 html1 = getHTMLtext(url1) data1, data1_7 = get_content(html1)  # 获得1-7天和当天的数据 html2 = getHTMLtext(url2) data8_14 = get_content2(html2)   # 获得8-14天数据 data14 = data1_7 + data8_14#print(data) write_to_csv('weather14.csv',data14,14# 保存为csv文件 write_to_csv('weather1.csv',data1,1)if __name__ == '__main__': main()

data1_analysis.py:

# data1_analysis.pyimport matplotlib.pyplot as pltimport numpy as npimport pandas as pdimport mathdef tem_curve(data): """温度曲线绘制""" hour = list(data['小时']) tem = list(data['温度']) for i in range(0,24):  if math.isnan(tem[i]) == True:   tem[i] = tem[i-1] tem_ave = sum(tem)/24     # 求平均温度  tem_max = max(tem)     tem_max_hour = hour[tem.index(tem_max)] # 求最高温度 tem_min = min(tem) tem_min_hour = hour[tem.index(tem_min)] # 求最低温度 x = [] y = [] for i in range(024):  x.append(i)  y.append(tem[hour.index(i)]) plt.figure(1) plt.plot(x,y,color='red',label='温度')       # 画出温度曲线 plt.scatter(x,y,color='red')   # 点出每个时刻的温度点 plt.plot([024], [tem_ave, tem_ave], c='blue', linestyle='--',label='平均温度')  # 画出平均温度虚线 plt.text(tem_max_hour+0.15, tem_max+0.15str(tem_max), ha='center', va='bottom', fontsize=10.5)  # 标出最高温度 plt.text(tem_min_hour+0.15, tem_min+0.15str(tem_min), ha='center', va='bottom', fontsize=10.5)  # 标出最低温度 plt.xticks(x) plt.legend() plt.title('一天温度变化曲线图') plt.xlabel('时间/h') plt.ylabel('摄氏度/℃') plt.show()def hum_curve(data): """相对湿度曲线绘制""" hour = list(data['小时']) hum = list(data['相对湿度']) for i in range(0,24):  if math.isnan(hum[i]) == True:   hum[i] = hum[i-1] hum_ave = sum(hum)/24     # 求平均相对湿度  hum_max = max(hum)     hum_max_hour = hour[hum.index(hum_max)] # 求最高相对湿度 hum_min = min(hum) hum_min_hour = hour[hum.index(hum_min)] # 求最低相对湿度 x = [] y = [] for i in range(024):  x.append(i)  y.append(hum[hour.index(i)]) plt.figure(2) plt.plot(x,y,color='blue',label='相对湿度')       # 画出相对湿度曲线 plt.scatter(x,y,color='blue')   # 点出每个时刻的相对湿度 plt.plot([024], [hum_ave, hum_ave], c='red', linestyle='--',label='平均相对湿度')  # 画出平均相对湿度虚线 plt.text(hum_max_hour+0.15, hum_max+0.15str(hum_max), ha='center', va='bottom', fontsize=10.5)  # 标出最高相对湿度 plt.text(hum_min_hour+0.15, hum_min+0.15str(hum_min), ha='center', va='bottom', fontsize=10.5)  # 标出最低相对湿度 plt.xticks(x) plt.legend() plt.title('一天相对湿度变化曲线图') plt.xlabel('时间/h') plt.ylabel('百分比/%') plt.show()def air_curve(data): """空气质量曲线绘制""" hour = list(data['小时']) air = list(data['空气质量']) print(type(air[0])) for i in range(0,24):  if math.isnan(air[i]) == True:   air[i] = air[i-1] air_ave = sum(air)/24     # 求平均空气质量  air_max = max(air)     air_max_hour = hour[air.index(air_max)] # 求最高空气质量 air_min = min(air) air_min_hour = hour[air.index(air_min)] # 求最低空气质量 x = [] y = [] for i in range(024):  x.append(i)  y.append(air[hour.index(i)]) plt.figure(3) for i in range(0,24):  if y[i] &lt;= 50:   plt.bar(x[i],y[i],color='lightgreen',width=0.7)  # 1等级  elif y[i] &lt;= 100:   plt.bar(x[i],y[i],color='wheat',width=0.7)   # 2等级  elif y[i] &lt;= 150:   plt.bar(x[i],y[i],color='orange',width=0.7)   # 3等级  elif y[i] &lt;= 200:   plt.bar(x[i],y[i],color='orangered',width=0.7)  # 4等级  elif y[i] &lt;= 300:   plt.bar(x[i],y[i],color='darkviolet',width=0.7)  # 5等级  elif y[i] &gt; 300:   plt.bar(x[i],y[i],color='maroon',width=0.7)   # 6等级 plt.plot([024], [air_ave, air_ave], c='black', linestyle='--')  # 画出平均空气质量虚线 plt.text(air_max_hour+0.15, air_max+0.15str(air_max), ha='center', va='bottom', fontsize=10.5)  # 标出最高空气质量 plt.text(air_min_hour+0.15, air_min+0.15str(air_min), ha='center', va='bottom', fontsize=10.5)  # 标出最低空气质量 plt.xticks(x) plt.title('一天空气质量变化曲线图') plt.xlabel('时间/h') plt.ylabel('空气质量指数AQI') plt.show()def wind_radar(data): """风向雷达图""" wind = list(data['风力方向']) wind_speed = list(data['风级']) for i in range(0,24):  if wind[i] == "北风":   wind[i] = 90  elif wind[i] == "南风":   wind[i] = 270  elif wind[i] == "西风":   wind[i] = 180  elif wind[i] == "东风":   wind[i] = 360  elif wind[i] == "东北风":   wind[i] = 45  elif wind[i] == "西北风":   wind[i] = 135  elif wind[i] == "西南风":   wind[i] = 225  elif wind[i] == "东南风":   wind[i] = 315 degs = np.arange(45,361,45) temp = [] for deg in degs:  speed = []  # 获取 wind_deg 在指定范围的风速平均值数据  for i in range(0,24):   if wind[i] == deg:    speed.append(wind_speed[i])  if len(speed) == 0:   temp.append(0)  else:   temp.append(sum(speed)/len(speed)) print(temp) N = 8 theta = np.arange(0.+np.pi/8,2*np.pi+np.pi/8,2*np.pi/8) # 数据极径 radii = np.array(temp) # 绘制极区图坐标系 plt.axes(polar=True) # 定义每个扇区的RGB值(R,G,B),x越大,对应的颜色越接近蓝色 colors = [(1-x/max(temp), 1-x/max(temp),0.6for x in radii] plt.bar(theta,radii,width=(2*np.pi/N),bottom=0.0,color=colors) plt.title('一天风级图',x=0.2,fontsize=20) plt.show()def calc_corr(a, b): """计算相关系数""" a_avg = sum(a)/len(a) b_avg = sum(b)/len(b) cov_ab = sum([(x - a_avg)*(y - b_avg) for x,y in zip(a, b)]) sq = math.sqrt(sum([(x - a_avg)**2 for x in a])*sum([(x - b_avg)**2 for x in b]))  corr_factor = cov_ab/sq return corr_factordef corr_tem_hum(data): """温湿度相关性分析""" tem = data['温度'] hum = data['相对湿度'] plt.scatter(tem,hum,color='blue') plt.title("温湿度相关性分析图") plt.xlabel("温度/℃") plt.ylabel("相对湿度/%") plt.text(20,40,"相关系数为:"+str(calc_corr(tem,hum)),fontdict={<!-- -->'size':'10','color':'red'}) plt.show() print("相关系数为:"+str(calc_corr(tem,hum)))def main(): plt.rcParams['font.sans-serif']=['SimHei'# 解决中文显示问题 plt.rcParams['axes.unicode_minus'] = False  # 解决负号显示问题 data1 = pd.read_csv('weather1.csv',encoding='gb2312') print(data1) tem_curve(data1) hum_curve(data1) air_curve(data1) wind_radar(data1) corr_tem_hum(data1)if __name__ == '__main__': main()

data14_analysis.py:

# data14_analysis.pyimport matplotlib.pyplot as pltimport numpy as npimport pandas as pdimport mathdef tem_curve(data): """温度曲线绘制""" date = list(data['日期']) tem_low = list(data['最低气温']) tem_high = list(data['最高气温']) for i in range(0,14):  if math.isnan(tem_low[i]) == True:   tem_low[i] = tem_low[i-1]  if math.isnan(tem_high[i]) == True:   tem_high[i] = tem_high[i-1] tem_high_ave = sum(tem_high)/14     # 求平均高温  tem_low_ave = sum(tem_low)/14     # 求平均低温  tem_max = max(tem_high)     tem_max_date = tem_high.index(tem_max)   # 求最高温度 tem_min = min(tem_low) tem_min_date = tem_low.index(tem_min)   # 求最低温度 x = range(1,15) plt.figure(1) plt.plot(x,tem_high,color='red',label='高温')    # 画出高温度曲线 plt.scatter(x,tem_high,color='red')     # 点出每个时刻的温度点 plt.plot(x,tem_low,color='blue',label='低温')    # 画出低温度曲线 plt.scatter(x,tem_low,color='blue')     # 点出每个时刻的温度点 plt.plot([115], [tem_high_ave, tem_high_ave], c='black', linestyle='--')  # 画出平均温度虚线 plt.plot([115], [tem_low_ave, tem_low_ave], c='black', linestyle='--')  # 画出平均温度虚线 plt.legend() plt.text(tem_max_date+0.15, tem_max+0.15str(tem_max), ha='center', va='bottom', fontsize=10.5)  # 标出最高温度 plt.text(tem_min_date+0.15, tem_min+0.15str(tem_min), ha='center', va='bottom', fontsize=10.5)  # 标出最低温度 plt.xticks(x) plt.title('未来14天高温低温变化曲线图') plt.xlabel('未来天数/天') plt.ylabel('摄氏度/℃') plt.show()def change_wind(wind): """改变风向""" for i in range(0,14):  if wind[i] == "北风":   wind[i] = 90  elif wind[i] == "南风":   wind[i] = 270  elif wind[i] == "西风":   wind[i] = 180  elif wind[i] == "东风":   wind[i] = 360  elif wind[i] == "东北风":   wind[i] = 45  elif wind[i] == "西北风":   wind[i] = 135  elif wind[i] == "西南风":   wind[i] = 225  elif wind[i] == "东南风":   wind[i] = 315 return winddef wind_radar(data): """风向雷达图""" wind1 = list(data['风向1']) wind2 = list(data['风向2']) wind_speed = list(data['风级']) wind1 = change_wind(wind1) wind2 = change_wind(wind2) degs = np.arange(45,361,45) temp = [] for deg in degs:  speed = []  # 获取 wind_deg 在指定范围的风速平均值数据  for i in range(0,14):   if wind1[i] == deg:    speed.append(wind_speed[i])   if wind2[i] == deg:    speed.append(wind_speed[i])  if len(speed) == 0:   temp.append(0)  else:   temp.append(sum(speed)/len(speed)) print(temp) N = 8 theta = np.arange(0.+np.pi/8,2*np.pi+np.pi/8,2*np.pi/8) # 数据极径 radii = np.array(temp) # 绘制极区图坐标系 plt.axes(polar=True) # 定义每个扇区的RGB值(R,G,B),x越大,对应的颜色越接近蓝色 colors = [(1-x/max(temp), 1-x/max(temp),0.6for x in radii] plt.bar(theta,radii,width=(2*np.pi/N),bottom=0.0,color=colors) plt.title('未来14天风级图',x=0.2,fontsize=20) plt.show()def weather_pie(data): """绘制天气饼图""" weather = list(data['天气']) dic_wea = {<!-- --> } for i in range(0,14):  if weather[i] in dic_wea.keys():   dic_wea[weather[i]] += 1  else:   dic_wea[weather[i]] = 1 print(dic_wea) explode=[0.01]*len(dic_wea.keys()) color = ['lightskyblue','silver','yellow','salmon','grey','lime','gold','red','green','pink'] plt.pie(dic_wea.values(),explode=explode,labels=dic_wea.keys(),autopct='%1.1f%%',colors=color) plt.title('未来14天气候分布饼图') plt.show()def main(): plt.rcParams['font.sans-serif']=['SimHei'# 解决中文显示问题 plt.rcParams['axes.unicode_minus'] = False  # 解决负号显示问题 data14 = pd.read_csv('weather14.csv',encoding='gb2312') print(data14) tem_curve(data14) wind_radar(data14) weather_pie(data14)if __name__ == '__main__': main()

————————————————

版权声明:本文为CSDN博主「S1112_」的原创文章,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/S1112_/article/details/136616049

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 13:33:32 HTTP/2.0 GET : https://f.mffb.com.cn/a/470163.html
  2. 运行时间 : 0.204658s [ 吞吐率:4.89req/s ] 内存消耗:4,524.09kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=3f0eef4b68c886f820b0f368d8507f4e
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001105s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001568s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000678s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000685s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001426s ]
  6. SELECT * FROM `set` [ RunTime:0.000600s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001391s ]
  8. SELECT * FROM `article` WHERE `id` = 470163 LIMIT 1 [ RunTime:0.001156s ]
  9. UPDATE `article` SET `lasttime` = 1770442413 WHERE `id` = 470163 [ RunTime:0.030723s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000686s ]
  11. SELECT * FROM `article` WHERE `id` < 470163 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001175s ]
  12. SELECT * FROM `article` WHERE `id` > 470163 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001118s ]
  13. SELECT * FROM `article` WHERE `id` < 470163 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001403s ]
  14. SELECT * FROM `article` WHERE `id` < 470163 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001747s ]
  15. SELECT * FROM `article` WHERE `id` < 470163 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002054s ]
0.208493s