vega / altair

Declarative statistical visualization library for Python
https://altair-viz.github.io/
BSD 3-Clause "New" or "Revised" License
9.4k stars 795 forks source link

Projection's type should be case-insensitive but is not #1510

Closed kannes closed 1 year ago

kannes commented 5 years ago

https://altair-viz.github.io/user_guide/generated/core/altair.Projection.html#altair.Projection says its type parameter is case-insensitive:

This value is case-insensitive, for example "albers" and "Albers" indicate the same projection type.

This is not true.

For example trying to use type="Albers" will result in the following error:

SchemaValidationError: Invalid specification

        altair.vegalite.v3.schema.core.Projection->type, validating 'enum'

        'Albers' is not one of ['albers', 'albersUsa', 'azimuthalEqualArea', 
'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 
'equirectangular', 'gnomonic', 'identity', 'mercator', 'orthographic', 'stereographic', 
'transverseMercator']
jakevdp commented 5 years ago

This seems to be a mismatch between the documentation and the schema, both of which are taken directly from Vega-Lite.

joelostblom commented 1 year ago

This should be updated in the Vega-Lite documentation/docstring to indicate that only lower case is allowed or in the schema to allow upper case (it currently works but the schema flags it as an error). Closing it here since there is nothing to do from the altair side of things.