vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.69k stars 617 forks source link

Include projections from d3-geo-projection #5439

Closed mattijn closed 3 years ago

mattijn commented 5 years ago

I would like to use one of the projections as defined in the d3-geo-projections. But these are not accepted by the schema.

image

editor-url

Are there any suggested approaches for this? Can I add all projection types of d3-geo-projection to Vega-lite?

The properties from d3-geo-projection are supported already (doc):

In addition to the shared properties above, the following properties are supported for specific projection types in the d3-geo-projection library: coefficient, distance, fraction, lobes, parallel, radius, ratio, spacing, tilt.

Which are sub-optimal useful if the d3-geo-projections are not supported

domoritz commented 5 years ago

yeah, let’s add them. We could add some logic to warn users if the projections are not installed.

Do you want to send a PR?

mattijn commented 5 years ago

I tested these projections and the following were working in the editor:

airy aitoff albers armadillo august baker berghaus bertin1953 boggs bonne bottomley bromley chamberlinAfrica collignon craig craster eckert1 eckert2 eckert3 eckert4 eckert5 eckert6 eisenlohr equirectangular fahey foucaut gilbert gingery ginzburg4 ginzburg5 ginzburg6 ginzburg8 ginzburg9 gnomonic gringorten guyou hammer hammerRetroazimuthal healpix hill homolosine kavrayskiy7 lagrange larrivee laskowski littrow loximuthal mercator miller modifiedStereographicAlaska modifiedStereographicGs48 modifiedStereographicGs50 modifiedStereographicMiller modifiedStereographicLee mollweide mtFlatPolarParabolic mtFlatPolarQuartic mtFlatPolarSinusoidal naturalEarth2 nellHammer orthographic patterson polyconic rectangularPolyconic robinson satellite sinusoidal stereographic times transverseMercator twoPointAzimuthalUsa twoPointEquidistantUsa vanDerGrinten vanDerGrinten2 vanDerGrinten3 vanDerGrinten4 wagner4 wagner6 wagner7 wiechel winkel3 interruptedHomolosine interruptedSinusoidal interruptedBoggs interruptedSinuMollweide interruptedMollweide interruptedMollweideHemispheres polyhedralButterfly polyhedralCollignon polyhedralWaterman gringortenQuincuncial peirceQuincuncial

I excluded the ones that didn't work. And I don't know why naturalEarth1 does not work as it is part of the d3-geo repo (editor).

If you want so, where should I add these?

domoritz commented 5 years ago

The editor should include the non-standard https://github.com/vega/vega/tree/master/packages/vega-projection-extended package btw.