Commit adfb204f authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Adapted GDE_check_consistency.py to deal with names of 30'' ind cells

parent 8676ffa1
......@@ -126,7 +126,11 @@ def run_this_file(config_dict):
out_list= [country_admin_id]
if len(country_admin_id_split)>1: # to get rid of "GR"
for occu in list(dfs_dict.keys()):
which= np.where(dfs_dict[occu]['id_'+str(admin_levels[occu])].values==int(country_admin_id_split[1]))[0]
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]
else: # e.g. industrial 30-arcsec cells
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]
sera_num_bdgs_j= dfs_dict[occu]['buildings'].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()
......
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