Skip to content

Instantly share code, notes, and snippets.

@kcsluis
kcsluis / index.html
Created September 12, 2015 00:28
Mobile, Responsive
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/*css*/
.content {
width: 840px;
@kcsluis
kcsluis / index.html
Created September 12, 2015 00:40
Choropleth Map
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/* svg {
border: 1px solid #f0f;
}*/
body {
@kcsluis
kcsluis / group1.tsv
Last active September 12, 2015 00:44
Core D3 format / Scatterplot
group x y
I 10 8.04
I 8 6.95
I 13 7.58
I 9 8.81
I 11 8.33
I 14 9.96
I 6 7.24
I 4 4.26
I 12 10.84
@kcsluis
kcsluis / group1.tsv
Last active September 12, 2015 00:48
Tooltip
I 10 8.04
I 8 6.95
I 13 7.58
I 9 8.81
I 11 8.33
I 14 9.96
I 6 7.24
I 4 4.26
I 12 10.84
@kcsluis
kcsluis / group1.tsv
Created September 26, 2015 22:20
Tables
I 10 8.04
I 8 6.95
I 13 7.58
I 9 8.81
I 11 8.33
I 14 9.96
I 6 7.24
I 4 4.26
I 12 10.84
@kcsluis
kcsluis / barley.tsv
Created September 26, 2015 22:20
Nesting
yield variety year site
27 Manchuria 1931 University Farm
48.86667 Manchuria 1931 Waseca
27.43334 Manchuria 1931 Morris
39.93333 Manchuria 1931 Crookston
32.96667 Manchuria 1931 Grand Rapids
28.96667 Manchuria 1931 Duluth
43.06666 Glabron 1931 University Farm
55.2 Glabron 1931 Waseca
28.76667 Glabron 1931 Morris
@kcsluis
kcsluis / index.html
Created November 1, 2015 21:19
Bar Graph
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body {
font-family: sans-serif;
}
.barPositive {
@kcsluis
kcsluis / index.html
Created November 1, 2015 23:52
Line Graph, Two Ways
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body {
font-family: sans-serif;
font-size: 10px;
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 2. in line 8.
city venue_id venue_name address lat lon category tip_count users_count checkins_count rating rating_signals
New York, NY 4a8cc1d4f964a520130f20e3 Strand Bookstore 828 Broadway 40.7332 -73.99096 Bookstore 568 36129 72329 9.6 4218
Portland, OR 4a06431ff964a520dc721fe3 Powell's City of Books 1005 W Burnside St 45.52341 -122.68152 Bookstore 457 41161 69916 9.6 3517
New York, NY 43fe1ba4f964a520f82f1fe3 Barnes & Noble 33 E 17th St 40.73703 -73.98954 Bookstore 286 31158 69345 8.9 1969
New York, NY 49e63a33f964a52023641fe3 McNally Jackson Books 52 Prince St 40.72337 -73.99602 Bookstore 301 12619 28528 9.5 1829
New York, NY 4b0ff4a0f964a520b16623e3 Barnes & Noble 555 5th Ave 40.75574 -73.97894 Bookstore 138 16323 24723 8.8 1567
Washington, DC 40b3de00f964a5202b001fe3 Kramerbooks & Afterwords Cafe 1517 Connecticut Ave NW 38.9108 -77.0437 Bookstore 323 16591 29010 9.1 1431
Los Angeles, CA 4dee93a0d4c019425301dd4e The Last Bookstore 453 S Spring St 34.04762 -118.24985 Bookstore 157 9757 13939 9.5 1175
Boston, MA 4150c0
rank area venue_name rating rating_signals
1 New York, NY Strand Bookstore 9.6 4218
2 Portland, OR Powell's City of Books 9.6 3517
3 New York, NY Barnes & Noble 8.9 1969
4 New York, NY McNally Jackson Books 9.5 1829
5 New York, NY Barnes & Noble 8.8 1567
6 Washington, DC Kramerbooks & Afterwords Cafe 9.1 1431
7 Los Angeles, CA The Last Bookstore 9.5 1175
8 Boston, MA Trident Booksellers & Cafe 9.1 1114
9 New York, NY Books Kinokuniya 9.5 1109