Jun 01, 2021 Article blog
This article was reproduced to Know ID: Charles (Bai Lu) knows his personal column
Download the W3Cschool Mobile App, 0 Foundation Anytime, Anywhere Learning Programming >> Poke this to learn
Visualize geographic information with Python.
Python's Basemap library is used primarily.
Just make up another wave of data visual analysis, although there is no technical content, according to the official website tutorial copy.
However, the painted picture face value is still very high
Let's Go~~~
Baidu web download link:
https://pan.baidu.com/s/1lqrUYFzxwMNF-dS4ypRgdw
Password: e1ce
Python version: 3.6.4
Related modules:
pandas module;
matplotlib module;
Basemap module;
numpy module;
xlrd module;
and some Python's own modules.
Install Python and add it to the environment variable.
(1) basemap installation
Step1:
Install the geos module in the cmd window using the pip command, i.e.:
pip install geos
Step2:
On the https://www.lfd.uci.edu/~gohlke/pythonlibs/ download the whl file for the Python version of pyproj and basemap, and install it in turn using the pip command. The Python 3.6 (64-bit) version of the whl file is available in the relevant file.
(2) Installation of other packages
Install with the pip command in the cmd window.
If the installation fails, you can also go to:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
After downloading the whl file corresponding to the Python version, install it with the pip command.
(3) Additional instructions
If pip downloads third-party packages too slowly. You can try replacing the pip source.
See:
The Python-TF implementation verification code recognition is described in the article.
The main idea
Get the data you need.
Then according to the official website tutorial imitation, but also refer to some blog post.
that's T_T, it's simple.
Links to data downloads are:
Data on urban latitude and longitude, GDP and population
https://www.gadm.org/download
Web interface:
Meteorological data
(1) Link 1
http://hdfeos.org/zoo/index_openGESDISC_Examples.php#MERRA
Web interface:
(2) Link 2
https://disc2.gesdisc.eosdis.nasa.gov/data//TRMM_L3/TRMM_3B42_Daily.7/
Web interface:
III. Basemap tutorial
(1) Link 1
https://matplotlib.org/basemap/index.html
(2) Link 2
http://basemaptutorial.readthedocs.io/en/latest/index.html
I don't know if it's because of a VPN or because the original resource download speed is limited, NASA's weather data download speed is very slow. S o I didn't download it, but it was posted. For use by those in need.
The data resources required by the code have been shared in the relevant files.
The implementation process can be found in the source code.
(1) An example of an official website
Menorca:
Miller Cylindrical Projection:
NASA's 'Blue Marble':
(2) Imitation example
Topographic map of China:
Chinese distribution map (data is incomplete so...
):
U.S. Population Map:
That's all.
Data visualization tools are also a lot of T_T.
Later from time to time water some high-value data visualization analysis tools.
The code is correct as of 2018-04-11.