Created
June 3, 2018 17:30
-
-
Save sergiolucero/6dddec36ff4dd18f41504d2baf120760 to your computer and use it in GitHub Desktop.
Comunas de Chile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!wget https://www.bcn.cl/siit/obtienearchivo?id=repositorio/10221/10396/1/division_comunal.zip | |
#!mv obtienearchivo\?id\=repositorio%2F10221%2F10396%2F1%2Fdivision_comunal.zip comunal.zip | |
#!unzip comunal | |
#!pip install geopandas | |
import geopandas as gp | |
df = gp.read_file('division_comunal.shp') | |
#df.NOM_REG.unique() | |
rmdf = df[df.NOM_REG=='Región Metropolitana de Santiago'] | |
print('Procesamos %d comunas en la Región Metropolitana' %len(rmdf)) | |
rmdf.to_pickle('rm.pk') # 780K! upload to quant.cl for reference (just repeat the above) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment