GFDRR / rdl-data

Challenge Fund Database combining Hazard, Exposure, Loss and Vulnerability schema into a single database
GNU Affero General Public License v3.0
1 stars 2 forks source link

Consistent country reference #4

Closed stufraser1 closed 3 years ago

stufraser1 commented 3 years ago

MOVER, using ("PRT;FRA;ITA;MAR;BGR", "TZA") is inconsistent with the other schema in data content and meaning (represents the country for which the curves are developed - data form that country); To make consistent, propose to add a new field for country name (and possibly country ISO to other schema). Different info labelling could account for difference in meaning This shows that values could be a list (covering more than one country).

stufraser1 commented 3 years ago

see also https://github.com/GFDRR/rdl-data/issues/18

matamadio commented 3 years ago

Instead of adding the field to all the 4 schemas, could that be just part of the "common" attributes schema?

stufraser1 commented 3 years ago

The list of country codes, names should be - as for hazard codes - to ensure each schema uses same values. Each schema would need to include though, with country code as value.

On Fri, 18 Dec 2020 at 10:21, Mattia Amadio notifications@github.com wrote:

Instead of adding the field to all the 4 schemas, could that be just part of the "common" attributes schema?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GFDRR/rdl-data/issues/4#issuecomment-748005921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7PNYTAWOZKBZBEXICFCMDSVMUI5ANCNFSM4UJDQ2QQ .

matamadio commented 3 years ago

Proposal using common table applied to each schema:

Table name Required Field name Type Description
cf_common.isocover * code ENUM Alpha-3 ISO 3166 country code(s), separated by comma.

TYPES

Country isocover_enum
Afghanistan AFG
Albania ALB

...

stufraser1 commented 3 years ago

agree - but ensure to use WB official country names

On Fri, 18 Dec 2020 at 11:36, Mattia Amadio notifications@github.com wrote:

Proposal using common table applied to each schema: Table name Required Field name Type Description cf_common.isocover * code ENUM Alpha-3 ISO 3166 country code(s), separated by comma.

TYPES Country isocover_enum Afghanistan AFG Albania ALB ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GFDRR/rdl-data/issues/4#issuecomment-748038655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7PNYSPLWOOY7RU62BJZY3SVM5FPANCNFSM4UJDQ2QQ .

matamadio commented 3 years ago

Table added to documentation. common schema: https://gfdrr.github.io/rdl-doc/common.html#table-cf_commoniso

It has to be referenced in each schema and added to SQL, see #27 @ConnectedSystems

ConnectedSystems commented 3 years ago

Added in, but could not consistently enforce foreign key relationships.

Contribution tables for

do not currently have a country_iso field.

Vulnerability/Mover does.

EDIT: I've added a country_iso field into the above 3, @MamadioCMCC could you update the documentation to reflect this?

matamadio commented 3 years ago

Yes, I will thanks. Btw, we should enable one or more country to be listed (e.g. ITA; FRA; SPA) for regional datasets