~tfardet/gistools

a3774b8905bb7a9499d724171e3fdab8ce570388 — Tanguy Fardet a month ago 9b1ba77
Fix assert in French population
1 files changed, 4 insertions(+), 3 deletions(-)

M countries/FRA/fra_pop.py
M countries/FRA/fra_pop.py => countries/FRA/fra_pop.py +4 -3
@@ 706,9 706,10 @@ def local_population(

    pop = pd.DataFrame(res)

    if ages.empty and area.iloc[0].admin_level >= 4:
        assert np.isclose(
            area.iloc[0].population, pop.residents.sum(), atol=0.1)
    if ages.empty:
        if area.iloc[0].admin_level >= 4:
            assert np.isclose(
                area.iloc[0].population, pop.residents.sum(), atol=0.1)
    else:
        assert np.isclose(ages.OBS_VALUE.sum(), pop.residents.sum(), atol=0.1)