# Data Visualization with svg maps

**URL:** <https://discourse.processing.org/t/data-visualization-with-svg-maps/12966>\
**Category:** Coding Questions\
**Created:** [July 25, 2019, 11:08am UTC](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966 "2019-07-25T11:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NamanSharma](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@NamanSharma](https://discourse.processing.org/u/NamanSharma)\
**Post date:** [July 25, 2019, 11:08am UTC](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966/1 "2019-07-25T11:08:03Z")

</div>

Hi guys.

There used to be really good example of code to visualize the US election results on a SVG map. Could someone please help with that same or some similar code, as I want to build a similar thing for depicting water stress data.

Thanks in anticipation.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 28, 2019, 6:13pm UTC](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966/2 "2019-07-28T18:13:31Z")

</div>

> [@NamanSharma](#):
>
> US election results on a SVG map

Looks to me like that code was up on Wikipedia last year, but was removed in an edit. Maybe because it was broken? Not sure. Here is the last page edit with the map sketch before it was removed:

> **[Processing](https://en.wikipedia.org/w/index.php?title=Processing_%28programming_language%29&oldid=851680814)**
>
> Processing is a free graphical library and integrated development environment (IDE) built for the electronic arts, new media art, and visual design communities with the purpose of teaching non-programmers the fundamentals of computer programming in a visual context.
> Processing uses the Java language, with additional simplifications such as additional classes and aliased mathematical functions and operations. It also provides a graphical user interface for simplifying the compilation and executio...

---

<div class="post-metadata">

**Author:** ![NamanSharma](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@NamanSharma](https://discourse.processing.org/u/NamanSharma)\
**Post date:** [July 29, 2019, 5:42am UTC](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966/3 "2019-07-29T05:42:01Z")

</div>

Hey! Thanks a lot @jeremydouglass  
This worked for me.  
And the code works well too.
