Commit 369dd3c5 authored by Mario Chirinos's avatar Mario Chirinos

colonias

parent cb736546
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,15 +7,15 @@ import csv
import os
import datetime
#===============================================================================
def createDirectories(datafile, cfgfile):
def createDirectories(datafile, cfgfile, level1="CVE_ENT", level2="CVE_MUN"):
with open(cfgfile) as cfg_file:
cfg = json.load(cfg_file)
with open(datafile) as csvfile:
data = csv.DictReader(csvfile, delimiter=',')
for row in data:
mun = row["CVE_MUN"]
ent = row["CVE_ENT"]
mun = row[level1]
ent = row[level2]
dirname = ent+mun
print(ent)
# for k in cfg.keys():
......
......@@ -8,6 +8,7 @@ import csv
def getMinMax(clase):
polylist = []
for item in os.listdir("."):
if os.path.isdir(item):
print(item)
......@@ -23,6 +24,7 @@ def getMinMax(clase):
values.append(v[clase])
minval = min(values)
maxval = max(values)
polylist.append({"clave": item, "wkt":wkt, "min":minval, "max":maxval})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment