Skip to content

[VegaLite Issue] Clustering Notebook #24

@shaksham95

Description

@shaksham95

While trying to plot the lat/long on a map using VegaLite, I am facing this weird issue.

If I use the following code:

@vlplot(width=500, height=300)
@vlplot(
        mark = {
                :geoshape,
                fill=:black,
                stroke=:white
        },
        data = {
                values=VV,
                format={
                        type=:topojson,
                        feature=:cb_2015_california_county_20m
                }
        },
        projection = {type=:albersUsa},
)+
@vlplot(
        :circle,
        data=houses_data,
        projection={type=:albersUsa},
        longitude="longitude:q",
        latitude="latitude:q",
        size={value=12},
        color="median_house_value:q"
)

then the plot is generated with a warning:
WARN Layer's shared projection {"type":"albersUsa"} is overridden by a child projection {"type":"albersUsa"}.

However, if I do this minor change:

@vlplot(width=500, height=300) +
@vlplot(
        mark = {
                :geoshape,
                fill=:black,
                stroke=:white
                },
        data = {
                values=VV,
                format={
                        type=:topojson,
                        feature=:cb_2015_california_county_20m
                       }
               },
        projection = {type=:albersUsa},
)+
@vlplot(
        :circle,
        data=houses_data,
        projection={type=:albersUsa},
        longitude="longitude:q",
        latitude="latitude:q",
        size={value=12},
        color="cprice:n"
)

just adding a '+' after (height, width) specification, gives the following error:

image

I am not sure, why this is happening, Can anyone please help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions