Skip to content

Add contributor docs and an example import using Template MCF + StatVarObservation.#3

Merged
tjann merged 6 commits into
datacommonsorg:masterfrom
tjann:docs
Jun 2, 2020
Merged

Add contributor docs and an example import using Template MCF + StatVarObservation.#3
tjann merged 6 commits into
datacommonsorg:masterfrom
tjann:docs

Conversation

@tjann

@tjann tjann commented May 27, 2020

Copy link
Copy Markdown
Contributor

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.

@tjann
tjann requested a review from pradh May 27, 2020 08:49
@tjann
tjann requested a review from rvguha May 27, 2020 18:12
@tjann
tjann requested a review from edumorlom May 28, 2020 17:56
Comment thread docs/mcf_format.md Outdated

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/subbing in/substituting/

typeOf: StatVarObservation
variableMeasured: {stat_var}
observationAbout: C:COVIDTracking_States->GeoId
observationDate: C:COVIDTracking_States->Date

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quotes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do this and the test in a separate PR.

@pradh pradh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

@edumorlom edumorlom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I had trouble finding things to comment 💯

Comment thread docs/mcf_format.md Outdated

#### DCID and Name Conventions

- For non-schema entities, do not use underscores in identifier or DCID fields,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period instead of comma at the end

Comment thread docs/representing_statistics.md Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be space after statType and before value?

Comment thread docs/representing_statistics.md Outdated
- [`Class`](https://schema.org/Class)
- [`Property`](https://schema.org/Property)
- [`StatisticalPopulation`](https://schema.org/StatisticalPopulation)
- [`Observation`](https://schema.org/`Observation`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you didn't mean to put the ` in the url. I'm getting a 404 error

Comment thread docs/representing_statistics.md Outdated
`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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This last paragraph is a bit confusing, too many values in my opinion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a little shuffling, hopefully this helps.

Comment thread docs/mcf_format.md Outdated

#### Special Namespaces

The Data Commons graph is built on top of schema.org vocabulary and its Data

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes you use Schema.org and other times schema.org

@tjann
tjann merged commit f3102aa into datacommonsorg:master Jun 2, 2020
shamimansari1988 pushed a commit to shamimansari1988/data that referenced this pull request Aug 12, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants