Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descriptive error message regarding joining of marker data with encoding data #33

Open
angiehjort opened this issue Nov 6, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@angiehjort
Copy link
Member

Vizabi should make a descriptive error message when there are dimensions in the encoding space that are not in the marker space which are not filtered down to one possible value. So that extra dimensions in the encoding resolve into a constant whether by filtering or by data only having datapoints for one value. So that the data table doesn't have ambiguity.

In the example below "geo" in latitude wasn't filtered down to one value.

Bubble map config that fails:
right now it fails at a later stage with left and right warning message

__data = {
  modelType: "ddfcsv",
  path: "./data/ddf--jheeffer--mdtest/"
};

VIZABI_MODEL = {
  model: {
    markers: {
      bubble: {
        data: {
          locale: "en",
          source: __data,
          space: ["country", "time"]
        },
        encoding: {
          "selected": {
            modelType: "selection"
          },
          "highlighted": {
            modelType: "selection"
          },
          "size": {
            data: {
              concept: "population_total"
            },
          },
          "lat": {
            data: {
              space: ["geo"],
              concept: "latitude"
            }
          },
          "lon": {
            data: {
              space: ["geo"],
              concept: "longitude"
            }
          },
          "color": {
            data: {
              space: ["geo"],
              concept: "world_4region"
            },
            scale: {
              modelType: "color",
              type: "ordinal"
            }
          },
          "label": {
            data: {
              modelType: "entityPropertyDataConfig",
              concept: "name"
            }
          },
          "frame": {
            modelType: "frame",
            speed: 200,
            data: {
              concept: {
                autoconfig: {
                  concept_type: "time"
                }
              }
            }
          }
        },
        requiredEncodings: ["lat", "lon", "size"]
      },
      "legend": {
        data: {
          ref: {
            transform: "entityConceptSkipFilter",
            model: "markers.bubble.encoding.color"
          }
        },
        encoding: {
          color: {
            data: {
              concept: { ref: "markers.bubble.encoding.color.data.concept" },
              constant: { ref: "markers.bubble.encoding.color.data.constant" }
            },
            scale: {
              modelType: "color",
              palette: { ref: "markers.bubble.encoding.color.scale.palette" }
            }
            //scale: { ref: "markers.bubble.encoding.color.scale" }
          },
          name: { data: { concept: "name" } },
          rank: { data: { concept: "rank" } },
          map: { data: { concept: "shape_lores_svg" } }
        }
      }
    }
  },
  ui: {
    //ui
    "buttons": {
      "buttons": ["colors", "find", "trails", "moreoptions", "presentation", "sidebarcollapse", "fullscreen"]
    },
    "dialogs": {
      "dialogs": {
        "popup": ["colors", "find", "moreoptions"],
        "sidebar": ["colors", "find", "size"],
        "moreoptions": [
          "opacity",
          "speed",
          //"axes",
          "size",
          "colors",
          "label",
          "technical",
          "presentation",
          "about"
        ]
      }
    },
    "chart": {
      labels: {
        removeLabelBox: true
      }
    }
  }
};

@angiehjort angiehjort added the enhancement New feature or request label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant