This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Word cloud layout by Jason Davies, https://www.jasondavies.com/wordcloud/ | |
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf | |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g=(g.d3||(g.d3 = {}));g=(g.layout||(g.layout = {}));g.cloud = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[fun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="links.js"></script> | |
<script src="nodes.js"></script> | |
<!-- Dataset found here: http://snap.stanford.edu/data/soc-sign-bitcoinotc.html --> | |
<style> | |
text { | |
font-size: 14px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global, factory) { | |
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("d3-scale")) : | |
typeof define === "function" && define.amd ? define(["exports", "d3-scale"], factory) : | |
(factory(global.d3 = global.d3 || {}, global.d3)); | |
}(this, function(exports, d3Scale) { | |
'use strict'; | |
function square(x) { | |
return x * x; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var america_json = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":1,"featurecla":"Admin-0 country","labelrank":2,"sovereignt":"United States of America","sov_a3":"US1","adm0_dif":1,"level":2,"type":"Country","admin":"United States of America","adm0_a3":"USA","geou_dif":0,"geounit":"United States of America","gu_a3":"USA","su_dif":0,"subunit":"United States of America","su_a3":"USA","brk_diff":0,"name":"United States","name_long":"United States","brk_a3":"USA","brk_name":"United States","brk_group":null,"abbrev":"U.S.A.","postal":"US","formal_en":"United States of America","formal_fr":null,"note_adm0":null,"note_brk":null,"name_sort":"United States of America","name_alt":null,"mapcolor7":4,"mapcolor8":5,"mapcolor9":1,"mapcolor13":1,"pop_est":313973000,"gdp_md_est":15094000,"pop_year":0,"lastcensus":2010,"gdp_year":0,"economy":"1. Developed region: G7","income_grp":"1. High income: OECD","wikipedia":0,"fips_10":null,"iso_a2":"US","iso_a3":"USA","iso_n3":"840","un_a3":"840"," |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 20 columns, instead of 16 in line 5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
room_id,survey_id,host_id,room_type,country,city,borough,neighborhood,reviews,overall_satisfaction,accommodates,bedrooms,bathrooms,price,minstay,name,last_modified,latitude,longitude,location | |
14821064,1429,21938320,Shared room,,Boston,,Back Bay,2,0,1,1,,105,,1 BR in the center of Newbury Street,45:55.2,42.351066,-71.080316,0101000020E61000001D56B8E523C551C0685E0EBBEF2C4540 | |
8696200,1429,19470226,Shared room,,Boston,,Downtown,12,5,2,1,,103,,Downtown Boston Condo Living Room,45:55.2,42.366695,-71.066336,0101000020E61000000AA359D93EC451C0A94D9CDCEF2E4540 | |
5990896,1429,31035017,Shared room,,Boston,,Fenway,56,4.5,1,1,,85,,"Studio, 2 min walk Symphony/T Hynes",45:53.3,42.342757,-71.090121,0101000020E6100000B3EBDE8AC4C551C0CFBC1C76DF2B4540 | |
13711242,1429,40459423,Shared room,,Boston,,Downtown,9,5,2,1,,90,,"Located in ""the heart of the city",45:53.3,42.351019,-71.064549,0101000020E610000054FF209221C451C027A3CA30EE2C4540 | |
3792147,1429,6989109,Shared room,,Boston,,South Boston,72,4.5,1,1,,83,,Oceanview Penthouse Condo-Coo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset='utf-8'> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v4.min.js" charset="utf-8"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.25.5/d3-legend.min.js"></script> | |
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script> | |
<link rel='stylesheet' href='style.css'> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset='utf-8'> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v4.min.js" charset="utf-8"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.25.5/d3-legend.min.js"></script> | |
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script> | |
<link rel='stylesheet' href='style.css'> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> <title>NBA Salaries Scatter Plot</title> | |
<style> | |
header { | |
text-align: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<title>NBA Salaries Scatter Plot</title> | |
<style> | |
body { | |
margin: 0px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<title>NBA Salaries Scatter Plot</title> | |
<style> | |
body { | |
margin: 0px |
NewerOlder