Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to apply Geographic data Basemap Toolkit

Shulou Source: shulou.com Published: 2022-06-01 07:27:00 09月30日 Update

How to apply geographic data Basemap toolkit, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

(looking forward to drawing in the next issue, this article first introduces the installation of the Basemap toolkit.)

Geographic data Basemap Toolkit-A common type of visualization in data science is geographic data. The main tool Matplotlib uses for this type of visualization is the Basemap toolkit, which is one of several Matplotlib toolkits located under the mpl_toolkits namespace. There is no denying that Basemap is a bit clumsy to use, and even simple visual rendering takes longer than you can imagine.

The following errors usually occur in the course of use

Need to download and install basemap toolkit

1. Install under the Python interpreter (local installation)

Https://matplotlib.org/basemap/

Or

Https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap

Remarks: ctrl + F search basemap

2. Install under Linux

Sudo apt-get install python-mpltoolkits.basemap

3. Install under anaconda

The installation of Basemap is simple; if you are using conda, you can type this and download the package:

Conda install basemap

We only add a new import to the standard template:

# matplotlib inlineimport numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.basemap import Basemap

Once the Basemap toolkit is installed and imported, geographic mapping can be implemented in a few lines (the following graphics also require the PIL package in Python 2 or the pillow package in Python 3):

Plt.figure (figsize= (8,8)) m = Basemap (projection='ortho', resolution=None, lat_0=50, lon_0=-100) m.bluemarble (scale=0.5); novel coronavirus national epidemic interface Api

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Tools toolkits geography data visualization help applications clear clumsy next issue national content graphics notes for this common interfaces articles novices time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia MySQL Docker vpn