<div id="visualization" style="width: 800px; height: 300px;"></div> <a href="http://code.google.com/apis/visualization/documentation/gallery/barchart.html">Google bar chart vizualization documentation</a> <p><b>Other keys:</b> <?php for ($i = 0; $i < count($keys); $i++) { echo '<a href="?' . $i . '">' . $keys[$i] . "</a> "; } ?> </p> <?php $sourcescraper = 'vca-car-fuel-data'; $keys = scraperwiki::getKeys($sourcescraper); $keyindex = getenv("URLQUERY"); if ($keyindex == False) { $keyindex = 4; } $key = $keys[$keyindex]; $counts = array(); $s = scraperwiki::getData($sourcescraper, $limit = 250); foreach ($s as $c => $row) { foreach ($row as $k => $value) { if ($k == $key) { if (!array_key_exists($value, $counts)) { $counts[$value] = 0; } $counts[$value] += 1; }