Commit 1e1d42c2 authored by Christine Plumejeaud's avatar Christine Plumejeaud
Browse files

apidata : ajout de nb_longcours_marseille pour le choix

Départ au long cours/Clearances (to America and Indian ocean)
qui correspond à la source Expéditions coloniales Marseille (1789)
(119 entrées en 1789)
parent 5f9f874b
......@@ -900,6 +900,7 @@ Fields counting *congés* data from sources :
- nb_conges_cr : number of congés that are known to exist, according to national records (archives), and that are expected. For a given year
- nb_conges_sante : number of congés recorded in database, from register of the office of health of Marseille ("Santé Marseille"), incoming ships only. For a given year
- nb_petitcabotage : number of congés recorded in database, from register "Registre du petit cabotage (1786-1787)" of Marseille (mainly ships coming from Mediterranean areas), incoming ships only. For a given year
- nb_longcours_marseille : number of Clearances (to America and Indian ocean) , from register "Expéditions coloniales Marseille (1789)" of Marseille. For a given year
Other computed fields :
......@@ -967,6 +968,7 @@ Examples :
(case when pointcall_year = '1787' then nb_conges_1787_cr else nb_conges_1789_cr end) as nb_conges_cr,
(case when pointcall_year = '1787' then nb_sante_1787 else nb_sante_1789 end) as nb_conges_sante,
(case when pointcall_year = '1787' then nb_petitcabotage_1787 else nb_petitcabotage_1789 end) as nb_petitcabotage,
(case when pointcall_year = '1787' then null else nb_longcours_marseille_1789 end) as nb_longcours_marseille,
total,
nb_tonnage_filled, nb_homeport_filled, nb_product_filled, nb_birthplace_filled, nb_citizenship_filled, nb_flag_filled, good_sum_tonnage
"""
......@@ -974,7 +976,7 @@ Examples :
#print(fields_for_select)
union_G5_1787_CRonly=f"""
ogc_fid, uhgs_id, {localizedDatabaseFieldNames} status, has_a_clerk, geonameid, amiraute as admiralty, province, shiparea , ST_AsGeoJSON(ST_Transform(geom,{srid})) as point, 'G5' as source_suite, 1787 as pointcall_year, nb_conges_1787_inputdone as nb_conges_inputdone, nb_conges_1787_cr as nb_conges_cr, nb_sante_1787 as nb_conges_sante, nb_petitcabotage_1787 as nb_petitcabotage, null as total, null as nb_tonnage_filled, null as nb_homeport_filled, null as nb_product_filled, null as nb_birthplace_filled, null as nb_citizenship_filled, null as nb_flag_filled, null as good_sum_tonnage
ogc_fid, uhgs_id, {localizedDatabaseFieldNames} status, has_a_clerk, geonameid, amiraute as admiralty, province, shiparea , ST_AsGeoJSON(ST_Transform(geom,{srid})) as point, 'G5' as source_suite, 1787 as pointcall_year, nb_conges_1787_inputdone as nb_conges_inputdone, nb_conges_1787_cr as nb_conges_cr, nb_sante_1787 as nb_conges_sante, nb_petitcabotage_1787 as nb_petitcabotage, null as nb_longcours_marseille, null as total, null as nb_tonnage_filled, null as nb_homeport_filled, null as nb_product_filled, null as nb_birthplace_filled, null as nb_citizenship_filled, null as nb_flag_filled, null as good_sum_tonnage
"""
union_G5_1787_CRonly=handleParams(union_G5_1787_CRonly) # ne garde que les champs demandés dans 'params'
......@@ -983,7 +985,7 @@ Examples :
#print('########### union_missing ###############'+union_missing)
union_G5_1789_CRonly=f"""
ogc_fid, uhgs_id, {localizedDatabaseFieldNames} status, has_a_clerk, geonameid, amiraute as admiralty, province, shiparea , ST_AsGeoJSON(ST_Transform(geom,{srid})) as point, 'G5' as source_suite, 1789 as pointcall_year, nb_conges_1789_inputdone as nb_conges_inputdone, nb_conges_1789_cr as nb_conges_cr, nb_sante_1789 as nb_conges_sante, nb_petitcabotage_1789 as nb_petitcabotage, null as total, null as nb_tonnage_filled, null as nb_homeport_filled, null as nb_product_filled, null as nb_birthplace_filled, null as nb_citizenship_filled, null as nb_flag_filled, null as good_sum_tonnage
ogc_fid, uhgs_id, {localizedDatabaseFieldNames} status, has_a_clerk, geonameid, amiraute as admiralty, province, shiparea , ST_AsGeoJSON(ST_Transform(geom,{srid})) as point, 'G5' as source_suite, 1789 as pointcall_year, nb_conges_1789_inputdone as nb_conges_inputdone, nb_conges_1789_cr as nb_conges_cr, nb_sante_1789 as nb_conges_sante, nb_petitcabotage_1789 as nb_petitcabotage, nb_longcours_marseille_1789 as nb_longcours_marseille, null as total, null as nb_tonnage_filled, null as nb_homeport_filled, null as nb_product_filled, null as nb_birthplace_filled, null as nb_citizenship_filled, null as nb_flag_filled, null as good_sum_tonnage
"""
union_G5_1789_CRonly=handleParams(union_G5_1789_CRonly) # ne garde que les champs demandés dans 'params'
......@@ -1029,7 +1031,7 @@ Examples :
)
{clause_order_by}
"""
#print(query)
print(query)
......
Supports Markdown
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