Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dynamic Exposure
Legacy
gde_calculations_prototype
Commits
c2d041a6
Commit
c2d041a6
authored
Jun 04, 2021
by
Cecilia Nievas
Browse files
Fixed bug: some tabs instead of spaces in GDE_check_consistency.py
parent
5999f08a
Changes
1
Hide whitespace changes
Inline
Side-by-side
GDE_check_consistency.py
View file @
c2d041a6
...
@@ -127,10 +127,10 @@ def run_this_file(config_dict):
...
@@ -127,10 +127,10 @@ def run_this_file(config_dict):
if
len
(
country_admin_id_split
)
>
1
:
# to get rid of "GR"
if
len
(
country_admin_id_split
)
>
1
:
# to get rid of "GR"
for
occu
in
list
(
dfs_dict
.
keys
()):
for
occu
in
list
(
dfs_dict
.
keys
()):
if
len
(
country_admin_id_split
)
==
2
:
if
len
(
country_admin_id_split
)
==
2
:
which
=
np
.
where
(
dfs_dict
[
occu
][
'id_'
+
str
(
admin_levels
[
occu
])].
values
==
int
(
country_admin_id_split
[
1
]))[
0
]
which
=
np
.
where
(
dfs_dict
[
occu
][
'id_'
+
str
(
admin_levels
[
occu
])].
values
==
int
(
country_admin_id_split
[
1
]))[
0
]
else
:
# e.g. industrial 30-arcsec cells
else
:
# e.g. industrial 30-arcsec cells
country_admin_id_split_reconstruct
=
'_'
.
join
(
country_admin_id_split
[
1
:])
country_admin_id_split_reconstruct
=
'_'
.
join
(
country_admin_id_split
[
1
:])
which
=
np
.
where
(
dfs_dict
[
occu
][
'id_'
+
str
(
admin_levels
[
occu
])].
values
==
country_admin_id_split_reconstruct
)[
0
]
which
=
np
.
where
(
dfs_dict
[
occu
][
'id_'
+
str
(
admin_levels
[
occu
])].
values
==
country_admin_id_split_reconstruct
)[
0
]
sera_num_bdgs_j
=
dfs_dict
[
occu
][
'buildings'
].
values
[
which
].
sum
()
sera_num_bdgs_j
=
dfs_dict
[
occu
][
'buildings'
].
values
[
which
].
sum
()
sera_num_dwells_j
=
dfs_dict
[
occu
][
'dwellings'
].
values
[
which
].
sum
()
sera_num_dwells_j
=
dfs_dict
[
occu
][
'dwellings'
].
values
[
which
].
sum
()
sera_num_ppl_j
=
dfs_dict
[
occu
][
'occupants_per_asset'
].
values
[
which
].
sum
()
sera_num_ppl_j
=
dfs_dict
[
occu
][
'occupants_per_asset'
].
values
[
which
].
sum
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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