Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

mapping with geopandas

import geopandas as gpd
print(gpd.__version__)   ## 0.5
import numpy as np; np.random.seed(42)
import matplotlib.pyplot as plt 

gdf = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')) 
gdf['quant']=np.random.rand(len(gdf))*100-20

fig, ax = plt.subplots()

gdf.plot(column='quant', cmap='RdBu', scheme="User_Defined", 
         legend=True, classification_kwds=dict(bins=[-10,20,30,50,70]),
         ax=ax)

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: remove decimal python 
Python :: check if string equals string in list python 
Python :: python *x 
Python :: odoo order by xml rpc 
Python :: migrations.rename_field django 
Python :: python start process in background and get pid 
Python :: load static 
Python :: recorrer diccionario python 
Python :: python fibonacci function 
Python :: ValueError: query data dimension must match training data dimension 
Python :: map python 3 
Python :: dynamic plot jupyter notebook 
Python :: wav file to array python 
Python :: python close gile 
Python :: python for loop with index 
Python :: pytest logcli to write to file 
Python :: display multiple dataframe as table jupyter notebook 
Python :: python string in list 
Python :: how to hide ticks marks in matplotlib 
Python :: send serial commands in python 
Python :: python verify if string is a integer 
Python :: absolute url 
Python :: python how to sum two lists 
Python :: matplotlib draw line x1, y1 
Python :: restrict ticks to integers matplotlib 
Python :: python scipy moving average 
Python :: python function docstring 
Python :: purpose of meta class in django 
Python :: gridsearch cv 
Python :: global variable python 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =