Skip to content

Commit 2dc8dd8

Browse files
authored
Improve per-variable property description for custom DC (#566)
* Revert to gerund Though the style guide says to just use imperatives, "get started" just sounds weird. Also this is more consistent with "troubleshooting" * merge * merge * stable release * removed reference to fork * updated procedures * wee corrections * recorrect * wee changes * wee changes * remove branch sync procedures * corrections from Hannah * first revisions * more revisions * more work * first cut of variable-per-column rewrite * more work * more work * more work * restore changes * more changes * more changes * more changes * more changes * updates to json spec * more edits * multiple directories * more changes * more changes * more edits * remove headings from TOC * minor edits * more edits * remove wrong image reference * remove more headings from TOC * revisions per Ajai and a new diagram * remove image, replace by text * mention that node and field order in MCF do not matter * added mention of required option for subdirs * added note about MCF * move feedback from index page to FAQ * added info on stat var groups * wee fixes * make feedback links nicer * added detail about measuredProperty in variable per column * fix typo * revert output directory change
1 parent 006f47a commit 2dc8dd8

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

custom_dc/custom_data.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,9 @@ You must specify the provenance details under `sources.provenances`; this field
566566
{: #observation-properties}
567567
observationProperties (implicit schema only)
568568

569-
: Optional: Additional information about each contained in the CSV file. Currently, the following properties are supported:
569+
: Optional: Additional information about each variable contained in the CSV file. Whatever setting you specify will apply to all variables in the file. (If you need different properties among variables, put your variables in different CSV files.)
570+
571+
Currently, the following properties are supported:
570572
- [`unit`](/glossary.html#unit): The unit of measurement used in the observations. This is a string representing a currency, area, weight, volume, etc. For example, `SquareFoot`, `USD`, `Barrel`, etc.
571573
- [`measurementPeriod`](/glossary.html#observation-period): The period of time in which the observations were recorded. This must be in ISO duration format, namely `P[0-9][Y|M|D|h|m|s]`. For example, `P1Y` is 1 year, `P3M` is 3 months, `P3h` is 3 hours.
572574
- [`measurementMethod`](/glossary.html#measurement-method): The method used to gather the observations. This can be a random string or an existing DCID of [`MeasurementMethodEnum`](https://datacommons.org/browser/MeasurementMethodEnum){: target="_blank"} type; for example, `EDA_Estimate` or `WorldBankEstimate`.
@@ -601,7 +603,7 @@ description
601603

602604
properties
603605

604-
: Additional Data Commons properties associated with this variable. This section is analogous to the fields specified in an [MCF Node definition](#mcf).
606+
: Additional Data Commons properties associated with this variable. The properties are any property required or optional in the [MCF Node definition](#mcf) of a variable. The value of the property must be a DCID.
605607

606608
Each property is specified as a key:value pair. Here are some examples:
607609

@@ -614,6 +616,23 @@ Each property is specified as a key:value pair. Here are some examples:
614616
}
615617
```
616618

619+
Note that the `measuredProperty` property has an effect on the display: if it is not set for any variable, the importer assumes that it is different for every defined variable, so that each variable will be shown in a different chart in the UI tools. If you would like multiple variables to show up in the same chart, be sure to set this property on all of the relevant variables, to the same (DCID) value. For example, if you wanted `Adult_curr_cig_smokers_female` and `Adult_curr_cig_smokers_male` to appear on the same Timeline chart, set `measuredProperty` to a common property of the two variables, for example [`percent`](https://datacommons.org/browser/percent){: target="_blank"}.
620+
621+
```json
622+
"variables": {
623+
"Adult_curr_cig_smokers": {
624+
"properties": {
625+
"measuredProperty": "percent"
626+
}
627+
},
628+
"Adult_curr_cig_smokers_female": {
629+
"properties": {
630+
"measuredProperty": "percent"
631+
}
632+
}
633+
}
634+
```
635+
617636
group
618637

619638
: By default, the Statistical Variables Explorer will display all custom variables as a group called "Custom Variables". You can use this option to create one or more custom group names and assign different variables to groups. The value of the `group` option is used as the heading of the group. For example, in the sample data, the group name `OECD` is used to group together the two variables from the two CSV files:
@@ -686,7 +705,6 @@ docker run \
686705
-v <var>INPUT_DIRECTORY</var>:<var>INPUT_DIRECTORY</var> \
687706
-v <var>OUTPUT_DIRECTORY</var>:<var>OUTPUT_DIRECTORY</var> \
688707
gcr.io/datcom-ci/datacommons-data:stable
689-
</pre>
690708

691709

692710
{:.no_toc}

0 commit comments

Comments
 (0)