discard GPH depencies and city_part_of
When calculating the wrold trade estimations we sum total trade from reporting by using their total (as reported) or their bilateral trade (sum partners).
When doing this we should remove from the calculation the reporting which are :
- GPH "part of" of sovereign (as stated by GPH) for which we have trade data
- locality RIC part of another RIC for which we have trade data
Pseudo algo to do thata :
# load over status over time GPH
for each status
add a "reporting_GPH_status" in ricardo flows (flag all flows of status years)
add a "reporting_sovereign" in ricardo flows (flag all flows of status years)
group flow by year, reporting sovereign filter (reporting_ GPH_status == "part_of")
how many trade flows which are not total trade estimations for this reporting
if this number > 0 add a "ignore_in_world_sumpartners_reported_calculation"
Ignore flows in world trade calculation (made in API)
discard overlaping group or entities
It can happen to have two series of trade for A and A & B for the same year from different sources.
Priority being assessed by:
- source type : primary, primary_yearbook, secondary, estimation
- GPH status: sovereign...
- RICtype : GPH_entity above all others
discard GPH depencies and city_part_of
When calculating the wrold trade estimations we sum total trade from reporting by using their total (as reported) or their bilateral trade (sum partners).
When doing this we should remove from the calculation the reporting which are :
Pseudo algo to do thata :
discard overlaping group or entities
It can happen to have two series of trade for A and A & B for the same year from different sources.
Priority being assessed by: