Skip to content

Instantly share code, notes, and snippets.

@jcdcodes
jcdcodes / README.md
Last active March 1, 2016 15:25
Braunish Travel Alarm

CSS sure can turn into a lot of pixel tweaking if you let it. I called it quits when the need to tweak the horizontal spacing of the hour numerals from 10 to 2 became apparent.

  1. General Background and Overview
@jcdcodes
jcdcodes / README.md
Last active March 2, 2016 14:25 — forked from mbostock/.block
Arc-and-Hands Tween Clock

Forked from mbostock's Arc Tween Clock example.

The first thing I learned with this is that .selectAll() takes a CSS selector as its argument. When dealing with multiple copies of the same element, like the arcs and the red lines here (which are both svg:path elements), if you want to use transitions and separate styling then one must apply class or id attributes or something so that the CSS selectors for the two sets of transitions can be mutually independent.

The second thing is that I learned is that I hate code that puns. False punning I can stand (though the commentary below points out what I think is a false punning bug I fixed), but I'm not smart enough and/or don't have the energy to deal with three or four separate simultaneous meanings of "path" and "line" that all need to be kept in mind when reading and writing the same small chunk of code. I've been known to do this kind of thing in the past, particularly when writing [Grails](http://grails.o

@jcdcodes
jcdcodes / README.md
Last active February 6, 2016 18:06
Vector Map

Presenting a Path Through Town

An incomplete bibliography:

@jcdcodes
jcdcodes / README.md
Last active February 6, 2016 17:07
Commute Times

Here's the depressing history of the time spent getting to and from work over the last several years. To my astonishment, there is no super obvious increase in the amount of time the commute takes. Perhaps my tolerance for sitting in the car is waning. (Or maybe it's a chart design problem. Or both.)

Vacations and holidays are only barely visible, with the possible exception of two and a half weeks this past June. The green band is thirty to forty minutes, which is what I tell people the drive takes.

@jcdcodes
jcdcodes / README.md
Last active February 7, 2016 16:10
Tracing a Path

Playing with paths, scrubbing, proximity to line segments, maps, etc. The path shown here is a Saturday morning run from late 2014.

@jcdcodes
jcdcodes / HealthInfoBreachesClean.csv
Last active April 21, 2022 08:18
Health Information Breaches
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
Name of Covered Entity,State,Business Associate Involved,Individuals Affected,Clean Individuals Affected,Date of Breach,Type of Breach,"Location of
Breached
Information",Date Posted or Updated,Clean Date,Summary
Brown University,RI,Blue Cross Blue Shield of Rhode Island,528,528,12/11/2009,Unauthorized Access/Disclosure,Paper,3/4/2010,12/11/2009,"On January 5, 2010, BCBSRI was notified that a 16 page report pertaining to Brown Universityís health plan was impermissibly disclosed to two other BCBSRI agents. The reports contained the PHI of approximately 528 individuals. The PHI involved: first and last names, dates of service, cost of medical care provided, and member identification numbers. Following the breach, BCBSRI recovered the reports, received written assurances that any electronic copies of the reports were deleted, notified affected individuals of the breach, implemented new procedure for all outgoing correspondence, and is in the process of auditing all affected membersí claim history to ensure n
@jcdcodes
jcdcodes / cafe.csv
Last active February 6, 2016 17:04
CAFE Standards
year car t2wd t4wd truck
1978 18.0 null null null
1979 19.0 17.2 15.8 17.2
1980 20.0 16.0 14.0 null
1981 22.0 16.7 15.0 null
1982 24.0 18.0 16.0 17.5
1983 26.0 19.5 17.5 19.0
1984 27.0 20.3 18.5 20.0
1985 27.5 19.7 18.9 19.5
1986 26.0 20.5 19.5 20.0
@jcdcodes
jcdcodes / cpi.txt
Last active February 6, 2016 17:03
CPI
year cpi
1774 7.82
1775 7.41
1776 8.46
1777 10.31
1778 13.38
1779 11.84
1780 13.29
1781 10.72
1782 11.76
@jcdcodes
jcdcodes / index.html
Last active February 6, 2016 17:02
Hello world
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Gill Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}