# Valid Auspice Config Metadata

**URL:** <https://nextstrain.discourse.group/t/valid-auspice-config-metadata/88>\
**Category:** Help and Getting Started\
**Created:** [July 29, 2020, 1:02pm UTC](https://nextstrain.discourse.group/t/valid-auspice-config-metadata/88 "2020-07-29T13:02:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![james](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/james/32/11_2.png) [@james](https://nextstrain.discourse.group/u/james)\
**Post date:** [July 29, 2020, 10:56pm UTC](https://nextstrain.discourse.group/t/valid-auspice-config-metadata/88/3 "2020-07-29T22:56:33Z")

</div>

Hi Mike – I think there’s two slightly different questions being asked so I’ll answer in two parts!

1. **How to define how auspice looks when loaded**

For a given dataset within auspice, there is a large space of different views a user can take the viz in (e.g. changing coloring, changing the tree layout, toggling on/off different panels, zooming into the tree, selecting a time slice). A dataset (JSON) can define the defaults for a few of these and URL queries can define a lot of them – these are best explained in the “View Settings” doc page you’ve found or by looking at the [dataset JSON schema](https://github.com/nextstrain/augur/blob/master/augur/data/schema-export-v2.json). Feel free to ask questions here too!

Note that such a view must be available within the dataset – for instance, you can’t set a default coloring to “age” if age doesn’t exist as a coloring in the dataset JSON.

1. **How to make certain options (e.g. colorings) available in Auspice**

In theory, the dataset JSON schema (link above) defines how one should define a particular coloring in the JSON for auspice to be able to read it. In practice, this boils down to the `augur export` command which is what produces the JSON file in most situations. The docs could be better here, but a good place to start is [here](https://docs.nextstrain.org/projects/augur/en/stable/releases/migrating-v5-v6.html#id1) – in essence `augur export` needs to be told which bits of metadata and generated data should be exported as valid colorings, and what names they should be given. This approach allows `augur export` to be agnostic about the tools used to generate such data.

The clades example is a good one as it’s one of the most complex 😱 (due to historical reasons). If you are running `augur clades` then this will produce an intermediate JSON which associates nodes on the tree with a “clade\_membership” value. Normally, for this to be in the resulting dataset JSON, two things are required:

- (i) this file is provided as an input to `augur export`'s `--node-data` argument
- (ii) a entry in the config JSON (supplied to `augur export`'s `--auspice_config` argument) along the lines of

```json
"colorings": [
      {
      "key": "clade_membership",
      "title": "Clade",
      "type": "categorical"
    }
]

```

_BUT_ clades is an exeption to the general rule in that part (ii) is not needed – `augur export` will automagically create a coloring for Clade if it is given a suitable node data JSON which defines “clade\_membership” values. This is why you don’t see such an entry in the [config JSON](https://github.com/nextstrain/ncov/blob/master/nextstrain_profiles/nextstrain/global_auspice_config.json#L7-L106) behind [nextstrain.org/ncov/global](http://nextstrain.org/ncov/global), but clade is indeed a valid coloring in that dataset.

Please don’t hesitate to ask any further questions!

---

_[View the full topic](https://nextstrain.discourse.group/t/valid-auspice-config-metadata/88)._
