Skip to content

Commit

Permalink
Add mcf for exchange rate and currency schemas (datacommonsorg#405)
Browse files Browse the repository at this point in the history
* Create fao_exchange_rate_currency_stat_vars.mcf

* Update dcschema_enum_classes.mcf

adding Currency and CurrencyUnitStandardizationEnum to list of DC enums. Note that once schema.org refactor is done for ExchangeRateSpecification (aka Currency in DC), we can move the Currency node to the core/schema.mcf file.

* Update dcschema.mcf

2 new properties for FAO exchange rate and currency schema import

* Update dcschema.mcf

Adding usesCurrency as DC property here until refactor of currency into usesCurrency on schema.org takes place. After that, can edit currency property in core/schema.mcf to reflect new name.

* Update dcschema_enum_instances.mcf

Add enum instances for new CurrencyUnitStandardizationEnum

* Update dcschema.mcf

* Update dcschema_enum_classes.mcf

* Update fao_exchange_rate_currency_stat_vars.mcf

* Update dcschema_enum_instances.mcf

* Update dcschema.mcf

* Update dcschema_enum_classes.mcf

Move Currency to its own mcf file

* Create currency.mcf

Creating new mcf file for Currency. All world currencies based on current ISO 4217 code list will be added here as instances in subsequent PR.

* Update currency.mcf

* Update dcschema.mcf

changed description for exchangeRate to include base price; fixed nits

* Update fao_exchange_rate_currency_stat_vars.mcf

adding name and typeOf

* Update dcschema.mcf

update example for exchangeRate

* Update dcschema.mcf

* Update dcschema.mcf

* Update dcschema.mcf

* Update dcschema_enum_instances.mcf

* Update dcschema.mcf

* Update dcschema.mcf

update range of useCurrency to be Currency instead of CurrencyUnitOfMeasure
  • Loading branch information
lucy-kind authored Dec 13, 2022
1 parent c57a594 commit eddf78b
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/currency.mcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Node: dcid:Currency
typeOf: schema:Class
subClassOf: dcs:CurrencyUnitOfMeasure
description: "An official world currency as determined by the ISO 4217 currency list."
name: "Currency"
21 changes: 21 additions & 0 deletions core/dcschema.mcf
Original file line number Diff line number Diff line change
Expand Up @@ -2898,3 +2898,24 @@ Node: dcid:Portion
typeOf: dcs:UnitOfMeasure
name: "Portion"
description: "A unit of measure used to measure serving of food."

Node: dcid:exchangeRate
typeOf: schema:Property
name: "exchangeRate"
description: "The price of a base currency needed in order to exchange to a single unit of another currency, e.g. if the exchange rate of EUR to GBP is 1.2, it takes 1.2 EUR to exchange for 1 GBP."
domainIncludes: schema:Currency
rangeIncludes: schema:Quantity

Node: dcid:currencyISOCode
typeOf: schema:Property
name: "currencyISOCode"
description: "The current ISO 4217 code assigned to a currency unit."
domainIncludes: dcs:Currency
rangeIncludes: schema:Text

Node: dcid:usesCurrency
typeOf: schema:Property
name: "usesCurrency"
description: "The unit of currency used by a Place."
domainIncludes: schema:Place
rangeIncludes: dcs:Currency
7 changes: 7 additions & 0 deletions core/dcschema_enum_classes.mcf
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,10 @@ Node: dcid:ClimaticSeasonEnum
typeOf: schema:Class
subClassOf: schema:Enumeration
name: "ClimaticSeasonEnum"

Node: dcid:CurrencyUnitStandardizationEnum
typeOf: schema:Class
subClassOf: schema:Enumeration
description: "Identifies whether the currency of a region is represented in the currency of the observation period (LocalCurrency), or the current currency of the region (Standardized)."
name: "CurrencyUnitStandardizationEnum"

10 changes: 10 additions & 0 deletions core/dcschema_enum_instances.mcf
Original file line number Diff line number Diff line change
Expand Up @@ -2185,3 +2185,13 @@ typeOf: dcs:FBI_MeasurementQualifierEnum
Node: dcid:SummerSeason
name: "SummerSeason"
typeOf: dcs:ClimaticSeasonEnum

Node: dcid:LocalCurrency
name: "LocalCurrency"
typeOf: dcs:CurrencyUnitStandardizationEnum
description: "The actual currency of a region used during a particular observation period."

Node: dcid:StandardizedCurrency
name: "StandardizedCurrency"
typeOf: dcs:CurrencyUnitStandardizationEnum
description: "The standardized currency used by a region in its most recent reference year."
15 changes: 15 additions & 0 deletions stat_vars/fao_exchange_rate_currency_stat_vars.mcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Node: dcid:ExchangeRate_Currency_Local
name: "Exchange Rate"
typeOf: dcs:StatisticalVariable
populationType: dcs:Currency
measuredProperty: dcs:exchangeRate
statType: dcs:measuredValue
measurementQualifier: dcs:LocalCurrency

Node: dcid:ExchangeRate_Currency_Standardized
name: "Exchange Rate, Standardized"
typeOf: dcs:StatisticalVariable
populationType: dcs:Currency
measuredProperty: dcs:exchangeRate
statType: dcs:measuredValue
measurementQualifier: dcs:StandardizedCurrency

0 comments on commit eddf78b

Please sign in to comment.