<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          中國116所211大學(xué)都在哪里?Python動態(tài)圖幫你盤點!

          共 20994字,需瀏覽 42分鐘

           ·

          2021-07-19 16:04

          點擊上方“Python爬蟲與數(shù)據(jù)挖掘”,進行關(guān)注

          回復(fù)“書籍”即可獲贈Python從入門到進階共10本電子書

          風(fēng)蕭蕭兮易水寒,壯士一去兮不復(fù)還。

          開場段子 :

          記得當(dāng)年我查到高考分數(shù)后,  第一件事不是告訴父母,而是飛快地跑到學(xué)校。


          找到班主任,指著她說:  “哼哼,你不是說以我的智商不可能考上一本的嗎?” 


          班主任一臉尷尬地向我道歉。


          我氣憤地說: “還真被你這個烏鴉嘴說中了!”


          全國名校眾多,最常聽說的是“985工程”高校、“211工程”高校。除此之外還有“雙一流”高校的說法,這是在2017年提出來的。在這里我們介紹“211”高校。


          何為211高校


          “211”工程,即面向21世紀、重點建設(shè)100所左右的高等學(xué)校和一批重點學(xué)科的建設(shè)工程,新中國成立以來由國家立項在高等教育領(lǐng)域進行的規(guī)模最大、層次最高的重點建設(shè)工作,是中國政府實施“科教興國”戰(zhàn)略的重大舉措,211大學(xué)在社會上認可度也極高。


          由于當(dāng)時各大高校之間競爭激烈,雖說只是100所,但是到了今天已經(jīng)發(fā)展成了116所,目前已經(jīng)不接受申報了。


          這些211高校包括39所985高校,以及另外77所高校。可以分成6個梯隊。


          第一梯度為前五的清華大學(xué)、北京大學(xué)、復(fù)旦大學(xué)、浙江大學(xué)、上海交通大學(xué)。


          第二梯度為前二十的“985”高校,分別是中國科學(xué)技術(shù)大學(xué)、中國人民大學(xué)、南京大學(xué)、同濟大學(xué)、南開大學(xué)、北京航空航天大學(xué)、北京師范大學(xué)、武漢大學(xué)、西安交通大學(xué)、天津大學(xué)、華中科技大學(xué)、北京理工大學(xué)、東南大學(xué)、中山大學(xué)、華東師范大學(xué)、哈爾濱工業(yè)大學(xué)、廈門大學(xué)、中南大學(xué)、華南理工大學(xué)、電子科技大學(xué)。


          第三梯度為其他十三所高校以及國防科技大學(xué)。它們分別是西北工業(yè)大學(xué)、大連理工大學(xué)、四川大學(xué)、吉林大學(xué)、湖南大學(xué)、重慶大學(xué)、山東大學(xué)、中國農(nóng)業(yè)大學(xué)、中國海洋大學(xué)、中央民族大學(xué)、東北大學(xué)、蘭州大學(xué)、西北農(nóng)林科技大學(xué)。


          以上為39所985高校,同時它們也是211高校。


          第四梯度的有上海財經(jīng)大學(xué)、中央財經(jīng)大學(xué)、對外經(jīng)濟貿(mào)易大學(xué)、北京外國語大學(xué)、中國政法大學(xué)、北京郵電大學(xué)、上海外國語大學(xué)、西南財經(jīng)大學(xué)、中國傳媒大學(xué)、中南財經(jīng)政法大學(xué)、南京航空航天大學(xué)、北京科技大學(xué)、北京交通大學(xué)、華東理工大學(xué)、西安電子科技大學(xué)、天津醫(yī)科大學(xué)、南京理工大學(xué)、華中師范大學(xué)、哈爾濱工程大學(xué)、華北電力大學(xué)、北京中醫(yī)藥大學(xué)、暨南大學(xué)、蘇州大學(xué)、武漢理工大學(xué)。


          第五梯度的有中國藥科大學(xué)、東華大學(xué)、河海大學(xué)、北京林業(yè)大學(xué)、河北工業(yè)大學(xué)、北京工業(yè)大學(xué)、江南大學(xué)、北京化工大學(xué)、西南交通大學(xué)、上海大學(xué)、南京師范大學(xué)、中國地質(zhì)大學(xué)(武漢)、中國地質(zhì)大學(xué)(北京)、西北大學(xué)、東北師范大學(xué)、長安大學(xué)、中國礦業(yè)大學(xué)(北京)、華中農(nóng)業(yè)大學(xué)、合肥工業(yè)大學(xué)、廣西大學(xué)、中國石油大學(xué)(華東)、陜西師范大學(xué)、南京農(nóng)業(yè)大學(xué)。


          第六梯度的有湖南師范大學(xué)、福州大學(xué)、大連海事大學(xué)、西南大學(xué)、中國礦業(yè)大學(xué)、云南大學(xué)、太原理工大學(xué)、華南師范大學(xué)、北京體育大學(xué)、中國石油大學(xué)(北京)、安徽大學(xué)、東北林業(yè)大學(xué)、東北農(nóng)業(yè)大學(xué)、遼寧大學(xué)、南昌大學(xué)、延邊大學(xué)、內(nèi)蒙古大學(xué)、四川農(nóng)業(yè)大學(xué)、海南大學(xué)、貴州大學(xué)、鄭州大學(xué)、新疆大學(xué)、寧夏大學(xué)、石河子大學(xué)、青海大學(xué)、中央音樂學(xué)院、西藏大學(xué)、第二軍醫(yī)大學(xué)、第四軍醫(yī)大學(xué)。


          那么這116所211大學(xué)都在哪里呢?我們用Python動態(tài)圖來盤點一下吧!


          先上圖片

          再上視頻



          最后上代碼


          import numpy as np 
          import pandas as pd 
          import geopandas as gpd 
          import shapely 
          from shapely import geometry as geo 
          from shapely import wkt 
          import geopandas as gpd 
          import matplotlib.pyplot as plt 
          import matplotlib.animation as  animation 
          import contextily as ctx

          import imageio
          import os 
          from PIL import Image

          plt.rcParams['font.family'] = 'sans-serif'
          plt.rcParams['font.sans-serif'] = ['SimHei']
          plt.rcParams['axes.unicode_minus'] = False
          plt.rcParams['animation.writer'] = 'html'
          plt.rcParams['animation.embed_limit'] = 100

          def rgba_to_rgb(img_rgba):
              img_rgb = Image.new("RGB", img_rgba.size, (255255255))
              img_rgb.paste(img_rgba, mask=img_rgba.split()[3]) 
              return img_rgb 

          def html_to_gif(html_file, gif_file, duration=0.5):
              path = html_file.replace(".html","_frames")
              images = [os.path.join(path,x) for x in sorted(os.listdir(path))]
              frames = [imageio.imread(x) for x in images]
              if frames[0].shape[-1]==4:
                  frames = [np.array(rgba_to_rgb(Image.fromarray(x))) for x in frames]
              imageio.mimsave(gif_file, frames, 'gif', duration=duration)
              return gif_file

          cmap = [
          '#2E91E5',
          '#1CA71C',
          '#DA16FF',
          '#B68100',
          '#EB663B',
          '#00A08B',
          '#FC0080',
          '#6C7C32',
          '#862A16',
          '#620042',
          '#DA60CA',
          '#0D2A63']*100

          def getCoords(geom):
              if isinstance(geom,geo.MultiPolygon):
                  return [np.array(g.exterior) for g in geom.geoms]
              elif isinstance(geom,geo.Polygon):
                  return [np.array(geom.exterior)]
              elif isinstance(geom,geo.LineString):
                  return [np.array(geom)]
              elif isinstance(geom,geo.MultiLineString):
                  return [np.array(x) for x in list(geom.geoms)]
              else:
                  raise Exception("geom must be one of [polygon,MultiPolygon,LineString,MultiLineString]!")

          #底圖數(shù)據(jù)
          dfprovince = gpd.read_file("./data/dfprovince.geojson").set_crs("epsg:4326").to_crs("epsg:2343")
          dfnanhai = gpd.read_file("./data/dfnanhai.geojson").set_crs("epsg:4326").to_crs("epsg:2343")
          dfline9 =  dfnanhai[(dfnanhai["LENGTH"]>1.0)&(dfnanhai["LENGTH"]<2.0)]

          #散點數(shù)據(jù)
          df985 = gpd.read_file("./data/中國985大學(xué).geojson").set_crs("epsg:4326").to_crs("epsg:2343")
          df211 = gpd.read_file("./data/中國211大學(xué).geojson").set_crs("epsg:4326").to_crs("epsg:2343")
          dfpoints = pd.concat([df985,df211],axis = 0)
          df = pd.DataFrame({"x":[pt.x for pt in dfpoints["geometry"]],
                            "y": [pt.y for pt in dfpoints["geometry"]]})
          df["z"] = 1.0
          df.index = dfpoints["name"].values

          def bubble_map_dance(df,title = "中國116所211高校位置分布",
                               filename = None,
                               figsize = (8,6),dpi = 144,
                               duration = 0.5,
                               anotate_points = ["北京郵電大學(xué)","南昌大學(xué)","華中農(nóng)業(yè)大學(xué)","東華大學(xué)","云南大學(xué)",
                               "陜西師范大學(xué)","內(nèi)蒙古大學(xué)","西藏大學(xué)","新疆大學(xué)","青海大學(xué)","哈爾濱工程大學(xué)"])
          :


              fig, ax_base =plt.subplots(figsize=figsize,dpi=dpi)
              ax_child=fig.add_axes([0.800,0.125,0.10,0.20])
              
              def plot_frame(i):

                      ax_base.clear()
                      ax_child.clear()

                      #============================================================
                      #繪制底圖
                      #============================================================

                      #繪制省邊界
                      polygons = [getCoords(x) for x in dfprovince["geometry"]]
                      for j,coords in enumerate(polygons):
                          for x in coords:
                              poly = plt.Polygon(x, fill=True, ec = "gray", fc = "white",alpha=0.5,linewidth=.8)
                              poly_child = plt.Polygon(x, fill=True, ec = "gray", fc = "white",alpha=0.5,linewidth=.8)
                              ax_base.add_patch(poly)
                              ax_child.add_patch(poly_child )

                      #繪制九段線
                      coords = [getCoords(x) for x in dfline9["geometry"]]
                      lines = [y for x in coords for y in x ]
                      for ln in lines:
                          x, y = np.transpose(ln)
                          line = plt.Line2D(x,y,color="gray",linestyle="-.",linewidth=1.5)
                          line_child = plt.Line2D(x,y,color="gray",linestyle="-.",linewidth=1.5)
                          ax_base.add_artist(line)
                          ax_child.add_artist(line_child)



                      #設(shè)置spine格式
                      for spine in['top','left',"bottom","right"]:
                          ax_base.spines[spine].set_color("none")
                          ax_child.spines[spine].set_alpha(0.5)
                      ax_base.axis("off")
                      

                      #設(shè)置繪圖范圍
                      bounds = dfprovince.total_bounds
                      ax_base.set_xlim(bounds[0]-(bounds[2]-bounds[0])/10, bounds[2]+(bounds[2]-bounds[0])/10)
                      ax_base.set_ylim(bounds[1]+(bounds[3]-bounds[1])/3.5, bounds[3]+(bounds[3]-bounds[1])/100)

                      ax_child.set_xlim(bounds[2]-(bounds[2]-bounds[0])/2.5, bounds[2]-(bounds[2]-bounds[0])/20)
                      ax_child.set_ylim(bounds[1]-(bounds[3]-bounds[1])/20, bounds[1]+(bounds[3]-bounds[1])/2)

                      #移除坐標(biāo)軸刻度
                      ax_child.set_xticks([]);
                      ax_child.set_yticks([]);

                      #============================================================
                      #繪制散點
                      #============================================================

                      k = i//3+1
                      m = i%3
                      text = "NO."+str(k) 

                      dfdata = df.iloc[:k,:].copy()
                      dftmp = df.iloc[:k-1,:].copy()

                      # 繪制散點圖像
                      if len(dftmp)>0:
                          ax_base.scatter(dftmp["x"],dftmp["y"],s = 100*dftmp["z"]/df["z"].mean(),
                                 c = (cmap*100)[0:len(dftmp)],alpha = 0.3,zorder = 3)
                          ax_child.scatter(dftmp["x"],dftmp["y"],s = 100*dftmp["z"]/df["z"].mean(),
                                 c = (cmap*100)[0:len(dftmp)],alpha = 0.3,zorder = 3)

                          # 添加注釋文字
                          for i,p in enumerate(dftmp.index):
                              px,py,pz = dftmp.loc[p,["x","y","z"]].tolist() 
                              if p in anotate_points:
                                  ax_base.annotate(p,xy = (px,py),  xycoords = "data",xytext = (-15,10),
                                  fontsize = 10,fontweight = "bold",color = cmap[i], textcoords = "offset points")
                      
                      # 添加標(biāo)題和排名序號
                      #ax_base.set_title(title,color = "black",fontsize = 12)
                      ax_base.text(0.50.95, title, va="center", ha="center"
                                  size = 12,transform = ax_base.transAxes)
                      ax_base.text(0.50.5, text, va="center", ha="center"
                                   alpha=0.3, size = 50,transform = ax_base.transAxes)

                      # 添加注意力動畫
                      if m==0:
                          px,py,pz = dfdata["x"][[-1]],dfdata["y"][[-1]],dfdata["z"][-1]
                          p = dfdata.index[-1]
                          ax_base.scatter(px,py,s = 800*pz/df["z"].mean(),
                             c = cmap[len(dfdata)-1:len(dfdata)],alpha = 0.5,zorder = 4)
                          ax_base.annotate(p,xy = (px,py),  xycoords = "data",
                                  xytext = (-15,10),fontsize = 20,fontweight = "bold",
                                  color = cmap[k-1], textcoords = "offset points",zorder = 5)
                          
                      if m==1:
                          px,py,pz = dfdata["x"][[-1]],dfdata["y"][[-1]],dfdata["z"][-1]
                          p = dfdata.index[-1]
                          ax_base.scatter(px,py,s = 400*pz/df["z"].mean(),
                             c = cmap[len(dfdata)-1:len(dfdata)],alpha = 0.5,zorder = 4)
                          ax_base.annotate(p,xy = (px,py),  xycoords = "data",
                                  xytext = (-15,10),fontsize = 15,fontweight = "bold",
                                  color = cmap[k-1], textcoords = "offset points",zorder = 5)

                      if m==2:
                          px,py,pz = dfdata["x"][[-1]],dfdata["y"][[-1]],dfdata["z"][-1]
                          p = dfdata.index[-1]
                          ax_base.scatter(px,py,s = 100*pz/df["z"].mean(),
                             c = cmap[len(dfdata)-1:len(dfdata)],alpha = 0.5,zorder = 4)
                          ax_base.annotate(p,xy = (px,py),  xycoords = "data",
                                  xytext = (-15,10),fontsize = 10,fontweight = "bold",
                                  color = cmap[k-1], textcoords = "offset points",zorder = 5)
                          
              my_animation = animation.FuncAnimation(fig,plot_frame,frames = range(0,3*len(df)),interval = int(duration*1000))
              
              if filename is None:
                  try:
                      from IPython.display import HTML
                      HTML(my_animation.to_jshtml())
                      return HTML(my_animation.to_jshtml())
                  except ImportError:
                      pass
              else:
                  my_animation.save(filename)
                  return filename


          html_file = "中國116所211高校位置分布.html"
          bubble_map_dance(df,filename = html_file)

          gif_file = html_file.replace(".html",".gif")
          html_to_gif(html_file,gif_file,duration=0.5)


          收工。

          ------------------- End -------------------

          往期精彩文章推薦:

          歡迎大家點贊,留言,轉(zhuǎn)發(fā),轉(zhuǎn)載,感謝大家的相伴與支持

          想加入Python學(xué)習(xí)群請在后臺回復(fù)【入群

          萬水千山總是情,點個【在看】行不行

          /今日留言主題/

          隨便說一兩句吧~~

          瀏覽 109
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  内射学生妹J亅 | 夜夜骚av.一区二区三区 | 欧美天天黄 | 日本中文不卡视频 | 最新亚洲中文字幕 |