# When plotting a choropleth map, how to "read" the appropriate value of the topojson file and the dataframe?

**URL:** <https://discourse.julialang.org/t/when-plotting-a-choropleth-map-how-to-read-the-appropriate-value-of-the-topojson-file-and-the-dataframe/34605>\
**Category:** General Usage\
**Tags:** plotting, first-steps\
**Created:** [February 13, 2020, 10:19pm UTC](https://discourse.julialang.org/t/when-plotting-a-choropleth-map-how-to-read-the-appropriate-value-of-the-topojson-file-and-the-dataframe/34605 "2020-02-13T22:19:26Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Aizzaac](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Aizzaac](https://discourse.julialang.org/u/Aizzaac)\
**Post date:** [February 14, 2020, 8:41pm UTC](https://discourse.julialang.org/t/when-plotting-a-choropleth-map-how-to-read-the-appropriate-value-of-the-topojson-file-and-the-dataframe/34605/23 "2020-02-14T20:41:54Z")

</div>

> [@oheil](#):
>
> @vlplot( :geoshape, width=500, height=300, data={ values=json, format={ type=:topojson, feature=:disa\_ONT\_region } }, transform=[{ lookup=:id, from={ data=df\_splunk, key=:id, fields=[“count”] } }], color={ “count:q”, scale={scheme=:reds}, legend={title=“IPs Rate in Ontario - BST”} }, projection={ type=:albersUsa } )

So the problem was the topojson.  
In that case, I guess, I would have continued with the dataframe. I mean in order to manipulate it and then send it to VegaLite.

Thank you for your time. I will check the code where you are manipulating the “json” file.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [February 14, 2020, 8:51pm UTC](https://discourse.julialang.org/t/when-plotting-a-choropleth-map-how-to-read-the-appropriate-value-of-the-topojson-file-and-the-dataframe/34605/24 "2020-02-14T20:51:28Z")

</div>

I would say, that the problem is, that it is difficult to find the proper syntax for the vegalite specification. I only took the easier approach to come to a solution. I don’t think it would have been easier with the dataframe.

[Previous page](https://discourse.julialang.org/t/when-plotting-a-choropleth-map-how-to-read-the-appropriate-value-of-the-topojson-file-and-the-dataframe/34605.md?page=1)
