Skip to content

Instantly share code, notes, and snippets.

@zain
Created October 4, 2013 10:34
Show Gist options
  • Select an option

  • Save zain/6824004 to your computer and use it in GitHub Desktop.

Select an option

Save zain/6824004 to your computer and use it in GitHub Desktop.
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'price');
data.addColumn('number', 'saves');
data.addColumn({type:'string', role:'tooltip'});
data.addRows([
[95, 51, 'Hidden Gem in Locals Neighborhood'],
[85, 145, 'The Webster Mini Deluxe Guest Room'],
[140, 588, 'Sunny Top-Floor Birds Nest - Hayes'],
[199, 70, 'Lower Haight Home Away From Home'],
[85, 45, 'Small bdrm in lrg HAYES VALLEY apt.'],
[266, 70, 'Victorian House Trendy Hayes Valley'],
[130, 28, 'Newly Renovated, Spacious 1 bdrm '],
[200, 56, 'Charming Artist Flat - Hayes Valley'],
[225, 90, 'Modern Hayes Valley for Urbanites'],
[95, 64, '1 Room in Adorable Hayes Valley Apt'],
[175, 69, 'cozy space in Hayes Valley SF '],
[155, 57, 'Beautiful, Sunny Victorian Cottage '],
[200, 245, 'Perfect Hayes Valley One Bedroom'],
[145, 268, 'Centrally Located Victorian Studio'],
[130, 83, 'Beautiful 1BR Apt in Hayes Valley'],
[209, 624, 'Mod 1 BR near Hayes Valley/Mission'],
[100, 8, 'Private hipster studio apartment'],
[99, 227, 'Lovely Historic Italianate House'],
[125, 73, 'LARGE, 1-bdrm apt with work area'],
[115, 48, 'Studio in Food Lovers Paradise'],
[100, 17, 'Master Room by Alamo Square'],
[65, 5, 'Large Bedroom in Hayes Valley'],
[176, 13, 'Awesome Apartment in Hayes Valley'],
[141, 11, 'Hayes Valley Studio '],
[124, 64, 'Modern & spacious w/ great location'],
[124, 65, 'Spacious Garden-Level Apartment'],
[199, 13, 'Spacious Condo in Hayes Valley'],
[150, 27, 'Luxe Urban Style @ The Webster '],
[70, 89, 'Modern Living Room in SF Apartment'],
[110, 216, 'Hayes Valley Studio- Private Entry'],
[90, 12, 'Hayes Valley-Great Location'],
[109, 5, 'Gorgeous View with Private Bathroom'],
[350, 47, 'Sunny Unoccupied 3Bdrm, Heart of SF'],
[125, 55, 'Bright studio/ excellent location'],
[220, 34, 'Secret Hideaway in San Francisco'],
[100, 15, 'Semi-Private - 1-Br- Hayes Valley'],
[180, 23, '2-Bed Lower Haight Apt with Deck!!!'],
[360, 71, 'Victorian Beauty Hayes Valley'],
[72, 52, 'Central, Quiet Room w. Private Bath'],
[266, 67, 'Victorian House in Hayes Valley'],
[149, 4, 'Pretty 1 BR 1.5 bath Edwardian Flat'],
[200, 25, 'Spacious Top Flr 1BD w/ great views'],
[90, 7, 'Studio in hayes valley/lower haight'],
[159, 79, 'Sunny Chic Hayes Valley Studio'],
[155, 15, 'Traveling w/Toddler/Baby Paradise '],
[145, 6, 'Private Room w/TV Convenient in SF'],
[70, 121, 'Classic Cozy SF Studio & Cuddly Cat'],
[129, 7, 'Hayes Valley Gem - Center of SF!'],
[399, 40, 'Quiet Victorian near Market Street'],
[145, 10, 'Hayes Valley Tree House Jr 1 Bdrm'],
[129, 47, 'Cozy Studio in Hayes Valley'],
[89, 28, 'Bright and Beautiful Apt Rm 2 '],
[99, 137, 'Bright and Beautiful Apartment Rm 3'],
[175, 19, 'Modern Hayes Valley House w/Parking'],
[179, 22, 'Spacious 2-Bed w/ View & Fireplace!'],
[90, 34, 'Cozy home, great location'],
[125, 64, 'Cozy Jr. 1Bdr in the Heart of Hayes'],
[250, 21, 'Hayes Valley/Lower Haight- 1 BR APT'],
[220, 16, 'Adorable Hayes Valley Top Floor Apt'],
[279, 22, 'Furn 2 Bdrm/1 Bth Alamo Sq./Hayes V'],
[175, 61, 'Modern & Inviting SF Apartment '],
[125, 35, 'Hayes Valley studio w/ parking!'],
[150, 42, 'Sweet Studio in Trendy Hood'],
[90, 379, 'Midcentury Modern, Central Locale '],
[150, 20, 'Spacious 1Bdrm Apt, Hayes Valley'],
[160, 8, 'Spacious Hayes Valley Apartment'],
[110, 2, 'Spacious Room in Hayes Valley '],
[90, 63, 'Cute Sunny Room in Hayes Valley!'],
[219, 5, 'Stylish Victorian w/ Outdoor Dining'],
[150, 32, 'Full-Floor Victorian Apartment'],
[150, 11, 'Sweet Victorian Flat in Central SF'],
[235, 96, 'Hayes Valley Gem in the heart of SF'],
[278, 47, 'Modern Bright Hayes'],
[129, 8, 'Comfy & Convenient in Lower Haight'],
[65, 3, 'Private room in Hayes Valley flat'],
[150, 2, 'Fantastic Apartment w Private Deck '],
[95, 3, 'Sunny central apartment with a view'],
[75, 2, '1 BR in Hayes Valley - 3mo Sublet'],
[56, 1, 'Comfy Couch for Female Travelers!'],
[78, 3, 'Large bedroom in the center of SF'],
[150, 1, 'Rose et Perles: a Walkers Paradise'],
[90, 5, 'Private room in Lower Haight SF'],
[89, 6, 'A large bedroom in the heart of SF!'],
[150, 2, 'Hayes Valley Studio w/ 2 BEDS!'],
[89, 66, 'Bright Private Rm in Modern Apt '],
[125, 39, 'Large studio center San Francisco'],
[105, 6, 'Entire Apt-SF, Hayes Valley'],
[100, 1, 'Great Hayes Valley Studio - Dec On'],
[150, 8, 'Spacious Flat in Hayes Valley'],
[148, 5, 'Beautiful space in Hayes Valley'],
[90, 1, 'Private BR + Bath in Hayes Valley!!'],
[100, 2, 'Spacious room in Hayes Valley apt'],
[75, 3, 'Perfectly located rm in the Mission'],
[200, 51, 'Bright and Modern 2 bedroom Apt '],
[137, 9, 'Comfy Hayes Valley studio Apartment'],
[75, 78, 'Mission/Castro/HayesV/CivicC/Downto'],
[100, 96, 'Centrally Located and Full of Love'],
[150, 2, 'Comfy Sunny Hayes Valley Apartment'],
[75, 18, 'Private Rm in 5bd 3 Bath Flat - PR'],
[165, 5, 'Hayes Valley 1BR - Access All of SF'],
[109, 754, 'Hip & Bright Hayes Valley Apartment'],
[250, 49, 'Center of SF huge studio w/hot tub'],
[174, 575, 'Loft in Mission/SOMA w/ large patio'],
[400, 12, '2br/1ba in Hayes Valley w/ views'],
[75, 15, 'The Oval Room'],
[140, 208, 'Bright and Fresh Studio Apartment'],
[300, 37, '2 Bedroom Loft Apt in San Francisco'],
[155, 12, 'Sunny SAN FRANCISCO CARRIAGE HOUSE'],
[115, 5, '1-BR avail for major conventions'],
[140, 216, 'Adorable Central San Francisco Apt'],
[135, 17, 'Private Studio in Hayes Valley '],
]);
var options = {
title: 'Comparing the price of a unit to the number of times it was saved to a wish list',
hAxis: {title: 'Price ($)'},
vAxis: {title: 'No. of saves'},
legend: 'none'
};
var chart = new google.visualization.ScatterChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 1024px; height: 768px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment