############################## Map Projection (using Cartopy) ############################## This page introduces a program that plots monthly temperature at each station on a map. Monthly dataset --------------- If data has a higher time resolution than the monthly average, you need to calculate the monthly average. .. literalinclude:: programs/maps.temp.py :language: python :lines: 61-62 Monthly temperature plots on a map ---------------------------------- Cartopy install =============== The map projection uses `cartopy `__ package. The information on cartopy installation is available `here `__. You can simply command ``$ conda install -n env_weclim -c conda-forge cartopy``. Map plots ========= The background map can be drawn using the following commends: .. literalinclude:: programs/maps.temp.py :language: python :lines: 15-16, 93-101 The monthly temperature can be plots at each location using ``pandas.DataFrame.plot`` command (`command information `__). .. literalinclude:: programs/maps.temp.py :language: python :lines: 104-118 Sample program for maps ======================== Source file: :download:`maps.temp.py ` Create animation ---------------- PNG files can be converted to animated images (gif file). .. literalinclude:: programs/animate.txt :lines: 1 Here, ``-delay N`` is the frame rate of N/100 (seconds) and ``-loop M`` is the number of loop of the animation image. You can check the animation image as ``$ animate XX.gif``. Gallery ------- Monthly temperature at each weather station (oC). .. image:: SRC/TAIR.gif :height: 300