Skip to content

Instantly share code, notes, and snippets.

View iblind's full-sized avatar
🤙

iblind

🤙
View GitHub Profile
count_1 count_2
4.39 1.64
0.4894 0.0413
32.661 11.343
24.61 100.0875
1.969142857 0.505642857
6.186428571 3.160357143
0.604761905 3.774738095
6.0212 2.4136
1.2275 0.2935
@iblind
iblind / index.html
Created November 9, 2015 05:51
heatmap_resize
<!DOCTYPE html>
<html lange = "en">
<head>
<meta charset="UTF-8">
<title>Heatmap of U.S. Missed Connections</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<style type ="text/css">
city number_of_posts population_ranking state estimate_2014 actual_2010 post_rank lat lon posts_per_10k ratio_rank city_shrt rPop
Dallas 1581 9 Texas 1,281,047 1,197,816 3 32.769582 -96.791764 12.34146757 1 DAL 0.2191423
Phoenix 1356 6 Arizona 1,537,058 1,445,632 4 33.462898 -112.076986 8.822048355 2 PHX 0.2400428
San Diego 1168 8 California 1,381,069 1,307,402 5 32.745467 -117.154215 8.457216837 3 SDG 0.2275366
Chicago 1938 3 Illinois 2,722,389 2,695,598 2 41.864933 -87.625039 7.118747541 4 CHI 0.3194616
Philadelphia 940 5 Pennsylvania 1,560,297 1,526,006 7 39.962926 -75.159232 6.024494055 5 PHIL 0.2418507
Houston 1021 4 Texas 2,239,558 2,100,263 6 29.748644 -95.362839 4.55893529 6 HOU 0.2897509
San Antonio 624 7 Texas 1,436,697 1,327,407 9 29.409079 -98.489685 4.343295768 7 SAN 0.2320739
New York 2669 1 New York 8,491,079 8,175,133 1 40.71455 -74.007124 3.143298985 8 NYC 0.5641896
Los Angeles 718 2 California 3,928,864 3,792,621 8 34.037002 -118.234578 1.827500265 9 LA 0.
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
@iblind
iblind / cities_pop.csv
Created September 28, 2015 18:10
Grid fade-out
city num population_ranking estimate_2014 lat lon ratio_rank city_shrt ratio
Dallas 1581 9 1,281,047 32.769582 -96.791764 1 DAL 12.34146757
Phoenix 1356 6 1,537,058 33.462898 -112.076986 2 PHX 8.822048355
San Diego 1168 8 1,381,069 32.745467 -117.154215 3 SDG 8.457216837
Chicago 1938 3 2,722,389 41.864933 -87.625039 4 CHI 7.118747541
Philadelphia 940 5 1,560,297 39.962926 -75.159232 5 PHIL 6.024494055
Houston 1021 4 2,239,558 29.748644 -95.362839 6 HOU 4.55893529
San Antonio 624 7 1,436,697 29.409079 -98.489685 7 SAN 4.343295768
New York 2669 1 8,491,079 40.71455 -74.007124 8 NYC 3.143298985
Los Angeles 718 2 3,928,864 34.037002 -118.234578 9 LA 1.827500265
@iblind
iblind / SO_city_pop.csv
Last active September 26, 2015 21:47
Odd colour transitions
city x2 state x1 y1 lat lon
Dallas 1581 Texas 1,281,047 1,197,816 32.769582 -96.791764
Phoenix 1356 Arizona 1,537,058 1,445,632 33.462898 -112.076986
San Diego 1168 California 1,381,069 1,307,402 32.745467 -117.154215
Chicago 1938 Illinois 2,722,389 2,695,598 41.864933 -87.625039
Philadelphia 940 Pennsylvania 1,560,297 1,526,006 39.962926 -75.159232
Houston 1021 Texas 2,239,558 2,100,263 29.748644 -95.362839
San Antonio 624 Texas 1,436,697 1,327,407 29.409079 -98.489685
New York 2669 New York 8,491,079 8,175,133 40.71455 -74.007124
Los Angeles 718 California 3,928,864 3,792,621 34.037002 -118.234578
@iblind
iblind / 1.csv
Last active September 23, 2015 07:16
heatmap update example
day hour N occurrence per_day_per_hour day2
1 Monday 0 50 4 12.5 0
2 Monday 1 45 4 11.25 0
3 Monday 2 25 4 6.25 0
4 Monday 3 17 4 4.25 0
5 Monday 4 8 4 2 0
6 Monday 5 24 4 6 0
7 Monday 6 25 4 6.25 0
8 Monday 7 40 4 10 0
9 Monday 8 53 4 13.25 0
city state estimate_2014 lat lon
Chicago Illinois 2,722,389 45.37399 -92.888759
Dallas Texas 1,281,047 40.636 -91.168309
Houston Texas 2,239,558 41.337462 -75.733627
Los Angeles California 3,928,864 34.05349 -118.245323
New York New York 8,491,079 40.71455 -74.007124
Philadelphia Pennsylvania 1,560,297 37.15477 -94.486114
Phoenix Arizona 1,537,058 32.46764 -85.000823
San Antonio Texas 1,436,697 37.706576 -122.440612
San Diego California 1,381,069 37.707815 -122.466624