How to make vegalite read my topojson file?

Aizzaac
Wed, 12 Feb 2020 22:06:07 +0000
General Usage

I have a topojson file located in this path: "/home/juliana/roc/Data/Topojson/disa_ONT_region"
I want to make a choropleth map, but I do not know how to call that file into my code.

I know it has to go in “values”
I have tried:

Point a) is related to this: GitHub - rofinn/FilePaths.jl: A type based approach to working with filesystem paths in julia

a) file=p"/home/juliana/roc/Data/Topojson/disa_ONT_region"

b) file=normpath(string(@DIR, “/Data/Topojson/”, “disa_ONT_region”))

This is my code:

@vlplot(width=800, height=600) +
@vlplot(
    mark={
        :geoshape
},
data={
    values=file,
    format={
        typ=:topojson,
        feature=:disa_ONT_region
    }
},
transform=[{
    lookup=:featureId,
    from={
        data=df_splunk,
        key=:featureId,
        fields=["count"]
    }
}],
color={
    "rate:q",
    scale={scheme=:reds},
    legend={title="IP Rate - BST"}
},
projection={
    typ=:albersUsa
}
)

19 posts - 7 participants