Add contributor docs and an example import using Template MCF + StatVarObservation.#3
Conversation
|
|
||
| Contributors need not worry about the process of using template MCF to convert | ||
| datasets to instance MCF, but roughly, for each row of the dataset, we create | ||
| all the nodes in the template MCF specification, subbing in values from the |
| typeOf: StatVarObservation | ||
| variableMeasured: {stat_var} | ||
| observationAbout: C:COVIDTracking_States->GeoId | ||
| observationDate: C:COVIDTracking_States->Date |
There was a problem hiding this comment.
Seems table2mcf takes care of the quoting. Actually doesn't work if I add quotes to observationDate. I did add in dcs: to typeOf, variableMeasured.
| @@ -0,0 +1,60 @@ | |||
| import csv | |||
There was a problem hiding this comment.
(later is fine) might be good if the example has a test. that way, there is some chance that contributors will provide one.
| is a `StatisticalVariable` schema node that only needs to be defined once. | ||
|
|
||
|
|
||
| ## Mapping `StatisticalVariable` and `StatVarObservation` to `StatisticalPopulation` and `Observation` |
There was a problem hiding this comment.
The content here sort presupposes user understands StatPop/Obs. Should we link in the data-model doc that delves into those? Like the one that I think Antares curated.
There was a problem hiding this comment.
I will do this and the test in a separate PR.
edumorlom
left a comment
There was a problem hiding this comment.
Great work! I had trouble finding things to comment 💯
|
|
||
| #### DCID and Name Conventions | ||
|
|
||
| - For non-schema entities, do not use underscores in identifier or DCID fields, |
There was a problem hiding this comment.
Period instead of comma at the end
| The `Observation` copies the `StatisticalVariable`'s `measuredProperty`, | ||
| `measurementMethod`, `measurementQualifier`, `unit`, etc. | ||
| and the `StatVarObservation`'s `observationDate`. It also extracts the | ||
| `statType`value from the `StatisticalVariable` and the `value` value from |
There was a problem hiding this comment.
should there be space after statType and before value?
| - [`Class`](https://schema.org/Class) | ||
| - [`Property`](https://schema.org/Property) | ||
| - [`StatisticalPopulation`](https://schema.org/StatisticalPopulation) | ||
| - [`Observation`](https://schema.org/`Observation`) |
There was a problem hiding this comment.
I think you didn't mean to put the ` in the url. I'm getting a 404 error
| `measurementMethod`, `measurementQualifier`, `unit`, etc. | ||
| and the `StatVarObservation`'s `observationDate`. It also extracts the | ||
| `statType`value from the `StatisticalVariable` and the `value` value from | ||
| the `StatVarObservation` as its own `.*Value` property and value. |
There was a problem hiding this comment.
This last paragraph is a bit confusing, too many values in my opinion.
There was a problem hiding this comment.
Did a little shuffling, hopefully this helps.
|
|
||
| #### Special Namespaces | ||
|
|
||
| The Data Commons graph is built on top of schema.org vocabulary and its Data |
There was a problem hiding this comment.
Sometimes you use Schema.org and other times schema.org
…arObservation. (datacommonsorg#3) * Add docs and example import using Template MCF + StatVarObservation. * Remove backtick formatting from code chunks. * Fix mapping file typo GeoID->GeoId. * Docs directory README: make title more descriptive. * Use .tmcf instead of .mcf for template MCF. This will help disambiguate. * Address PR comments, add to gitignore. Co-authored-by: tjann <tjann@google.com>
Note: Scripting Instance MCF might make more sense for data that needs to be refreshed daily. In this case, we could use the preprocessing script as the download process. So the preprocessing would need cron-ing.