Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
greenIndex
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
greenIndex
Commits
369dd3c5
Commit
369dd3c5
authored
Aug 20, 2020
by
Mario Chirinos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
colonias
parent
cb736546
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1818 additions
and
3 deletions
+1818
-3
09_col.csv
data/ent/09_col.csv
+1813
-0
GI_createDirectories.py
scripts/GI_createDirectories.py
+3
-3
GI_getMinMax.py
scripts/GI_getMinMax.py
+2
-0
No files found.
data/ent/09_col.csv
0 → 100644
View file @
369dd3c5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
scripts/GI_createDirectories.py
View file @
369dd3c5
...
@@ -7,15 +7,15 @@ import csv
...
@@ -7,15 +7,15 @@ import csv
import
os
import
os
import
datetime
import
datetime
#===============================================================================
#===============================================================================
def
createDirectories
(
datafile
,
cfgfile
):
def
createDirectories
(
datafile
,
cfgfile
,
level1
=
"CVE_ENT"
,
level2
=
"CVE_MUN"
):
with
open
(
cfgfile
)
as
cfg_file
:
with
open
(
cfgfile
)
as
cfg_file
:
cfg
=
json
.
load
(
cfg_file
)
cfg
=
json
.
load
(
cfg_file
)
with
open
(
datafile
)
as
csvfile
:
with
open
(
datafile
)
as
csvfile
:
data
=
csv
.
DictReader
(
csvfile
,
delimiter
=
','
)
data
=
csv
.
DictReader
(
csvfile
,
delimiter
=
','
)
for
row
in
data
:
for
row
in
data
:
mun
=
row
[
"CVE_MUN"
]
mun
=
row
[
level1
]
ent
=
row
[
"CVE_ENT"
]
ent
=
row
[
level2
]
dirname
=
ent
+
mun
dirname
=
ent
+
mun
print
(
ent
)
print
(
ent
)
# for k in cfg.keys():
# for k in cfg.keys():
...
...
scripts/GI_getMinMax.py
View file @
369dd3c5
...
@@ -8,6 +8,7 @@ import csv
...
@@ -8,6 +8,7 @@ import csv
def
getMinMax
(
clase
):
def
getMinMax
(
clase
):
polylist
=
[]
polylist
=
[]
for
item
in
os
.
listdir
(
"."
):
for
item
in
os
.
listdir
(
"."
):
if
os
.
path
.
isdir
(
item
):
if
os
.
path
.
isdir
(
item
):
print
(
item
)
print
(
item
)
...
@@ -23,6 +24,7 @@ def getMinMax(clase):
...
@@ -23,6 +24,7 @@ def getMinMax(clase):
values
.
append
(
v
[
clase
])
values
.
append
(
v
[
clase
])
minval
=
min
(
values
)
minval
=
min
(
values
)
maxval
=
max
(
values
)
maxval
=
max
(
values
)
polylist
.
append
({
"clave"
:
item
,
"wkt"
:
wkt
,
"min"
:
minval
,
"max"
:
maxval
})
polylist
.
append
({
"clave"
:
item
,
"wkt"
:
wkt
,
"min"
:
minval
,
"max"
:
maxval
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment