﻿ Codec ░ Google Venn Charts Code

Google Venn Charts use a somewhat cryptic parameter for the relative size of the groups and their overlapping areas:
`&chd=s:93_a___`
Where ‘9’ is the size of one group, ‘3’ the size of the other and ‘a’ the size of their overlapping regions. Clearly Google was trying to come up with a one-character coding scheme, the goal was to map one character to a range from 0 .. 100. So, after a couple of minutes well spend, I present the Google Venn Chart coding table:
```//php
\$code = array(	"A","B","B","C","C","D","E","E","F","F",
"G","H","H","I","J","J","K","K","L","M",
"M","N","N","O","P","P","Q","Q","R","S",
"S","T","T","U","V","V","W","W","X","Y",
"Y","Z","a","a","b","b","c","d","d","e",
"f","f","g","g","h","h","i","j","j","k",
"k","l","m","m","n","n","o","p","p","q",
"q","r","s","s","t","t","u","v","v","w",
"w","x","y","y","z","0","0","1","2","2",
"3","4","4","5","5","6","7","7","8","8",
"9");
```
The index of the array corresponds to the percentage of the size. Now we can infer, that our example from above, &chd=s:93_a___ means: 9 → 100, 3 → 90 and a → 42. Note that some values have multiple indexes, I guess Venn charting is not that exact of a science. This example is dealing with 2 groups and one intersections, but there is not reason, why it should not work with 3-group Venn diagrams.
﻿