我们的数据可视化课程已经上线啦!!目前课程的主要方向是 科研、统计、地理相关的学术性图形绘制方法,后续也会增加商务插图、机器学等、数据分析等方面的课程。课程免费新增,这点绝对良心!
我们第一个数据可视化交流圈子也已经上线了,主要以我的第一本书籍《科研论文配图绘制指南-基于Python》为基础进行拓展,提供「课堂式」教学视频,还有更多拓展内容,可视化技巧远超书籍本身,书籍修正和新增都会分享到圈子里面~~
参与课程或者圈子的你将获取到:学员答疑、可视化资源分享、可视化技巧补充、可视化业务代做(学员和甲方对接)、副业交流、提升认知等等。
最近在新增Python数据可视化课程的拓展内容时,发现了一个处理空间数据的超赞工具-「Iris」,下面就给大家详细介绍一下这个工具~~
Iris是一个功能强大、格式无关、社区驱动的Python软件包,用于分析和可视化地球科学数据,尤其在处理多维地球科学数据时表现出色。
Iris可通过如下语句进行安装:
conda install -c conda-forge iris
由于我们目前重点关注的还是其可视化功能,这一小节给大家介绍几个可视化案例。
import matplotlib.pyplot as plt
import iris
import iris.plot as iplt
import iris.quickplot as qplt
def main():
file_path = iris.sample_data_path("toa_brightness_stereographic.nc")
cube = iris.load_cube(file_path)
qplt.contourf(cube)
ax = plt.gca()
ax.coastlines()
ax.gridlines()
iplt.show()
if __name__ == "__main__":
main()
Example of a Polar Stereographic Plot
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import iris
import iris.plot as iplt
import iris.quickplot as qplt
def main():
fname = iris.sample_data_path("air_temp.pp")
temperature = iris.load_cube(fname)
# Plot #1: contourf with axes longitude from -180 to 180
plt.figure(figsize=(12, 5))
plt.subplot(121)
qplt.contourf(temperature, 15)
plt.gca().coastlines()
# Plot #2: contourf with axes longitude from 0 to 360
proj = ccrs.PlateCarree(central_longitude=-180.0)
plt.subplot(122, projection=proj)
qplt.contourf(temperature, 15)
plt.gca().coastlines()
iplt.show()
if __name__ == "__main__":
main()
Quickplot of a 2D Cube on a Map
Test Data Showing Inset Plots
Ionosphere Space Weather
Hovmoller Diagram of Monthly Surface Temperature
Plotting Wind Direction Using Quiver
Tri-Polar Grid Projected Plotting
更多关于Iris库的使用语法和可视化案例,可参考Iris官网[1]
可视化学习圈子是书籍「科研论文配图绘制指南-基于Python」一书的学下圈子:主要通过以下几个方面,给大家带来比纸质书籍更丰富的学习内容:
「PS」:我们直播教学内容为课堂式教学,原作者带着大家对书籍一章、一节、一页的进行教学。而且直播的视频都会通过剪辑后整理成课程,圈子中的同学可以免费、反复观看。当然,新增内容和定期答疑,直播也是如此。
参考资料
[1]
Iris官网: https://scitools-iris.readthedocs.io/en/v3.0.0/index.html。