Add VT2-examples: all 6 chapters of 'Visualize This' (110 files) — data scraping, ETL, trends, categorical, multivariate, spatial, distribution analysis

This commit is contained in:
neo committed 2026-06-24 14:49:15 +05:00
1 parent 088771a9cf
commit b42b866a8c
110 files changed
+400895

No files matched your search

@@ -0,0 +1,16 @@
"code" "pctnokidsf" "pctkidsf" "pctnokidsm" "pctkidsm" "desc" "durmedkidsf" "durmednokidsf" "durmedkidsm" "durmednokidsm"
30201 0.2 20.7 0.2 10.3 "Homework" 45 0 45 0
30101 0.9 71.2 0.6 46.8 "Physical care" 50 0 31 0
30103 0.8 21.6 0.3 21.4 "Playing, not sports" 70 0 60 0
30112 0.9 48 0.3 27.2 "Picking up/dropping off" 10 0 10 0
30102 0.2 14.5 0 9.1 "Reading to/with" 20 0 20 0
30302 0.1 3 0 0.6 "Obtaining medical care" 60 0 50 0
30301 0.1 3 0 0.8 "Providing medical care" 15 0 30 0
30111 0.2 11.7 0.2 4.9 "Waiting for/with" 15 0 15 0
30202 0 1.7 0 0.5 "Meetings and school conferences" 25 0 30 0
30106 0.3 13.8 0.2 5.7 "Talking with/listening" 25 0 25 0
30110 0.1 4.8 0 2.6 "Attending events" 71 0 85 0
30109 0.3 12.1 0.1 5.1 "Looking after (as a pri. activity)" 40 0 45 0
30105 0 1.3 0 1 "Playing sports" 43 0 60 0
30108 0 6.4 0 1.6 "Organization and planning" 10 0 15 0
30303 0.1 1.4 0 0.3 "Waiting for children's health" 20 0 30 0
1 code pctnokidsf pctkidsf pctnokidsm pctkidsm desc durmedkidsf durmednokidsf durmedkidsm durmednokidsm
2 30201 0.2 20.7 0.2 10.3 Homework 45 0 45 0
3 30101 0.9 71.2 0.6 46.8 Physical care 50 0 31 0
4 30103 0.8 21.6 0.3 21.4 Playing, not sports 70 0 60 0
5 30112 0.9 48 0.3 27.2 Picking up/dropping off 10 0 10 0
6 30102 0.2 14.5 0 9.1 Reading to/with 20 0 20 0
7 30302 0.1 3 0 0.6 Obtaining medical care 60 0 50 0
8 30301 0.1 3 0 0.8 Providing medical care 15 0 30 0
9 30111 0.2 11.7 0.2 4.9 Waiting for/with 15 0 15 0
10 30202 0 1.7 0 0.5 Meetings and school conferences 25 0 30 0
11 30106 0.3 13.8 0.2 5.7 Talking with/listening 25 0 25 0
12 30110 0.1 4.8 0 2.6 Attending events 71 0 85 0
13 30109 0.3 12.1 0.1 5.1 Looking after (as a pri. activity) 40 0 45 0
14 30105 0 1.3 0 1 Playing sports 43 0 60 0
15 30108 0 6.4 0 1.6 Organization and planning 10 0 15 0
16 30303 0.1 1.4 0 0.3 Waiting for children's health 20 0 30 0
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Who Takes Care of the Kids</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
</head>
<div id="main-wrapper">
<h1>Time with the Kids</h1>
<div id="chart"></div>
</div>
<script src="js/d3.v7.min.js"></script>
<script src="js/barbell.js"></script>
@@ -0,0 +1,114 @@
// Dimensions of chart.
let margin = { top: 20, right: 20, bottom: 50, left: 290 },
// width = parseInt(d3.select('#chart').style('width'), 10) - margin.left - margin.right,
width = 650 - margin.left - margin.right,
height = 550 - margin.top - margin.bottom;
// Start SVG
let svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Scales: x and y
let x = d3.scaleLinear()
.domain([0, 80])
.range([0, width]);
let y = d3.scaleBand()
// .domain([3, 6])
.range([height, 0]);
let activities;
let xAxis, yAxis, xAxisEl, yAxisEl;
let barbell;
// Load data
const activitiesData = Promise.all([
d3.tsv("data/hh-activities-withkids.tsv", d3.autoType)
]);
activitiesData.then(function(data) {
activities = data[0].sort((a, b) => a.pctkidsf - b.pctkidsf);
// console.log(activities);
// Initialize chart now that data is loaded.
initChart();
});
function initChart() {
// x-axis
xAxis = d3.axisBottom(x)
.tickFormat(d => d + "%")
.ticks(5)
.tickSize(-height-8)
.tickPadding(5);
xAxisEl = svg.append("g")
.attr("class", "x axis bottom")
.attr("transform", "translate(0,"+(height+8)+")");
xAxisEl.append("text")
.attr("class", "axistitle")
.attr("text-anchor", "start")
.attr("x", 0).attr("y", 0)
.attr("dx", "-.75em").attr("dy", "2.5em")
.text("Engaged in Activity");
xAxisEl.call(xAxis);
// y-axis
y.domain(activities.map(d => d.desc));
yAxis = d3.axisLeft(y)
.tickSize(0);
yAxisEl = svg.append("g")
.attr("class", "y axis left")
.attr("transform", "translate("+(-8)+",0)");
yAxisEl.call(yAxis);
// barbells
barbell = svg.selectAll(".barbell")
.data(activities)
.join("g")
.attr("class", "barbell")
.attr("transform", d =>
"translate(0,"+(y(d.desc)+(y.bandwidth()/2))+")")
.attr("id", d => "act"+d.code);
// connecting lines
barbell.append("line")
.attr("x1", d => x(d.pctkidsm))
.attr("x2", d => x(d.pctkidsf))
.attr("y1", 0).attr("y2", 0)
.attr("stroke", "#000000");
// circles
barbell.append("circle")
.attr("class", "men")
.attr("cx", d => x(d.pctkidsm))
.attr("cy", 0)
.attr("r", 6);
barbell.append("circle")
.attr("class", "women")
.attr("cx", d => x(d.pctkidsf))
.attr("cy", 0)
.attr("r", 6);
// labels
svg.append("text")
.attr("x", x(activities[14].pctkidsm))
.attr("y", y(activities[14].desc))
.attr("text-anchor", "middle")
.text("MEN");
svg.append("text")
.attr("x", x(activities[14].pctkidsf))
.attr("y", y(activities[14].desc))
.attr("text-anchor", "middle")
.text("WOMEN");
}
@@ -0,0 +1,2 @@
// https://d3js.org v7.4.0 Copyright 2010-2022 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t,i=t;function o(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<0?e=r+1:o=r}while(e<o)}return e}return 2!==t.length&&(e=(n,e)=>t(n)-e,r=n,i=(e,r)=>n(t(e),r)),{left:o,center:function(t,n,r=0,i=t.length){const a=o(t,n,r,i-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<=0?e=r+1:o=r}while(e<o)}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;var c=o;function f(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function s(t){return 0|t.length}function l(t){return!(t>0)}function h(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function d(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function p(t,n){const e=d(t,n);return e?Math.sqrt(e):e}function g(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class y{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(v(this,t))}has(t){return super.has(v(this,t))}set(t,n){return super.set(_(this,t),n)}delete(t){return super.delete(b(this,t))}}class InternSet extends Set{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(v(this,t))}add(t){return super.add(_(this,t))}delete(t){return super.delete(b(this,t))}}function v({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function _({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function b({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function m(t){return null!==t&&"object"==typeof t?t.valueOf():t}function x(t){return t}function w(t,...n){return k(t,x,x,n)}function M(t,...n){return k(t,Array.from,x,n)}function A(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function T(t,n,...e){return k(t,x,n,e)}function S(t,n,...e){return k(t,Array.from,n,e)}function E(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function k(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function N(t,n){return Array.from(n,(n=>t[n]))}function C(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=z(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>z(e[t],e[n])))),N(t,r)}return t.sort(P(e))}function P(t=n){if(t===n)return z;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function z(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var D=Array.prototype.slice;function R(t){return()=>t}var F=Math.sqrt(50),q=Math.sqrt(10),O=Math.sqrt(2);function U(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=I(t,n,e))||!isFinite(a))return[];if(a>0){let e=Math.round(t/a),r=Math.round(n/a);for(e*a<t&&++e,r*a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)*a}else{a=-a;let e=Math.round(t*a),r=Math.round(n*a);for(e/a<t&&++e,r/a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)/a}return r&&o.reverse(),o}function I(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=F?10:o>=q?5:o>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=F?10:o>=q?5:o>=O?2:1)}funLine truncated
@@ -0,0 +1,91 @@
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* Main layout
============================ */
#main-wrapper {
width: 600px;
margin: 40px auto;
font-family: Georgia, serif;
}
h1 {
font-family: Georgia, serif;
font-size: 1.45em;
text-align: center;
}
/* Chart
============================ */
#chart {
position: relative;
margin: 0 auto;
}
text {
font-family: "Courier New", Courier, monospace;
font-size: .8rem;
}
.axis .axistitle {
text-transform: uppercase;
fill: #333;
font-size: .8rem;
}
.axis path,
.axis line {
fill: none;
stroke: #e0e0e0;
stroke-width: .5px;
shape-rendering: crispEdges;
}
.x.axis path, .y.axis path {
display: none;
}
.barbell line {
stroke-width: 1px;
}
.barbell circle {
stroke: #000;
stroke-width: 1px;
}
.barbell circle.men {
fill: #317e7f;
}
.barbell circle.women {
fill: #f98e1a;
}
/* Interaction
============================ */
circle.current {
stroke: #000;
stroke-width: 3px;
}
@@ -0,0 +1,292 @@
"activity" "schappy_mean" "meaning_mean" "descrip" "relwt"
"010301" 3.65 5.2875 "Health-related self care" 0.3437
"010399" 0.4441 4.332 "Self care, misc." 0.0022
"020101" 4.3016 5.0383 "Interior cleaning" 1.362
"020102" 4.1979 4.866 "Laundry" 0.806
"020103" 4.8934 5.4284 "Sewing, repairing, and maintaining textiles" 0.076
"020104" 4.5711 4.8468 "Storing interior household items, inc. food" 0.2002
"020201" 4.6729 5.1604 "Food and drink prep." 3.8685
"020202" 4.9016 5.5208 "Food presentation" 0.0659
"020203" 4.3252 4.9249 "Kitchen and food clean-up" 0.9425
"020301" 4.5569 5.2724 "Interior arrangement, decoration, and repairs" 0.1527
"020302" 4.7587 4.8901 "Building and repairing furniture" 0.0073
"020303" 4.2926 5.29 "Heating and cooling" 0.0446
"020401" 4.1507 5.0967 "Exterior cleaning" 0.1179
"020402" 4.8953 5.3774 "Exterior repair, improvements, and decoration" 0.0696
"020501" 4.6695 5.2066 "Lawn, garden, and houseplant care" 0.6958
"020502" 4.0334 5.083 "Ponds, pools, and hot tubs" 0.0143
"020602" 4.591 5.3077 "Care for animals and pets" 0.6464
"020603" 4.9233 5.2797 "Walking, exercising, playing with animals" 0.4182
"020699" 4.4816 4.6297 "Pet and animal care, misc." 0.0032
"020701" 4.3308 5.1412 "Vehicle repair and maintenance (by self)" 0.14
"020801" 4.3562 5.1824 "App, tool, toy set-up, repair, and maint (by self)" 0.0589
"020901" 3.715 4.999 "Financial management" 0.1445
"020902" 4.386 4.9614 "Household and personal organization" 0.6869
"020903" 4.3574 4.8634 "Household and personal mail and messages (except e-mail)" 0.1483
"020904" 4.1977 4.3381 "Household and personal e-mail and messages" 0.2182
"020905" 4.0463 4.9778 "Home security" 0.023
"029999" 4.4219 4.895 "Household activities, misc." 0.0023
"030101" 4.8037 5.4819 "Care for household children" 1.7066
"030102" 5.3559 5.7285 "Reading to/with household children" 0.1706
"030103" 5.5047 5.7429 "Playing with household children" 0.5338
"030104" 5.4589 5.6239 "Arts and crafts with household children" 0.0131
"030105" 5.3366 5.712 "Playing sports with household children" 0.0246
"030106" 4.997 5.5712 "Talking with/listening to household children" 0.1503
"030108" 4.4771 5.0912 "Organization for household children" 0.0445
"030109" 5.0333 5.5065 "Looking after household children" 0.1501
"030110" 5.0778 5.615 "Attending household children's events" 0.0925
"030111" 4.7433 5.3825 "Waiting for/with household children" 0.0482
"030112" 4.7327 5.3525 "Picking up/dropping off household children" 0.3373
"030199" 5.0626 5.4164 "Caring for and helping household children, misc." 0.0058
"030201" 4.5065 5.5892 "Homework (household children)" 0.1711
"030202" 4.062 5.6243 "Meetings and school conferences (household children)" 0.0058
"030203" 5.0198 5.808 "Home schooling of household children" 0.0062
"030299" 3.4516 5.3227 "Activities related to household child's education, misc." 0.0037
"030301" 3.2966 5.5604 "Providing medical care to household children" 0.0218
"030302" 3.484 5.545 "Obtaining medical care for household children" 0.0127
"030303" 2.7979 5.6905 "Waiting associated with household children's health" 0.0101
"030401" 4.3313 5.5832 "Care for household adults" 0.0634
"030402" 4.6669 5.0003 "Looking after household adult (as a primary activity)" 0.0043
"030403" 3.7147 5.525 "Providing medical care to household adult" 0.021
"030404" 4.71 5.7405 "Obtaining medical and care services for household adult" 0.0075
"030405" 4.234 5.476 "Waiting associated with caring for household adults" 0.006
"030501" 4.3418 5.0822 "Helping household adults" 0.0088
"030502" 3.9261 5.5183 "Organization and planning for household adults" 0.0032
"030503" 4.6838 5.0713 "Picking up/dropping off household adult" 0.0368
"030504" 4.8728 5.4733 "Waiting associated with helping household adults" 0.0247
"030599" 4.7353 5.1179 "Helping household adults, misc." 0.0041
"040101" 5.3144 5.6892 "Care for non-household children" 0.0835
"040102" 5.632 5.8949 "Reading to/with non-household children" 0.0091
"040103" 5.7316 5.8642 "Playing with non-household children" 0.116
"040105" 4.7162 6 "Playing sports with non-household children" 0.005
"040106" 5.632 5.8326 "Talking with/listening to non-household children" 0.0251
"040108" 4.6278 5.5581 "Organization and planning for non-household children" 0.0052
"040109" 5.3345 5.8355 "Looking after non-household children (as primary activity)" 0.033
"040110" 5.5768 5.7883 "Attending non-household children's events" 0.0165
"040111" 5.1291 5.322 "Waiting for/with non-household children" 0.0074
"040112" 5.0798 5.5207 "Dropping off/picking up non-household children" 0.0691
"040199" 5.5774 5.7106 "Caring for and helping non-household children, misc." 0.0054
"040201" 4.8287 5.8439 "Homework (non-household children)" 0.0077
"040401" 4.5175 5.6303 "Care for non-household adults" 0.0244
"040402" 3.6183 5.4763 "Looking after non-household adult" 0.005
"040403" 4.3324 5.7824 "Providing medical care to non-household adult" 0.0083
"040404" 3.697 5.7815 "Obtaining medical and care svcs for non-household adult" 0.0028
"040405" 3.8136 5.5421 "Waiting associated with caring for non-household adults" 0.0045
"040501" 4.7363 5.3113 "Hswrk, cooking, and shopping asst, non-household adults" 0.0447
"040502" 4.6688 5.368 "House and lawn maint and repair asst, non-household adults" 0.0436
"040503" 5.3119 4.9995 "Animal and pet care assistance for non-household adults" 0.0134
"040504" 4.5605 5.2475 "Vehicle/appliance maint/repair asst, non-household adults" 0.0201
"040505" 4.4638 4.9507 "Financial mgmt asst for non-household adults" 0.0049
"040506" 4.1688 5.3376 "household mgmt and paperwork asst, non-household adults" 0.0255
"040507" 4.9319 5.3192 "Picking up/dropping off non-household adult" 0.1284
"040508" 4.2182 5.2695 "Waiting associated with helping non-household adults" 0.023
"040599" 4.3443 5.2868 "Helping non-household adults, misc." 0.015
"050101" 4.2106 5.0372 "Work, main job" 3.8671
"050102" 4.2169 5.0135 "Work, other job(s)" 0.1346
"050104" 4.1585 4.952 "Waiting associated with working" 0.0258
"050199" 3.502 3.8063 "Working, misc." 0.0012
"050201" 4.8683 4.8224 "Socializing, relaxing, and leisure as part of job" 0.0028
"050202" 4.6143 4.9853 "Eating and drinking as part of job" 0.0178
"050301" 5.1982 5.486 "Income-generating hobbies, crafts, and food" 0.0079
"050303" 4.7095 4.9767 "Income-generating services" 0.0307
"050304" 3.7731 5.3123 "Income-generating rental property activities" 0.0053
"050399" 4.5872 5.2503 "Other income-generating activities, misc." 0.0391
"050401" 3.4136 5.4454 "Job search activities" 0.1018
"050403" 4.4473 5.6315 "Job interviewing" 0.0046
"060101" 4.0938 4.9396 "Taking class for degree, certification, or lic" 0.1708
"060102" 4.8102 5.4599 "Taking class for personal interest" 0.0199
"060103" 3.7852 5.4278 "Waiting associated with taking classes" 0.005
"060201" 5.3468 5.7823 "Extracurricular club activities" 0.0028
"060202" 4.7063 5.0467 "Extracurricular music and performance activities" 0.0049
"060299" 4.8569 3.7138 "Education-related extracurricular activities, misc." 0.0017
"060301" 3.3418 4.9021 "Homework for class, for degree" 0.2883
"060302" 4.9457 5.6787 "Homework for class, for personal interest" 0.0067
"060399" 3.0733 4.7988 "Research/homework misc." 0.0048
"060401" 5.1 5.8001 "Admin activities: class for degree, cert, or lic" 0.0048
"069999" 3.8977 5.3269 "Education, misc." 0.0103
"070101" 4.3286 4.8367 "Grocery shopping" 0.5658
"070102" 4.2173 4.872 "Purchasing gas" 0.0943
"070103" 4.6715 4.8424 "Purchasing food (not groceries)" 0.3922
"070104" 4.6217 4.9111 "Shopping" 1.0884
"070105" 3.8775 5.1629 "Waiting associated with shopping" 0.0118
"070201" 4.6118 4.9319 "Comparison shopping" 0.0037
"080101" 5.0985 5.5574 "Using paid childcare services" 0.0073
"080201" 4.2378 4.9952 "Banking" 0.0579
"080202" 4.6522 5.3043 "Using other financial services" 0.0055
"080203" 4.5258 5.3144 "Waiting associated w/banking/financial services" 0.0023
"080401" 3.5839 5.4735 "Using health and care services outside the home" 0.1335
"080402" 3.5935 4.8952 "Using in-home health and care services" 0.0068
"080403" 3.3676 5.2215 "Waiting associated with medical services" 0.031
"080501" 4.8617 5.0354 "Using personal care services" 0.0583
"080502" 4.809 3.6661 "Waiting associated w/personal care services" 0.0025
"080601" 3.9619 5.0571 "Activities rel. to purchasing/selling real estate" 0.0125
"080701" 3.0977 5.7036 "Using veterinary services" 0.0085
"080702" 4.4371 5.4764 "Waiting associated with veterinary services" 0.003
"089999" 4.8267 5.1165 "Professional and personal services, misc." 0.0083
"090103" 4.9078 5.18 "Using clothing repair and cleaning services" 0.0066
"090201" 4.0885 5.0779 "Using home maint/repair/décor/construction svcs" 0.0121
"090202" 4.866 5.2007 "Wtg assoc w/ home main/repair/décor/constr" 0.0058
"090301" 4.139 4.4996 "Using pet services" 0.0043
"090401" 5.0353 5.5002 "Using lawn and garden services" 0.0034
"090501" 3.5476 4.8717 "Using vehicle maintenance or repair services" 0.021
"090502" 4.4548 4.9964 "Waiting assoc with vehicle main. or repair svcs" 0.0087
"100102" 4.036 5.3569 "Using social services" 0.0034
"100103" 3.6129 5.5428 "Obtaining licenses and paying fines, fees, taxes" 0.0071
"100201" 3.8247 5.8242 "Civic obligations and participation" 0.0055
"100304" 4.2609 4.9115 "Waiting associated with using government services" 0.0028
"110101" 4.8524 5.1731 "Eating and drinking" 10
"110201" 4.6021 4.9123 "Waiting associated w/eating and drinking" 0.0332
"120101" 5.0809 5.424 "Socializing and communicating" 2.5822
"120201" 5.4271 5.486 "Attending or hosting parties/receptions/ceremonies" 0.164
"120202" 4.4307 5.3018 "Attending meetings for personal interest (not volunteering)" 0.0262
"120301" 4.6856 5.1863 "Relaxing, thinking" 1.0886
"120302" 4.5497 5.0903 "Tobacco and drug use" 0.0602
"120303" 4.634 4.7545 "Television and movies" 5.058
"120304" 4.6446 5.4465 "Television (religious)" 0.0193
"120305" 4.5594 5.1203 "Listening to the radio" 0.0842
"120306" 4.9839 5.1187 "Listening to/playing music" 0.112
"120307" 4.9215 4.6528 "Playing games" 0.4886
"120308" 4.274 4.4493 "Computer use for leisure (exc. Games)" 0.5267
"120309" 4.9311 5.2819 "Arts and crafts as a hobby" 0.0832
"120311" 4.9605 5.5621 "Hobbies, except arts and crafts and collecting" 0.0094
"120312" 4.5865 4.8958 "Reading for personal interest" 1.1138
"120313" 4.8226 5.2921 "Writing for personal interest" 0.0148
"120399" 5.3157 5.4208 "Relaxing and leisure, misc." 0.0091
"120401" 5.2838 5.2415 "Attending performing arts" 0.0313
"120402" 5.2915 5.4177 "Attending museums" 0.019
"120403" 5.1679 5.0339 "Attending movies/film" 0.0597
"120404" 4.9542 4.7208 "Attending gambling establishments" 0.0142
"120499" 5.3123 5.3884 "Arts and entertainment, misc." 0.0612
"120504" 5.3712 5.571 "Waiting associated with arts and entertainment" 0.0042
"130101" 5.1623 5.4596 "Doing aerobics" 0.0089
"130102" 5.2133 4.9253 "Playing baseball" 0.0034
"130103" 5.3224 5.1499 "Playing basketball" 0.0297
"130104" 5.3086 5.3288 "Biking" 0.0459
"130105" 5.1553 4.7978 "Playing billiards" 0.0084
"130106" 5.5945 5.2725 "Boating" 0.0158
"130107" 4.257 4.9967 "Bowling" 0.0098
"130109" 5.2666 5.6163 "Dancing" 0.0144
"130110" 4.1328 5.5767 "Participating in equestrian sports" 0.0054
"130112" 5.1375 5.3017 "Fishing" 0.0328
"130113" 5.1277 4.4822 "Playing football" 0.0075
"130114" 5.1526 5.1615 "Golfing" 0.0337
"130116" 5.3033 5.4277 "Hiking" 0.0162
"130117" 4.9474 5.6306 "Playing hockey" 0.0046
"130118" 4.6138 5.5714 "Hunting" 0.0177
"130119" 5 5.878 "Participating in martial arts" 0.0049
"130120" 5.2921 5.1088 "Playing racquet sports" 0.0087
"130122" 5.2786 4.8898 "Rollerblading" 0.0065
"130124" 4.8552 5.4258 "Running" 0.0721
"130125" 5.7289 5.2832 "Skiing, ice skating, snowboarding" 0.0084
"130126" 5.3031 5.3535 "Playing soccer" 0.0116
"130127" 4.7308 5.2851 "Playing softball" 0.0067
"130128" 4.4901 5.4879 "Using cardiovascular equipment" 0.0678
"130129" 5.8696 5.5908 "Vehicle touring/racing" 0.0065
"130130" 5.8128 5.4136 "Playing volleyball" 0.0058
"130131" 4.9928 5.4046 "Walking" 0.3685
"130132" 5.4465 5.4959 "Participating in water sports" 0.0895
"130133" 4.8286 5.4693 "Weightlifting/strength training" 0.0689
"130134" 4.6372 5.3806 "Working out, unspecified" 0.2212
"130136" 4.567 5.4904 "Doing yoga" 0.0186
"130199" 5.1362 5.4151 "Playing sports misc." 0.0416
"130202" 4.9877 5.1101 "Watching baseball" 0.0108
"130203" 5.5753 5.0357 "Watching basketball" 0.0063
"130213" 5.238 5.4997 "Watching football" 0.0096
"130216" 4.6272 5.2029 "Watching hockey" 0.0071
"130218" 4.8914 4.4692 "Watching racquet sports" 0.0023
"130224" 5.5379 5.3283 "Watching soccer" 0.0081
"130227" 5.499 4.9985 "Watching volleyball" 0.0022
"130299" 4.818 5.182 "Attending sporting events, misc." 0.0053
"140101" 5.1801 5.7656 "Attending religious services" 0.5128
"140102" 5.1242 5.8226 "Participation in religious practices" 0.3447
"140103" 5.3894 5.4142 "Waiting assoc w/religious and spiritual activities" 0.0098
"140105" 5.294 5.8076 "Religious education activities" 0.0787
"149999" 5.4999 6 "Religious and spiritual activities, misc." 0.0029
"150101" 4.3872 5.1186 "Computer use" 0.0465
"150102" 4.892 5.3698 "Organizing and preparing" 0.0538
"150103" 5.1465 5.8767 "Reading" 0.0049
"150104" 3.9379 5.2894 "Telephone calls (except hotline counseling)" 0.0174
"150105" 5.0888 4.8161 "Writing" 0.0026
"150106" 5.5408 5.6845 "Fundraising" 0.0133
"150199" 5.2515 5.4781 "Administrative and support activities, misc." 0.0196
"150201" 5.0504 5.6601 "Food preparation, presentation, clean-up" 0.036
"150202" 4.4875 5.4283 "Collecting and delivering clothing and other goods" 0.0101
"150203" 5.1426 5.5682 "Providing care" 0.0195
"150204" 5.2749 5.6544 "Teaching, leading, counseling, mentoring" 0.0525
"150299" 4.7265 5.6233 "Social service and care activities, misc." 0.0093
"150302" 4.833 5.3045 "Indoor and outdoor maintenance, repair, and clean-up" 0.0173
"150401" 5.2987 5.6969 "Performing" 0.0265
"150402" 5.037 5.5589 "Serving at volunteer events and cultural activities" 0.0194
"150501" 4.5845 5.3972 "Attending meetings, conferences, and training" 0.0507
"150701" 4.5999 5.2999 "Waiting associated with volunteer activities" 0.0024
"159999" 5.2785 5.6518 "Volunteer activities, misc." 0.1119
"160101" 4.7783 5.5471 "Telephone calls to/from family members" 0.3752
"160102" 4.795 5.1776 "Phone calls to/from friends, neighbors" 0.2003
"160103" 2.2221 5.5185 "Telephone calls to/from education svcs providers" 0.0032
"160104" 3.4873 5.4081 "Telephone calls to/from salespeople" 0.0059
"160105" 2.6467 4.8562 "Phone calls to/from prof, personal svcs providers" 0.0167
"160106" 2.1017 5.3628 "Phone calls to/from household services providers" 0.0106
"160108" 3.7003 5.8925 "Telephone calls to/from government officials" 0.0056
"160199" 4.5566 5.211 "Telephone calls (to or from), misc." 0.1438
"180101" 4.674 5.1188 "Travel for personal care" 0.0959
"180201" 4.4686 5.0219 "Travel for housework" 0.0524
"180202" 4.8177 5.1817 "Travel for food and drink prep" 0.0526
"180203" 4.4063 5.4387 "Travel for int. maint, repair, and decoration" 0.0109
"180204" 4.6292 4.7371 "Travel for ext. maint, repair, and decoration" 0.0055
"180205" 4.7036 5.5364 "Travel for lawn, garden, and houseplants" 0.013
"180206" 4.7082 5.0638 "Travel for care for animals (not vet care)" 0.0486
"180207" 5.0427 5.0209 "Travel for vehicle care and maint (by self)" 0.0223
"180208" 5.8333 6 "Travel for tool, repair, and maintenance" 0.0043
"180209" 4.6447 5.0846 "Travel for household management" 0.2689
"180302" 4.797 5.2995 "Travel for caring for and helping household children" 0.859
"180303" 4.2 5.0188 "Travel for household children's education" 0.0126
"180304" 4.1476 5.2791 "Travel for household children's health" 0.0163
"180305" 3.8614 5.8019 "Travel for caring for household adults" 0.0206
"180306" 4.5551 5.1211 "Travel for helping household adults" 0.1177
"180402" 4.8915 5.2767 "Travel for helping non-household kids" 0.1991
"180404" 3.6108 5.3335 "Travel for non-household children's health" 0.0043
"180405" 4.352 5.2076 "Travel for caring for non-household adults" 0.015
"180406" 4.8412 5.1668 "Travel for helping non-household adults" 0.4152
"180501" 4.433 4.9649 "Travel for working" 2.2379
"180502" 3.9999 4.9312 "Travel for work-related activities" 0.007
"180503" 4.5506 5.4222 "Travel for income-generating activities" 0.0318
"180504" 3.8844 5.2982 "Travel for job search and interviewing" 0.0322
"180601" 4.2031 4.8203 "Travel for taking class" 0.125
"180602" 4.9581 4.6657 "Travel for extracurricular activities (ex. Sports)" 0.0058
"180603" 4.4433 4.6157 "Travel for research/homework" 0.0171
"180604" 4.1596 4.7597 "Travel for registration/admin activities" 0.003
"180701" 4.596 4.8843 "Traveling to/from the grocery store" 0.8789
"180703" 4.7388 4.952 "Travel for purchasing food (not groceries)" 0.5882
"180704" 4.6983 5.0044 "Travel for shopping, not groceries" 1.433
"180705" 4.5856 5.0456 "Traveling to/from gas station" 0.1591
"180801" 4.8568 6 "Travel for using childcare services" 0.005
"180802" 4.3214 5.0572 "Travel for using financial svcs and banking" 0.0787
"180804" 3.6482 5.3131 "Travel for using medical services" 0.1596
"180805" 4.8084 4.9991 "Travel for using personal care services" 0.057
"180806" 4.1981 4.8519 "Travel for using real estate services" 0.0163
"180807" 3.4253 5.2574 "Travel for using veterinary services" 0.013
"180899" 5.0215 4.9994 "Travel rel. to using prof, personal care svcs misc." 0.0055
"180901" 4.4148 5.1697 "Travel for using household services" 0.0113
"180902" 3.6941 5.7827 "Travel for home maintenance" 0.0028
"180903" 4.5553 4.2484 "Travel for using pet services (not vet)" 0.0086
"180905" 4.3643 5.0414 "Travel for vehicle maintenance" 0.0455
"181001" 4.543 5.2496 "Travel for using government services" 0.0124
"181002" 4.9754 5.6815 "Travel for civic obligations and participation" 0.0049
"181101" 4.9796 5.0953 "Travel for eating and drinking" 1.4294
"181201" 4.8021 5.1563 "Travel for socializing" 1.1308
"181202" 5.1019 5.1226 "Trvl related to attending or hosting social events" 0.1871
"181204" 5.0067 5.073 "Travel for arts and entertainment" 0.1724
"181205" 5.1206 5.0307 "Travel as a form of entertainment" 0.0582
"181206" 4.7928 5.0097 "Travel for relaxing and leisure" 0.3648
"181301" 4.8777 5.071 "Travel for sports, exercise, or recreation" 0.5078
"181302" 4.8429 5.0556 "Travel for attending sporting events" 0.0643
"181401" 5.0299 5.5472 "Travel for religious practices" 0.5638
"181501" 4.8462 5.2251 "Travel for volunteering" 0.2669
"181599" 5.0713 5.285 "Travel for volunteer activities, misc." 0.0084
"181601" 4.356 4.9264 "Travel for phone calls" 0.0229
"181801" 4.7595 4.3052 "Security procedures related to traveling" 0.009
"189999" 4.6894 5.1014 "Traveling, misc." 0.2231
"500101" 4.5424 5.223 "Insufficient detail in verbatim" 0.5265
"500103" 4.907 5.2302 "Missing travel or destination" 0.0964
"500104" 4.4997 5.2727 "Recorded simultaneous activities incorrectly" 0.0315
"500107" 4.6635 5.3266 "Unable to code activity at 1st tier" 0.0125
1 activity schappy_mean meaning_mean descrip relwt
2 010301 3.65 5.2875 Health-related self care 0.3437
3 010399 0.4441 4.332 Self care, misc. 0.0022
4 020101 4.3016 5.0383 Interior cleaning 1.362
5 020102 4.1979 4.866 Laundry 0.806
6 020103 4.8934 5.4284 Sewing, repairing, and maintaining textiles 0.076
7 020104 4.5711 4.8468 Storing interior household items, inc. food 0.2002
8 020201 4.6729 5.1604 Food and drink prep. 3.8685
9 020202 4.9016 5.5208 Food presentation 0.0659
10 020203 4.3252 4.9249 Kitchen and food clean-up 0.9425
11 020301 4.5569 5.2724 Interior arrangement, decoration, and repairs 0.1527
12 020302 4.7587 4.8901 Building and repairing furniture 0.0073
13 020303 4.2926 5.29 Heating and cooling 0.0446
14 020401 4.1507 5.0967 Exterior cleaning 0.1179
15 020402 4.8953 5.3774 Exterior repair, improvements, and decoration 0.0696
16 020501 4.6695 5.2066 Lawn, garden, and houseplant care 0.6958
17 020502 4.0334 5.083 Ponds, pools, and hot tubs 0.0143
18 020602 4.591 5.3077 Care for animals and pets 0.6464
19 020603 4.9233 5.2797 Walking, exercising, playing with animals 0.4182
20 020699 4.4816 4.6297 Pet and animal care, misc. 0.0032
21 020701 4.3308 5.1412 Vehicle repair and maintenance (by self) 0.14
22 020801 4.3562 5.1824 App, tool, toy set-up, repair, and maint (by self) 0.0589
23 020901 3.715 4.999 Financial management 0.1445
24 020902 4.386 4.9614 Household and personal organization 0.6869
25 020903 4.3574 4.8634 Household and personal mail and messages (except e-mail) 0.1483
26 020904 4.1977 4.3381 Household and personal e-mail and messages 0.2182
27 020905 4.0463 4.9778 Home security 0.023
28 029999 4.4219 4.895 Household activities, misc. 0.0023
29 030101 4.8037 5.4819 Care for household children 1.7066
30 030102 5.3559 5.7285 Reading to/with household children 0.1706
31 030103 5.5047 5.7429 Playing with household children 0.5338
32 030104 5.4589 5.6239 Arts and crafts with household children 0.0131
33 030105 5.3366 5.712 Playing sports with household children 0.0246
34 030106 4.997 5.5712 Talking with/listening to household children 0.1503
35 030108 4.4771 5.0912 Organization for household children 0.0445
36 030109 5.0333 5.5065 Looking after household children 0.1501
37 030110 5.0778 5.615 Attending household children's events 0.0925
38 030111 4.7433 5.3825 Waiting for/with household children 0.0482
39 030112 4.7327 5.3525 Picking up/dropping off household children 0.3373
40 030199 5.0626 5.4164 Caring for and helping household children, misc. 0.0058
41 030201 4.5065 5.5892 Homework (household children) 0.1711
42 030202 4.062 5.6243 Meetings and school conferences (household children) 0.0058
43 030203 5.0198 5.808 Home schooling of household children 0.0062
44 030299 3.4516 5.3227 Activities related to household child's education, misc. 0.0037
45 030301 3.2966 5.5604 Providing medical care to household children 0.0218
46 030302 3.484 5.545 Obtaining medical care for household children 0.0127
47 030303 2.7979 5.6905 Waiting associated with household children's health 0.0101
48 030401 4.3313 5.5832 Care for household adults 0.0634
49 030402 4.6669 5.0003 Looking after household adult (as a primary activity) 0.0043
50 030403 3.7147 5.525 Providing medical care to household adult 0.021
51 030404 4.71 5.7405 Obtaining medical and care services for household adult 0.0075
52 030405 4.234 5.476 Waiting associated with caring for household adults 0.006
53 030501 4.3418 5.0822 Helping household adults 0.0088
54 030502 3.9261 5.5183 Organization and planning for household adults 0.0032
55 030503 4.6838 5.0713 Picking up/dropping off household adult 0.0368
56 030504 4.8728 5.4733 Waiting associated with helping household adults 0.0247
57 030599 4.7353 5.1179 Helping household adults, misc. 0.0041
58 040101 5.3144 5.6892 Care for non-household children 0.0835
59 040102 5.632 5.8949 Reading to/with non-household children 0.0091
60 040103 5.7316 5.8642 Playing with non-household children 0.116
61 040105 4.7162 6 Playing sports with non-household children 0.005
62 040106 5.632 5.8326 Talking with/listening to non-household children 0.0251
63 040108 4.6278 5.5581 Organization and planning for non-household children 0.0052
64 040109 5.3345 5.8355 Looking after non-household children (as primary activity) 0.033
65 040110 5.5768 5.7883 Attending non-household children's events 0.0165
66 040111 5.1291 5.322 Waiting for/with non-household children 0.0074
67 040112 5.0798 5.5207 Dropping off/picking up non-household children 0.0691
68 040199 5.5774 5.7106 Caring for and helping non-household children, misc. 0.0054
69 040201 4.8287 5.8439 Homework (non-household children) 0.0077
70 040401 4.5175 5.6303 Care for non-household adults 0.0244
71 040402 3.6183 5.4763 Looking after non-household adult 0.005
72 040403 4.3324 5.7824 Providing medical care to non-household adult 0.0083
73 040404 3.697 5.7815 Obtaining medical and care svcs for non-household adult 0.0028
74 040405 3.8136 5.5421 Waiting associated with caring for non-household adults 0.0045
75 040501 4.7363 5.3113 Hswrk, cooking, and shopping asst, non-household adults 0.0447
76 040502 4.6688 5.368 House and lawn maint and repair asst, non-household adults 0.0436
77 040503 5.3119 4.9995 Animal and pet care assistance for non-household adults 0.0134
78 040504 4.5605 5.2475 Vehicle/appliance maint/repair asst, non-household adults 0.0201
79 040505 4.4638 4.9507 Financial mgmt asst for non-household adults 0.0049
80 040506 4.1688 5.3376 household mgmt and paperwork asst, non-household adults 0.0255
81 040507 4.9319 5.3192 Picking up/dropping off non-household adult 0.1284
82 040508 4.2182 5.2695 Waiting associated with helping non-household adults 0.023
83 040599 4.3443 5.2868 Helping non-household adults, misc. 0.015
84 050101 4.2106 5.0372 Work, main job 3.8671
85 050102 4.2169 5.0135 Work, other job(s) 0.1346
86 050104 4.1585 4.952 Waiting associated with working 0.0258
87 050199 3.502 3.8063 Working, misc. 0.0012
88 050201 4.8683 4.8224 Socializing, relaxing, and leisure as part of job 0.0028
89 050202 4.6143 4.9853 Eating and drinking as part of job 0.0178
90 050301 5.1982 5.486 Income-generating hobbies, crafts, and food 0.0079
91 050303 4.7095 4.9767 Income-generating services 0.0307
92 050304 3.7731 5.3123 Income-generating rental property activities 0.0053
93 050399 4.5872 5.2503 Other income-generating activities, misc. 0.0391
94 050401 3.4136 5.4454 Job search activities 0.1018
95 050403 4.4473 5.6315 Job interviewing 0.0046
96 060101 4.0938 4.9396 Taking class for degree, certification, or lic 0.1708
97 060102 4.8102 5.4599 Taking class for personal interest 0.0199
98 060103 3.7852 5.4278 Waiting associated with taking classes 0.005
99 060201 5.3468 5.7823 Extracurricular club activities 0.0028
100 060202 4.7063 5.0467 Extracurricular music and performance activities 0.0049
101 060299 4.8569 3.7138 Education-related extracurricular activities, misc. 0.0017
102 060301 3.3418 4.9021 Homework for class, for degree 0.2883
103 060302 4.9457 5.6787 Homework for class, for personal interest 0.0067
104 060399 3.0733 4.7988 Research/homework misc. 0.0048
105 060401 5.1 5.8001 Admin activities: class for degree, cert, or lic 0.0048
106 069999 3.8977 5.3269 Education, misc. 0.0103
107 070101 4.3286 4.8367 Grocery shopping 0.5658
108 070102 4.2173 4.872 Purchasing gas 0.0943
109 070103 4.6715 4.8424 Purchasing food (not groceries) 0.3922
110 070104 4.6217 4.9111 Shopping 1.0884
111 070105 3.8775 5.1629 Waiting associated with shopping 0.0118
112 070201 4.6118 4.9319 Comparison shopping 0.0037
113 080101 5.0985 5.5574 Using paid childcare services 0.0073
114 080201 4.2378 4.9952 Banking 0.0579
115 080202 4.6522 5.3043 Using other financial services 0.0055
116 080203 4.5258 5.3144 Waiting associated w/banking/financial services 0.0023
117 080401 3.5839 5.4735 Using health and care services outside the home 0.1335
118 080402 3.5935 4.8952 Using in-home health and care services 0.0068
119 080403 3.3676 5.2215 Waiting associated with medical services 0.031
120 080501 4.8617 5.0354 Using personal care services 0.0583
121 080502 4.809 3.6661 Waiting associated w/personal care services 0.0025
122 080601 3.9619 5.0571 Activities rel. to purchasing/selling real estate 0.0125
123 080701 3.0977 5.7036 Using veterinary services 0.0085
124 080702 4.4371 5.4764 Waiting associated with veterinary services 0.003
125 089999 4.8267 5.1165 Professional and personal services, misc. 0.0083
126 090103 4.9078 5.18 Using clothing repair and cleaning services 0.0066
127 090201 4.0885 5.0779 Using home maint/repair/décor/construction svcs 0.0121
128 090202 4.866 5.2007 Wtg assoc w/ home main/repair/décor/constr 0.0058
129 090301 4.139 4.4996 Using pet services 0.0043
130 090401 5.0353 5.5002 Using lawn and garden services 0.0034
131 090501 3.5476 4.8717 Using vehicle maintenance or repair services 0.021
132 090502 4.4548 4.9964 Waiting assoc with vehicle main. or repair svcs 0.0087
133 100102 4.036 5.3569 Using social services 0.0034
134 100103 3.6129 5.5428 Obtaining licenses and paying fines, fees, taxes 0.0071
135 100201 3.8247 5.8242 Civic obligations and participation 0.0055
136 100304 4.2609 4.9115 Waiting associated with using government services 0.0028
137 110101 4.8524 5.1731 Eating and drinking 10
138 110201 4.6021 4.9123 Waiting associated w/eating and drinking 0.0332
139 120101 5.0809 5.424 Socializing and communicating 2.5822
140 120201 5.4271 5.486 Attending or hosting parties/receptions/ceremonies 0.164
141 120202 4.4307 5.3018 Attending meetings for personal interest (not volunteering) 0.0262
142 120301 4.6856 5.1863 Relaxing, thinking 1.0886
143 120302 4.5497 5.0903 Tobacco and drug use 0.0602
144 120303 4.634 4.7545 Television and movies 5.058
145 120304 4.6446 5.4465 Television (religious) 0.0193
146 120305 4.5594 5.1203 Listening to the radio 0.0842
147 120306 4.9839 5.1187 Listening to/playing music 0.112
148 120307 4.9215 4.6528 Playing games 0.4886
149 120308 4.274 4.4493 Computer use for leisure (exc. Games) 0.5267
150 120309 4.9311 5.2819 Arts and crafts as a hobby 0.0832
151 120311 4.9605 5.5621 Hobbies, except arts and crafts and collecting 0.0094
152 120312 4.5865 4.8958 Reading for personal interest 1.1138
153 120313 4.8226 5.2921 Writing for personal interest 0.0148
154 120399 5.3157 5.4208 Relaxing and leisure, misc. 0.0091
155 120401 5.2838 5.2415 Attending performing arts 0.0313
156 120402 5.2915 5.4177 Attending museums 0.019
157 120403 5.1679 5.0339 Attending movies/film 0.0597
158 120404 4.9542 4.7208 Attending gambling establishments 0.0142
159 120499 5.3123 5.3884 Arts and entertainment, misc. 0.0612
160 120504 5.3712 5.571 Waiting associated with arts and entertainment 0.0042
161 130101 5.1623 5.4596 Doing aerobics 0.0089
162 130102 5.2133 4.9253 Playing baseball 0.0034
163 130103 5.3224 5.1499 Playing basketball 0.0297
164 130104 5.3086 5.3288 Biking 0.0459
165 130105 5.1553 4.7978 Playing billiards 0.0084
166 130106 5.5945 5.2725 Boating 0.0158
167 130107 4.257 4.9967 Bowling 0.0098
168 130109 5.2666 5.6163 Dancing 0.0144
169 130110 4.1328 5.5767 Participating in equestrian sports 0.0054
170 130112 5.1375 5.3017 Fishing 0.0328
171 130113 5.1277 4.4822 Playing football 0.0075
172 130114 5.1526 5.1615 Golfing 0.0337
173 130116 5.3033 5.4277 Hiking 0.0162
174 130117 4.9474 5.6306 Playing hockey 0.0046
175 130118 4.6138 5.5714 Hunting 0.0177
176 130119 5 5.878 Participating in martial arts 0.0049
177 130120 5.2921 5.1088 Playing racquet sports 0.0087
178 130122 5.2786 4.8898 Rollerblading 0.0065
179 130124 4.8552 5.4258 Running 0.0721
180 130125 5.7289 5.2832 Skiing, ice skating, snowboarding 0.0084
181 130126 5.3031 5.3535 Playing soccer 0.0116
182 130127 4.7308 5.2851 Playing softball 0.0067
183 130128 4.4901 5.4879 Using cardiovascular equipment 0.0678
184 130129 5.8696 5.5908 Vehicle touring/racing 0.0065
185 130130 5.8128 5.4136 Playing volleyball 0.0058
186 130131 4.9928 5.4046 Walking 0.3685
187 130132 5.4465 5.4959 Participating in water sports 0.0895
188 130133 4.8286 5.4693 Weightlifting/strength training 0.0689
189 130134 4.6372 5.3806 Working out, unspecified 0.2212
190 130136 4.567 5.4904 Doing yoga 0.0186
191 130199 5.1362 5.4151 Playing sports misc. 0.0416
192 130202 4.9877 5.1101 Watching baseball 0.0108
193 130203 5.5753 5.0357 Watching basketball 0.0063
194 130213 5.238 5.4997 Watching football 0.0096
195 130216 4.6272 5.2029 Watching hockey 0.0071
196 130218 4.8914 4.4692 Watching racquet sports 0.0023
197 130224 5.5379 5.3283 Watching soccer 0.0081
198 130227 5.499 4.9985 Watching volleyball 0.0022
199 130299 4.818 5.182 Attending sporting events, misc. 0.0053
200 140101 5.1801 5.7656 Attending religious services 0.5128
201 140102 5.1242 5.8226 Participation in religious practices 0.3447
202 140103 5.3894 5.4142 Waiting assoc w/religious and spiritual activities 0.0098
203 140105 5.294 5.8076 Religious education activities 0.0787
204 149999 5.4999 6 Religious and spiritual activities, misc. 0.0029
205 150101 4.3872 5.1186 Computer use 0.0465
206 150102 4.892 5.3698 Organizing and preparing 0.0538
207 150103 5.1465 5.8767 Reading 0.0049
208 150104 3.9379 5.2894 Telephone calls (except hotline counseling) 0.0174
209 150105 5.0888 4.8161 Writing 0.0026
210 150106 5.5408 5.6845 Fundraising 0.0133
211 150199 5.2515 5.4781 Administrative and support activities, misc. 0.0196
212 150201 5.0504 5.6601 Food preparation, presentation, clean-up 0.036
213 150202 4.4875 5.4283 Collecting and delivering clothing and other goods 0.0101
214 150203 5.1426 5.5682 Providing care 0.0195
215 150204 5.2749 5.6544 Teaching, leading, counseling, mentoring 0.0525
216 150299 4.7265 5.6233 Social service and care activities, misc. 0.0093
217 150302 4.833 5.3045 Indoor and outdoor maintenance, repair, and clean-up 0.0173
218 150401 5.2987 5.6969 Performing 0.0265
219 150402 5.037 5.5589 Serving at volunteer events and cultural activities 0.0194
220 150501 4.5845 5.3972 Attending meetings, conferences, and training 0.0507
221 150701 4.5999 5.2999 Waiting associated with volunteer activities 0.0024
222 159999 5.2785 5.6518 Volunteer activities, misc. 0.1119
223 160101 4.7783 5.5471 Telephone calls to/from family members 0.3752
224 160102 4.795 5.1776 Phone calls to/from friends, neighbors 0.2003
225 160103 2.2221 5.5185 Telephone calls to/from education svcs providers 0.0032
226 160104 3.4873 5.4081 Telephone calls to/from salespeople 0.0059
227 160105 2.6467 4.8562 Phone calls to/from prof, personal svcs providers 0.0167
228 160106 2.1017 5.3628 Phone calls to/from household services providers 0.0106
229 160108 3.7003 5.8925 Telephone calls to/from government officials 0.0056
230 160199 4.5566 5.211 Telephone calls (to or from), misc. 0.1438
231 180101 4.674 5.1188 Travel for personal care 0.0959
232 180201 4.4686 5.0219 Travel for housework 0.0524
233 180202 4.8177 5.1817 Travel for food and drink prep 0.0526
234 180203 4.4063 5.4387 Travel for int. maint, repair, and decoration 0.0109
235 180204 4.6292 4.7371 Travel for ext. maint, repair, and decoration 0.0055
236 180205 4.7036 5.5364 Travel for lawn, garden, and houseplants 0.013
237 180206 4.7082 5.0638 Travel for care for animals (not vet care) 0.0486
238 180207 5.0427 5.0209 Travel for vehicle care and maint (by self) 0.0223
239 180208 5.8333 6 Travel for tool, repair, and maintenance 0.0043
240 180209 4.6447 5.0846 Travel for household management 0.2689
241 180302 4.797 5.2995 Travel for caring for and helping household children 0.859
242 180303 4.2 5.0188 Travel for household children's education 0.0126
243 180304 4.1476 5.2791 Travel for household children's health 0.0163
244 180305 3.8614 5.8019 Travel for caring for household adults 0.0206
245 180306 4.5551 5.1211 Travel for helping household adults 0.1177
246 180402 4.8915 5.2767 Travel for helping non-household kids 0.1991
247 180404 3.6108 5.3335 Travel for non-household children's health 0.0043
248 180405 4.352 5.2076 Travel for caring for non-household adults 0.015
249 180406 4.8412 5.1668 Travel for helping non-household adults 0.4152
250 180501 4.433 4.9649 Travel for working 2.2379
251 180502 3.9999 4.9312 Travel for work-related activities 0.007
252 180503 4.5506 5.4222 Travel for income-generating activities 0.0318
253 180504 3.8844 5.2982 Travel for job search and interviewing 0.0322
254 180601 4.2031 4.8203 Travel for taking class 0.125
255 180602 4.9581 4.6657 Travel for extracurricular activities (ex. Sports) 0.0058
256 180603 4.4433 4.6157 Travel for research/homework 0.0171
257 180604 4.1596 4.7597 Travel for registration/admin activities 0.003
258 180701 4.596 4.8843 Traveling to/from the grocery store 0.8789
259 180703 4.7388 4.952 Travel for purchasing food (not groceries) 0.5882
260 180704 4.6983 5.0044 Travel for shopping, not groceries 1.433
261 180705 4.5856 5.0456 Traveling to/from gas station 0.1591
262 180801 4.8568 6 Travel for using childcare services 0.005
263 180802 4.3214 5.0572 Travel for using financial svcs and banking 0.0787
264 180804 3.6482 5.3131 Travel for using medical services 0.1596
265 180805 4.8084 4.9991 Travel for using personal care services 0.057
266 180806 4.1981 4.8519 Travel for using real estate services 0.0163
267 180807 3.4253 5.2574 Travel for using veterinary services 0.013
268 180899 5.0215 4.9994 Travel rel. to using prof, personal care svcs misc. 0.0055
269 180901 4.4148 5.1697 Travel for using household services 0.0113
270 180902 3.6941 5.7827 Travel for home maintenance 0.0028
271 180903 4.5553 4.2484 Travel for using pet services (not vet) 0.0086
272 180905 4.3643 5.0414 Travel for vehicle maintenance 0.0455
273 181001 4.543 5.2496 Travel for using government services 0.0124
274 181002 4.9754 5.6815 Travel for civic obligations and participation 0.0049
275 181101 4.9796 5.0953 Travel for eating and drinking 1.4294
276 181201 4.8021 5.1563 Travel for socializing 1.1308
277 181202 5.1019 5.1226 Trvl related to attending or hosting social events 0.1871
278 181204 5.0067 5.073 Travel for arts and entertainment 0.1724
279 181205 5.1206 5.0307 Travel as a form of entertainment 0.0582
280 181206 4.7928 5.0097 Travel for relaxing and leisure 0.3648
281 181301 4.8777 5.071 Travel for sports, exercise, or recreation 0.5078
282 181302 4.8429 5.0556 Travel for attending sporting events 0.0643
283 181401 5.0299 5.5472 Travel for religious practices 0.5638
284 181501 4.8462 5.2251 Travel for volunteering 0.2669
285 181599 5.0713 5.285 Travel for volunteer activities, misc. 0.0084
286 181601 4.356 4.9264 Travel for phone calls 0.0229
287 181801 4.7595 4.3052 Security procedures related to traveling 0.009
288 189999 4.6894 5.1014 Traveling, misc. 0.2231
289 500101 4.5424 5.223 Insufficient detail in verbatim 0.5265
290 500103 4.907 5.2302 Missing travel or destination 0.0964
291 500104 4.4997 5.2727 Recorded simultaneous activities incorrectly 0.0315
292 500107 4.6635 5.3266 Unable to code activity at 1st tier 0.0125
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Activities, Happiness, and Meaning</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
</head>
<div id="main-wrapper">
<h1>Meaningfulness with Happiness</h1>
<div id="chart"></div>
</div>
<script src="js/d3.v7.min.js"></script>
<script src="js/bubbleplot.js"></script>
@@ -0,0 +1,139 @@
// Dimensions of chart.
let margin = { top: 20, right: 30, bottom: 50, left: 55 },
// width = parseInt(d3.select('#chart').style('width'), 10) - margin.left - margin.right,
width = 600 - margin.left - margin.right,
// height = width/.8 - margin.top - margin.bottom;
height = width - margin.top - margin.bottom;
let svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Scales: x and y and r
let x = d3.scaleLinear()
// .domain([3, 6])
.domain([4, 6])
.range([0, width]);
let y = d3.scaleLinear()
// .domain([2, 6])
.domain([3, 6])
.range([height, 0]);
let r = d3.scaleSqrt()
.domain([0, 10])
.range([0, 25]);
// Point color
let ptcolor = "#5a8171";
// x-axis
let xAxis = d3.axisBottom(x)
// .ticks(7)
.ticks(4)
.tickSize(-height-8)
.tickPadding(5);
let xAxisEl = svg.append("g")
.attr("class", "x axis bottom")
.attr("transform", "translate(0,"+(height+8)+")");
xAxisEl.append("text")
.attr("class", "axistitle")
.attr("text-anchor", "start")
.attr("x", 0).attr("y", 0)
// .attr("dx", "-.25em")
.attr("dx", "-.8em")
.attr("dy", "2.5em")
.text("Meaningfulness Score Average");
xAxisEl.call(xAxis);
// y-axis
let yAxis = d3.axisLeft(y)
// .ticks(7)
.ticks(5)
.tickSize(-width-8)
.tickPadding(5);
let yAxisEl = svg.append("g")
.attr("class", "y axis left")
.attr("transform", "translate("+(-8)+",0)");
yAxisEl.append("text")
.attr("class", "axistitle")
.attr("x", 0).attr("y", 0)
.attr("dx", "4px")
// .attr("dy", "-2em")
.attr("dy", "-3em")
.style("text-anchor", "end")
.attr("transform", "rotate(-90)")
.text("Happiness Score Average");
yAxisEl.call(yAxis);
let activities;
let circle, labeltext;
// Load data
const activitiesData = Promise.all([
d3.tsv("data/act_means.tsv", d3.autoType)
]);
activitiesData.then(function(data) {
activities = data[0].sort((a, b) => b.relwt - a.relwt);
console.log(activities);
// Initialize chart now that data is loaded.
initChart();
});
function initChart() {
// Circle for each node.
circle = svg.append("g")
.selectAll("circle")
.data(activities)
.join("circle")
.attr("id", d => "circle"+d.activity)
.attr("cx", d => x(d.meaning_mean))
.attr("cy", d => y(d.schappy_mean))
.attr("fill", ptcolor)
.attr("fill-opacity", .75)
.attr("r", d => r(d.relwt))
.attr("stroke", "#fff")
.attr("stroke-width", ".5px");
setInteraction();
}
function setInteraction() {
// Create label
labeltext = svg.append("text")
.attr("text-anchor", "middle");
// Hover events
circle.on("mouseover", function(e,d) {
d3.selectAll(".current").classed("current", false);
d3.select(this).classed("current", true);
let curract = d3.select(this).datum();
labeltext.text(curract.descrip)
.attr("x", x(curract.meaning_mean))
.attr("y", y(curract.schappy_mean)-r(curract.relwt)-5);
})
// .on("mousemove", function(e,d) {
// d3.select(this).classed("current", true);
// })
.on('mouseout', function(d) {
d3.select(this).classed('current', false);
labeltext.text('');
}); // @end mouseover
}
@@ -0,0 +1,2 @@
// https://d3js.org v7.4.0 Copyright 2010-2022 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t,i=t;function o(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<0?e=r+1:o=r}while(e<o)}return e}return 2!==t.length&&(e=(n,e)=>t(n)-e,r=n,i=(e,r)=>n(t(e),r)),{left:o,center:function(t,n,r=0,i=t.length){const a=o(t,n,r,i-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<=0?e=r+1:o=r}while(e<o)}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;var c=o;function f(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function s(t){return 0|t.length}function l(t){return!(t>0)}function h(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function d(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function p(t,n){const e=d(t,n);return e?Math.sqrt(e):e}function g(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class y{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(v(this,t))}has(t){return super.has(v(this,t))}set(t,n){return super.set(_(this,t),n)}delete(t){return super.delete(b(this,t))}}class InternSet extends Set{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(v(this,t))}add(t){return super.add(_(this,t))}delete(t){return super.delete(b(this,t))}}function v({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function _({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function b({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function m(t){return null!==t&&"object"==typeof t?t.valueOf():t}function x(t){return t}function w(t,...n){return k(t,x,x,n)}function M(t,...n){return k(t,Array.from,x,n)}function A(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function T(t,n,...e){return k(t,x,n,e)}function S(t,n,...e){return k(t,Array.from,n,e)}function E(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function k(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function N(t,n){return Array.from(n,(n=>t[n]))}function C(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=z(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>z(e[t],e[n])))),N(t,r)}return t.sort(P(e))}function P(t=n){if(t===n)return z;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function z(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var D=Array.prototype.slice;function R(t){return()=>t}var F=Math.sqrt(50),q=Math.sqrt(10),O=Math.sqrt(2);function U(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=I(t,n,e))||!isFinite(a))return[];if(a>0){let e=Math.round(t/a),r=Math.round(n/a);for(e*a<t&&++e,r*a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)*a}else{a=-a;let e=Math.round(t*a),r=Math.round(n*a);for(e/a<t&&++e,r/a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)/a}return r&&o.reverse(),o}function I(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=F?10:o>=q?5:o>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=F?10:o>=q?5:o>=O?2:1)}funLine truncated
@@ -0,0 +1,77 @@
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* Main layout
============================ */
#main-wrapper {
width: 600px;
margin: 40px auto;
font-family: Georgia, serif;
}
h1 {
font-family: Georgia, serif;
font-size: 1.45em;
text-align: center;
}
/* Chart
============================ */
#chart {
position: relative;
margin: 0 auto;
}
.axis text {
font-family: "Courier New", Courier, monospace;
font-size: .8rem;
}
.axis .axistitle {
text-transform: uppercase;
fill: #333;
font-size: .8rem;
}
.axis path,
.axis line {
fill: none;
stroke: #ccc;
stroke-width: 1px;
shape-rendering: crispEdges;
}
.x.axis path, .y.axis path {
display: none;
}
/* Interaction
============================ */
circle.current {
stroke: #000;
stroke-width: 3px;
}
@@ -0,0 +1,110 @@
Year,Beef,Chicken
1909,51.1,10.4
1910,48.5,11.0
1911,47.2,11.1
1912,44.5,10.6
1913,43.6,10.3
1914,42.7,10.3
1915,38.8,10.2
1916,40.6,9.6
1917,44.6,9.4
1918,47.2,9.4
1919,42.4,10.1
1920,40.7,9.7
1921,38.2,9.5
1922,40.7,10.1
1923,41.1,10.4
1924,41.0,9.7
1925,41.0,10.1
1926,41.5,10.1
1927,37.5,10.8
1928,33.6,10.4
1929,34.2,10.1
1930,33.7,11.1
1931,33.4,10.0
1932,32.1,10.2
1933,35.5,10.4
1934,43.9,9.6
1935,36.6,9.3
1936,41.6,9.6
1937,38.0,9.7
1938,37.4,9.0
1939,37.6,10.0
1940,37.8,10.0
1941,42.6,11.0
1942,45.9,12.7
1943,43.0,16.0
1944,46.6,15.3
1945,48.0,15.1
1946,44.2,13.9
1947,49.2,12.5
1948,44.2,12.6
1949,44.7,13.5
1950,44.6,14.3
1951,41.2,15.0
1952,43.9,15.2
1953,54.5,15.1
1954,56.0,15.6
1955,57.2,14.7
1956,59.5,16.8
1957,58.7,17.5
1958,55.9,19.2
1959,56.6,19.7
1960,59.1,19.1
1961,61.0,20.5
1962,61.7,20.5
1963,65.4,21.0
1964,70.6,21.3
1965,70.4,22.8
1966,73.7,24.5
1967,75.3,25.1
1968,77.3,25.2
1969,77.8,26.3
1970,79.8,27.4
1971,79.2,27.4
1972,80.5,28.3
1973,76.0,27.1
1974,80.7,27.0
1975,83.2,26.4
1976,88.8,28.5
1977,86.3,29.0
1978,82.2,30.4
1979,73.5,32.8
1980,72.1,32.7
1981,72.8,33.7
1982,72.5,33.9
1983,74.1,34.0
1984,73.8,35.3
1985,74.6,36.4
1986,74.4,37.2
1987,69.5,39.4
1988,68.6,39.6
1989,65.1,40.5
1990,63.9,42.5
1991,62.9,44.2
1992,62.4,46.5
1993,61.0,48.1
1994,62.9,48.7
1995,63.5,48.2
1996,64.0,48.6
1997,62.6,50.0
1998,63.6,50.4
1999,64.3,53.6
2000,64.5,54.2
2001,63.1,54.0
2002,64.5,56.8
2003,61.9,57.6
2004,63.0,59.3
2005,62.5,60.5
2006,62.8,60.9
2007,62.1,59.9
2008,59.4,58.7
2009,58.1,56.1
2010,56.7,58.0
2011,54.4,58.4
2012,54.5,56.7
2013,53.6,57.7
2014,51.5,58.8
2015,51.4,62.6
2016,52.9,63.2
2017,54.3,64.1
1 Year Beef Chicken
2 1909 51.1 10.4
3 1910 48.5 11.0
4 1911 47.2 11.1
5 1912 44.5 10.6
6 1913 43.6 10.3
7 1914 42.7 10.3
8 1915 38.8 10.2
9 1916 40.6 9.6
10 1917 44.6 9.4
11 1918 47.2 9.4
12 1919 42.4 10.1
13 1920 40.7 9.7
14 1921 38.2 9.5
15 1922 40.7 10.1
16 1923 41.1 10.4
17 1924 41.0 9.7
18 1925 41.0 10.1
19 1926 41.5 10.1
20 1927 37.5 10.8
21 1928 33.6 10.4
22 1929 34.2 10.1
23 1930 33.7 11.1
24 1931 33.4 10.0
25 1932 32.1 10.2
26 1933 35.5 10.4
27 1934 43.9 9.6
28 1935 36.6 9.3
29 1936 41.6 9.6
30 1937 38.0 9.7
31 1938 37.4 9.0
32 1939 37.6 10.0
33 1940 37.8 10.0
34 1941 42.6 11.0
35 1942 45.9 12.7
36 1943 43.0 16.0
37 1944 46.6 15.3
38 1945 48.0 15.1
39 1946 44.2 13.9
40 1947 49.2 12.5
41 1948 44.2 12.6
42 1949 44.7 13.5
43 1950 44.6 14.3
44 1951 41.2 15.0
45 1952 43.9 15.2
46 1953 54.5 15.1
47 1954 56.0 15.6
48 1955 57.2 14.7
49 1956 59.5 16.8
50 1957 58.7 17.5
51 1958 55.9 19.2
52 1959 56.6 19.7
53 1960 59.1 19.1
54 1961 61.0 20.5
55 1962 61.7 20.5
56 1963 65.4 21.0
57 1964 70.6 21.3
58 1965 70.4 22.8
59 1966 73.7 24.5
60 1967 75.3 25.1
61 1968 77.3 25.2
62 1969 77.8 26.3
63 1970 79.8 27.4
64 1971 79.2 27.4
65 1972 80.5 28.3
66 1973 76.0 27.1
67 1974 80.7 27.0
68 1975 83.2 26.4
69 1976 88.8 28.5
70 1977 86.3 29.0
71 1978 82.2 30.4
72 1979 73.5 32.8
73 1980 72.1 32.7
74 1981 72.8 33.7
75 1982 72.5 33.9
76 1983 74.1 34.0
77 1984 73.8 35.3
78 1985 74.6 36.4
79 1986 74.4 37.2
80 1987 69.5 39.4
81 1988 68.6 39.6
82 1989 65.1 40.5
83 1990 63.9 42.5
84 1991 62.9 44.2
85 1992 62.4 46.5
86 1993 61.0 48.1
87 1994 62.9 48.7
88 1995 63.5 48.2
89 1996 64.0 48.6
90 1997 62.6 50.0
91 1998 63.6 50.4
92 1999 64.3 53.6
93 2000 64.5 54.2
94 2001 63.1 54.0
95 2002 64.5 56.8
96 2003 61.9 57.6
97 2004 63.0 59.3
98 2005 62.5 60.5
99 2006 62.8 60.9
100 2007 62.1 59.9
101 2008 59.4 58.7
102 2009 58.1 56.1
103 2010 56.7 58.0
104 2011 54.4 58.4
105 2012 54.5 56.7
106 2013 53.6 57.7
107 2014 51.5 58.8
108 2015 51.4 62.6
109 2016 52.9 63.2
110 2017 54.3 64.1
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Beef vs. Chicken</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
</head>
<div id="main-wrapper">
<h1>Beef vs. Chicken</h1>
<div id="chart"></div>
</div>
<script src="js/d3.v7.min.js"></script>
<script src="js/differencechart.js"></script>
@@ -0,0 +1,2 @@
// https://d3js.org v7.4.0 Copyright 2010-2022 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t,i=t;function o(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<0?e=r+1:o=r}while(e<o)}return e}return 2!==t.length&&(e=(n,e)=>t(n)-e,r=n,i=(e,r)=>n(t(e),r)),{left:o,center:function(t,n,r=0,i=t.length){const a=o(t,n,r,i-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<=0?e=r+1:o=r}while(e<o)}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;var c=o;function f(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function s(t){return 0|t.length}function l(t){return!(t>0)}function h(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function d(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function p(t,n){const e=d(t,n);return e?Math.sqrt(e):e}function g(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class y{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(v(this,t))}has(t){return super.has(v(this,t))}set(t,n){return super.set(_(this,t),n)}delete(t){return super.delete(b(this,t))}}class InternSet extends Set{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(v(this,t))}add(t){return super.add(_(this,t))}delete(t){return super.delete(b(this,t))}}function v({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function _({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function b({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function m(t){return null!==t&&"object"==typeof t?t.valueOf():t}function x(t){return t}function w(t,...n){return k(t,x,x,n)}function M(t,...n){return k(t,Array.from,x,n)}function A(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function T(t,n,...e){return k(t,x,n,e)}function S(t,n,...e){return k(t,Array.from,n,e)}function E(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function k(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function N(t,n){return Array.from(n,(n=>t[n]))}function C(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=z(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>z(e[t],e[n])))),N(t,r)}return t.sort(P(e))}function P(t=n){if(t===n)return z;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function z(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var D=Array.prototype.slice;function R(t){return()=>t}var F=Math.sqrt(50),q=Math.sqrt(10),O=Math.sqrt(2);function U(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=I(t,n,e))||!isFinite(a))return[];if(a>0){let e=Math.round(t/a),r=Math.round(n/a);for(e*a<t&&++e,r*a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)*a}else{a=-a;let e=Math.round(t*a),r=Math.round(n*a);for(e/a<t&&++e,r/a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)/a}return r&&o.reverse(),o}function I(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=F?10:o>=q?5:o>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=F?10:o>=q?5:o>=O?2:1)}funLine truncated
@@ -0,0 +1,156 @@
// Dimensions of chart.
let margin = { top: 30, right: 10, bottom: 30, left: 45 },
// width = parseInt(d3.select('#chart').style('width'), 10) - margin.left - margin.right,
width = 600 - margin.left - margin.right,
height = width*.8 - margin.top - margin.bottom;
let svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Scales: x and y
let x = d3.scaleLinear()
.domain([1909, 2017])
.range([0, width]);
let y = d3.scaleLinear()
.domain([0, 100])
.range([height, 0]);
// Geometries
let area = d3.area()
.x(d => x(d.year))
.y1(d => y(d.amt));
let line = d3.line()
.x(d => x(d.year))
.y(d => y(d.amt));
let xAxis, yAxis, xAxisEl, yAxisEL;
let meats, beef, chicken;
// Load data
const meatData = Promise.all([
d3.csv("data/beef-vs-chicken-difference.csv", d3.autoType)
]);
meatData.then(function(data) {
meats = data[0];
console.log(meats);
svg.datum(meats);
// Initialize chart now that data is loaded.
initChart();
});
function initChart() {
// x-axis
xAxis = d3.axisBottom(x)
.ticks(4)
.tickFormat(d => d)
.tickSize(-height-8)
.tickPadding(5);
xAxisEl = svg.append("g")
.attr("class", "x axis bottom")
.attr("transform", "translate(0,"+(height+8)+")");
xAxisEl.call(xAxis);
// y-axis
yAxis = d3.axisLeft(y)
// .ticks(7)
.ticks(5)
.tickSize(-width-8)
.tickPadding(5);
yAxisEl = svg.append("g")
.attr("class", "y axis left")
.attr("transform", "translate("+(-8)+",0)");
yAxisEl.append("text")
.attr("class", "axistitle")
.attr("x", 0).attr("y", 0)
.attr("dx", "-2.25em")
.attr("dy", "-1.5em")
.style("text-anchor", "start")
.text("Pounds per capita");
yAxisEl.call(yAxis);
// Area clipping paths
svg.append("clipPath")
.attr("id", "clip-above")
.append("path")
.attr("d", d3.area()
.x(d => x(d.Year))
.y0(0)
.y1(d => y(d.Chicken)));
svg.append("clipPath")
.attr("id", "clip-below")
.append("path")
.attr("d", d3.area()
.x(d => x(d.Year))
.y0(height)
.y1(d => y(d.Chicken)));
// Area differences
svg.append("path")
.attr("class", "area above")
.attr("clip-path", "url(#clip-above)")
.attr("fill", "#fdad94")
.attr("d", d3.area()
.x(d => x(d.Year)).y0(height).y1(d => y(d.Beef)));
svg.append("path")
.attr("class", "area below")
.attr("fill", "#f9e59f")
.attr("clip-path", "url(#clip-below)")
.attr("d", d3.area()
.x(d => x(d.Year)).y0(0).y1(d => y(d.Beef)));
// Lines
svg.append("path")
.attr("class", "line chicken")
.attr("fill", "none")
.attr("stroke", "#bf980d")
.attr("stroke-width", "2px")
.attr("d", d3.line()
.x(d => x(d.Year))
.y(d => y(d.Chicken)));
svg.append("path")
.attr("class", "line beef")
.attr("fill", "none")
.attr("stroke", "#fb470e")
.attr("stroke-width", "2px")
.attr("d", d3.line()
.x(d => x(d.Year))
.y(d => y(d.Beef)));
setAnnotation();
}
function setAnnotation() {
svg.append("text")
.attr("class", "mainlab")
.attr("fill", "#fb470e")
.attr("x", x(1962))
.attr("y", y(40))
.text("BEEF");
svg.append("text")
.attr("text-anchor", "end")
.attr("class", "mainlab")
.attr("fill", "#bf980d")
.attr("x", x(2017))
.attr("y", y(65))
.text("CHICKEN");
}
@@ -0,0 +1,69 @@
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* Main layout
============================ */
#main-wrapper {
width: 600px;
margin: 40px auto;
}
h1 {
font-family: Georgia, serif;
font-size: 1.45em;
text-align: center;
}
/* Chart
============================ */
#chart {
position: relative;
margin: 0 auto;
}
text {
font-family: "Courier New", Courier, monospace;
font-size: .8rem;
}
text.mainlab {
font-weight: bold;
}
.axis .axistitle {
text-transform: uppercase;
fill: #333;
font-size: .8rem;
}
.axis path,
.axis line {
fill: none;
stroke: #ccc;
stroke-width: 1px;
shape-rendering: crispEdges;
}
.x.axis path, .y.axis path {
display: none;
}
@@ -0,0 +1,292 @@
"activity" "schappy_mean" "meaning_mean" "descrip" "relwt"
"010301" 3.65 5.2875 "Health-related self care" 0.3437
"010399" 0.4441 4.332 "Self care, misc." 0.0022
"020101" 4.3016 5.0383 "Interior cleaning" 1.362
"020102" 4.1979 4.866 "Laundry" 0.806
"020103" 4.8934 5.4284 "Sewing, repairing, and maintaining textiles" 0.076
"020104" 4.5711 4.8468 "Storing interior household items, inc. food" 0.2002
"020201" 4.6729 5.1604 "Food and drink prep." 3.8685
"020202" 4.9016 5.5208 "Food presentation" 0.0659
"020203" 4.3252 4.9249 "Kitchen and food clean-up" 0.9425
"020301" 4.5569 5.2724 "Interior arrangement, decoration, and repairs" 0.1527
"020302" 4.7587 4.8901 "Building and repairing furniture" 0.0073
"020303" 4.2926 5.29 "Heating and cooling" 0.0446
"020401" 4.1507 5.0967 "Exterior cleaning" 0.1179
"020402" 4.8953 5.3774 "Exterior repair, improvements, and decoration" 0.0696
"020501" 4.6695 5.2066 "Lawn, garden, and houseplant care" 0.6958
"020502" 4.0334 5.083 "Ponds, pools, and hot tubs" 0.0143
"020602" 4.591 5.3077 "Care for animals and pets" 0.6464
"020603" 4.9233 5.2797 "Walking, exercising, playing with animals" 0.4182
"020699" 4.4816 4.6297 "Pet and animal care, misc." 0.0032
"020701" 4.3308 5.1412 "Vehicle repair and maintenance (by self)" 0.14
"020801" 4.3562 5.1824 "App, tool, toy set-up, repair, and maint (by self)" 0.0589
"020901" 3.715 4.999 "Financial management" 0.1445
"020902" 4.386 4.9614 "Household and personal organization" 0.6869
"020903" 4.3574 4.8634 "Household and personal mail and messages (except e-mail)" 0.1483
"020904" 4.1977 4.3381 "Household and personal e-mail and messages" 0.2182
"020905" 4.0463 4.9778 "Home security" 0.023
"029999" 4.4219 4.895 "Household activities, misc." 0.0023
"030101" 4.8037 5.4819 "Care for household children" 1.7066
"030102" 5.3559 5.7285 "Reading to/with household children" 0.1706
"030103" 5.5047 5.7429 "Playing with household children" 0.5338
"030104" 5.4589 5.6239 "Arts and crafts with household children" 0.0131
"030105" 5.3366 5.712 "Playing sports with household children" 0.0246
"030106" 4.997 5.5712 "Talking with/listening to household children" 0.1503
"030108" 4.4771 5.0912 "Organization for household children" 0.0445
"030109" 5.0333 5.5065 "Looking after household children" 0.1501
"030110" 5.0778 5.615 "Attending household children's events" 0.0925
"030111" 4.7433 5.3825 "Waiting for/with household children" 0.0482
"030112" 4.7327 5.3525 "Picking up/dropping off household children" 0.3373
"030199" 5.0626 5.4164 "Caring for and helping household children, misc." 0.0058
"030201" 4.5065 5.5892 "Homework (household children)" 0.1711
"030202" 4.062 5.6243 "Meetings and school conferences (household children)" 0.0058
"030203" 5.0198 5.808 "Home schooling of household children" 0.0062
"030299" 3.4516 5.3227 "Activities related to household child's education, misc." 0.0037
"030301" 3.2966 5.5604 "Providing medical care to household children" 0.0218
"030302" 3.484 5.545 "Obtaining medical care for household children" 0.0127
"030303" 2.7979 5.6905 "Waiting associated with household children's health" 0.0101
"030401" 4.3313 5.5832 "Care for household adults" 0.0634
"030402" 4.6669 5.0003 "Looking after household adult (as a primary activity)" 0.0043
"030403" 3.7147 5.525 "Providing medical care to household adult" 0.021
"030404" 4.71 5.7405 "Obtaining medical and care services for household adult" 0.0075
"030405" 4.234 5.476 "Waiting associated with caring for household adults" 0.006
"030501" 4.3418 5.0822 "Helping household adults" 0.0088
"030502" 3.9261 5.5183 "Organization and planning for household adults" 0.0032
"030503" 4.6838 5.0713 "Picking up/dropping off household adult" 0.0368
"030504" 4.8728 5.4733 "Waiting associated with helping household adults" 0.0247
"030599" 4.7353 5.1179 "Helping household adults, misc." 0.0041
"040101" 5.3144 5.6892 "Care for non-household children" 0.0835
"040102" 5.632 5.8949 "Reading to/with non-household children" 0.0091
"040103" 5.7316 5.8642 "Playing with non-household children" 0.116
"040105" 4.7162 6 "Playing sports with non-household children" 0.005
"040106" 5.632 5.8326 "Talking with/listening to non-household children" 0.0251
"040108" 4.6278 5.5581 "Organization and planning for non-household children" 0.0052
"040109" 5.3345 5.8355 "Looking after non-household children (as primary activity)" 0.033
"040110" 5.5768 5.7883 "Attending non-household children's events" 0.0165
"040111" 5.1291 5.322 "Waiting for/with non-household children" 0.0074
"040112" 5.0798 5.5207 "Dropping off/picking up non-household children" 0.0691
"040199" 5.5774 5.7106 "Caring for and helping non-household children, misc." 0.0054
"040201" 4.8287 5.8439 "Homework (non-household children)" 0.0077
"040401" 4.5175 5.6303 "Care for non-household adults" 0.0244
"040402" 3.6183 5.4763 "Looking after non-household adult" 0.005
"040403" 4.3324 5.7824 "Providing medical care to non-household adult" 0.0083
"040404" 3.697 5.7815 "Obtaining medical and care svcs for non-household adult" 0.0028
"040405" 3.8136 5.5421 "Waiting associated with caring for non-household adults" 0.0045
"040501" 4.7363 5.3113 "Hswrk, cooking, and shopping asst, non-household adults" 0.0447
"040502" 4.6688 5.368 "House and lawn maint and repair asst, non-household adults" 0.0436
"040503" 5.3119 4.9995 "Animal and pet care assistance for non-household adults" 0.0134
"040504" 4.5605 5.2475 "Vehicle/appliance maint/repair asst, non-household adults" 0.0201
"040505" 4.4638 4.9507 "Financial mgmt asst for non-household adults" 0.0049
"040506" 4.1688 5.3376 "household mgmt and paperwork asst, non-household adults" 0.0255
"040507" 4.9319 5.3192 "Picking up/dropping off non-household adult" 0.1284
"040508" 4.2182 5.2695 "Waiting associated with helping non-household adults" 0.023
"040599" 4.3443 5.2868 "Helping non-household adults, misc." 0.015
"050101" 4.2106 5.0372 "Work, main job" 3.8671
"050102" 4.2169 5.0135 "Work, other job(s)" 0.1346
"050104" 4.1585 4.952 "Waiting associated with working" 0.0258
"050199" 3.502 3.8063 "Working, misc." 0.0012
"050201" 4.8683 4.8224 "Socializing, relaxing, and leisure as part of job" 0.0028
"050202" 4.6143 4.9853 "Eating and drinking as part of job" 0.0178
"050301" 5.1982 5.486 "Income-generating hobbies, crafts, and food" 0.0079
"050303" 4.7095 4.9767 "Income-generating services" 0.0307
"050304" 3.7731 5.3123 "Income-generating rental property activities" 0.0053
"050399" 4.5872 5.2503 "Other income-generating activities, misc." 0.0391
"050401" 3.4136 5.4454 "Job search activities" 0.1018
"050403" 4.4473 5.6315 "Job interviewing" 0.0046
"060101" 4.0938 4.9396 "Taking class for degree, certification, or lic" 0.1708
"060102" 4.8102 5.4599 "Taking class for personal interest" 0.0199
"060103" 3.7852 5.4278 "Waiting associated with taking classes" 0.005
"060201" 5.3468 5.7823 "Extracurricular club activities" 0.0028
"060202" 4.7063 5.0467 "Extracurricular music and performance activities" 0.0049
"060299" 4.8569 3.7138 "Education-related extracurricular activities, misc." 0.0017
"060301" 3.3418 4.9021 "Homework for class, for degree" 0.2883
"060302" 4.9457 5.6787 "Homework for class, for personal interest" 0.0067
"060399" 3.0733 4.7988 "Research/homework misc." 0.0048
"060401" 5.1 5.8001 "Admin activities: class for degree, cert, or lic" 0.0048
"069999" 3.8977 5.3269 "Education, misc." 0.0103
"070101" 4.3286 4.8367 "Grocery shopping" 0.5658
"070102" 4.2173 4.872 "Purchasing gas" 0.0943
"070103" 4.6715 4.8424 "Purchasing food (not groceries)" 0.3922
"070104" 4.6217 4.9111 "Shopping" 1.0884
"070105" 3.8775 5.1629 "Waiting associated with shopping" 0.0118
"070201" 4.6118 4.9319 "Comparison shopping" 0.0037
"080101" 5.0985 5.5574 "Using paid childcare services" 0.0073
"080201" 4.2378 4.9952 "Banking" 0.0579
"080202" 4.6522 5.3043 "Using other financial services" 0.0055
"080203" 4.5258 5.3144 "Waiting associated w/banking/financial services" 0.0023
"080401" 3.5839 5.4735 "Using health and care services outside the home" 0.1335
"080402" 3.5935 4.8952 "Using in-home health and care services" 0.0068
"080403" 3.3676 5.2215 "Waiting associated with medical services" 0.031
"080501" 4.8617 5.0354 "Using personal care services" 0.0583
"080502" 4.809 3.6661 "Waiting associated w/personal care services" 0.0025
"080601" 3.9619 5.0571 "Activities rel. to purchasing/selling real estate" 0.0125
"080701" 3.0977 5.7036 "Using veterinary services" 0.0085
"080702" 4.4371 5.4764 "Waiting associated with veterinary services" 0.003
"089999" 4.8267 5.1165 "Professional and personal services, misc." 0.0083
"090103" 4.9078 5.18 "Using clothing repair and cleaning services" 0.0066
"090201" 4.0885 5.0779 "Using home maint/repair/décor/construction svcs" 0.0121
"090202" 4.866 5.2007 "Wtg assoc w/ home main/repair/décor/constr" 0.0058
"090301" 4.139 4.4996 "Using pet services" 0.0043
"090401" 5.0353 5.5002 "Using lawn and garden services" 0.0034
"090501" 3.5476 4.8717 "Using vehicle maintenance or repair services" 0.021
"090502" 4.4548 4.9964 "Waiting assoc with vehicle main. or repair svcs" 0.0087
"100102" 4.036 5.3569 "Using social services" 0.0034
"100103" 3.6129 5.5428 "Obtaining licenses and paying fines, fees, taxes" 0.0071
"100201" 3.8247 5.8242 "Civic obligations and participation" 0.0055
"100304" 4.2609 4.9115 "Waiting associated with using government services" 0.0028
"110101" 4.8524 5.1731 "Eating and drinking" 10
"110201" 4.6021 4.9123 "Waiting associated w/eating and drinking" 0.0332
"120101" 5.0809 5.424 "Socializing and communicating" 2.5822
"120201" 5.4271 5.486 "Attending or hosting parties/receptions/ceremonies" 0.164
"120202" 4.4307 5.3018 "Attending meetings for personal interest (not volunteering)" 0.0262
"120301" 4.6856 5.1863 "Relaxing, thinking" 1.0886
"120302" 4.5497 5.0903 "Tobacco and drug use" 0.0602
"120303" 4.634 4.7545 "Television and movies" 5.058
"120304" 4.6446 5.4465 "Television (religious)" 0.0193
"120305" 4.5594 5.1203 "Listening to the radio" 0.0842
"120306" 4.9839 5.1187 "Listening to/playing music" 0.112
"120307" 4.9215 4.6528 "Playing games" 0.4886
"120308" 4.274 4.4493 "Computer use for leisure (exc. Games)" 0.5267
"120309" 4.9311 5.2819 "Arts and crafts as a hobby" 0.0832
"120311" 4.9605 5.5621 "Hobbies, except arts and crafts and collecting" 0.0094
"120312" 4.5865 4.8958 "Reading for personal interest" 1.1138
"120313" 4.8226 5.2921 "Writing for personal interest" 0.0148
"120399" 5.3157 5.4208 "Relaxing and leisure, misc." 0.0091
"120401" 5.2838 5.2415 "Attending performing arts" 0.0313
"120402" 5.2915 5.4177 "Attending museums" 0.019
"120403" 5.1679 5.0339 "Attending movies/film" 0.0597
"120404" 4.9542 4.7208 "Attending gambling establishments" 0.0142
"120499" 5.3123 5.3884 "Arts and entertainment, misc." 0.0612
"120504" 5.3712 5.571 "Waiting associated with arts and entertainment" 0.0042
"130101" 5.1623 5.4596 "Doing aerobics" 0.0089
"130102" 5.2133 4.9253 "Playing baseball" 0.0034
"130103" 5.3224 5.1499 "Playing basketball" 0.0297
"130104" 5.3086 5.3288 "Biking" 0.0459
"130105" 5.1553 4.7978 "Playing billiards" 0.0084
"130106" 5.5945 5.2725 "Boating" 0.0158
"130107" 4.257 4.9967 "Bowling" 0.0098
"130109" 5.2666 5.6163 "Dancing" 0.0144
"130110" 4.1328 5.5767 "Participating in equestrian sports" 0.0054
"130112" 5.1375 5.3017 "Fishing" 0.0328
"130113" 5.1277 4.4822 "Playing football" 0.0075
"130114" 5.1526 5.1615 "Golfing" 0.0337
"130116" 5.3033 5.4277 "Hiking" 0.0162
"130117" 4.9474 5.6306 "Playing hockey" 0.0046
"130118" 4.6138 5.5714 "Hunting" 0.0177
"130119" 5 5.878 "Participating in martial arts" 0.0049
"130120" 5.2921 5.1088 "Playing racquet sports" 0.0087
"130122" 5.2786 4.8898 "Rollerblading" 0.0065
"130124" 4.8552 5.4258 "Running" 0.0721
"130125" 5.7289 5.2832 "Skiing, ice skating, snowboarding" 0.0084
"130126" 5.3031 5.3535 "Playing soccer" 0.0116
"130127" 4.7308 5.2851 "Playing softball" 0.0067
"130128" 4.4901 5.4879 "Using cardiovascular equipment" 0.0678
"130129" 5.8696 5.5908 "Vehicle touring/racing" 0.0065
"130130" 5.8128 5.4136 "Playing volleyball" 0.0058
"130131" 4.9928 5.4046 "Walking" 0.3685
"130132" 5.4465 5.4959 "Participating in water sports" 0.0895
"130133" 4.8286 5.4693 "Weightlifting/strength training" 0.0689
"130134" 4.6372 5.3806 "Working out, unspecified" 0.2212
"130136" 4.567 5.4904 "Doing yoga" 0.0186
"130199" 5.1362 5.4151 "Playing sports misc." 0.0416
"130202" 4.9877 5.1101 "Watching baseball" 0.0108
"130203" 5.5753 5.0357 "Watching basketball" 0.0063
"130213" 5.238 5.4997 "Watching football" 0.0096
"130216" 4.6272 5.2029 "Watching hockey" 0.0071
"130218" 4.8914 4.4692 "Watching racquet sports" 0.0023
"130224" 5.5379 5.3283 "Watching soccer" 0.0081
"130227" 5.499 4.9985 "Watching volleyball" 0.0022
"130299" 4.818 5.182 "Attending sporting events, misc." 0.0053
"140101" 5.1801 5.7656 "Attending religious services" 0.5128
"140102" 5.1242 5.8226 "Participation in religious practices" 0.3447
"140103" 5.3894 5.4142 "Waiting assoc w/religious and spiritual activities" 0.0098
"140105" 5.294 5.8076 "Religious education activities" 0.0787
"149999" 5.4999 6 "Religious and spiritual activities, misc." 0.0029
"150101" 4.3872 5.1186 "Computer use" 0.0465
"150102" 4.892 5.3698 "Organizing and preparing" 0.0538
"150103" 5.1465 5.8767 "Reading" 0.0049
"150104" 3.9379 5.2894 "Telephone calls (except hotline counseling)" 0.0174
"150105" 5.0888 4.8161 "Writing" 0.0026
"150106" 5.5408 5.6845 "Fundraising" 0.0133
"150199" 5.2515 5.4781 "Administrative and support activities, misc." 0.0196
"150201" 5.0504 5.6601 "Food preparation, presentation, clean-up" 0.036
"150202" 4.4875 5.4283 "Collecting and delivering clothing and other goods" 0.0101
"150203" 5.1426 5.5682 "Providing care" 0.0195
"150204" 5.2749 5.6544 "Teaching, leading, counseling, mentoring" 0.0525
"150299" 4.7265 5.6233 "Social service and care activities, misc." 0.0093
"150302" 4.833 5.3045 "Indoor and outdoor maintenance, repair, and clean-up" 0.0173
"150401" 5.2987 5.6969 "Performing" 0.0265
"150402" 5.037 5.5589 "Serving at volunteer events and cultural activities" 0.0194
"150501" 4.5845 5.3972 "Attending meetings, conferences, and training" 0.0507
"150701" 4.5999 5.2999 "Waiting associated with volunteer activities" 0.0024
"159999" 5.2785 5.6518 "Volunteer activities, misc." 0.1119
"160101" 4.7783 5.5471 "Telephone calls to/from family members" 0.3752
"160102" 4.795 5.1776 "Phone calls to/from friends, neighbors" 0.2003
"160103" 2.2221 5.5185 "Telephone calls to/from education svcs providers" 0.0032
"160104" 3.4873 5.4081 "Telephone calls to/from salespeople" 0.0059
"160105" 2.6467 4.8562 "Phone calls to/from prof, personal svcs providers" 0.0167
"160106" 2.1017 5.3628 "Phone calls to/from household services providers" 0.0106
"160108" 3.7003 5.8925 "Telephone calls to/from government officials" 0.0056
"160199" 4.5566 5.211 "Telephone calls (to or from), misc." 0.1438
"180101" 4.674 5.1188 "Travel for personal care" 0.0959
"180201" 4.4686 5.0219 "Travel for housework" 0.0524
"180202" 4.8177 5.1817 "Travel for food and drink prep" 0.0526
"180203" 4.4063 5.4387 "Travel for int. maint, repair, and decoration" 0.0109
"180204" 4.6292 4.7371 "Travel for ext. maint, repair, and decoration" 0.0055
"180205" 4.7036 5.5364 "Travel for lawn, garden, and houseplants" 0.013
"180206" 4.7082 5.0638 "Travel for care for animals (not vet care)" 0.0486
"180207" 5.0427 5.0209 "Travel for vehicle care and maint (by self)" 0.0223
"180208" 5.8333 6 "Travel for tool, repair, and maintenance" 0.0043
"180209" 4.6447 5.0846 "Travel for household management" 0.2689
"180302" 4.797 5.2995 "Travel for caring for and helping household children" 0.859
"180303" 4.2 5.0188 "Travel for household children's education" 0.0126
"180304" 4.1476 5.2791 "Travel for household children's health" 0.0163
"180305" 3.8614 5.8019 "Travel for caring for household adults" 0.0206
"180306" 4.5551 5.1211 "Travel for helping household adults" 0.1177
"180402" 4.8915 5.2767 "Travel for helping non-household kids" 0.1991
"180404" 3.6108 5.3335 "Travel for non-household children's health" 0.0043
"180405" 4.352 5.2076 "Travel for caring for non-household adults" 0.015
"180406" 4.8412 5.1668 "Travel for helping non-household adults" 0.4152
"180501" 4.433 4.9649 "Travel for working" 2.2379
"180502" 3.9999 4.9312 "Travel for work-related activities" 0.007
"180503" 4.5506 5.4222 "Travel for income-generating activities" 0.0318
"180504" 3.8844 5.2982 "Travel for job search and interviewing" 0.0322
"180601" 4.2031 4.8203 "Travel for taking class" 0.125
"180602" 4.9581 4.6657 "Travel for extracurricular activities (ex. Sports)" 0.0058
"180603" 4.4433 4.6157 "Travel for research/homework" 0.0171
"180604" 4.1596 4.7597 "Travel for registration/admin activities" 0.003
"180701" 4.596 4.8843 "Traveling to/from the grocery store" 0.8789
"180703" 4.7388 4.952 "Travel for purchasing food (not groceries)" 0.5882
"180704" 4.6983 5.0044 "Travel for shopping, not groceries" 1.433
"180705" 4.5856 5.0456 "Traveling to/from gas station" 0.1591
"180801" 4.8568 6 "Travel for using childcare services" 0.005
"180802" 4.3214 5.0572 "Travel for using financial svcs and banking" 0.0787
"180804" 3.6482 5.3131 "Travel for using medical services" 0.1596
"180805" 4.8084 4.9991 "Travel for using personal care services" 0.057
"180806" 4.1981 4.8519 "Travel for using real estate services" 0.0163
"180807" 3.4253 5.2574 "Travel for using veterinary services" 0.013
"180899" 5.0215 4.9994 "Travel rel. to using prof, personal care svcs misc." 0.0055
"180901" 4.4148 5.1697 "Travel for using household services" 0.0113
"180902" 3.6941 5.7827 "Travel for home maintenance" 0.0028
"180903" 4.5553 4.2484 "Travel for using pet services (not vet)" 0.0086
"180905" 4.3643 5.0414 "Travel for vehicle maintenance" 0.0455
"181001" 4.543 5.2496 "Travel for using government services" 0.0124
"181002" 4.9754 5.6815 "Travel for civic obligations and participation" 0.0049
"181101" 4.9796 5.0953 "Travel for eating and drinking" 1.4294
"181201" 4.8021 5.1563 "Travel for socializing" 1.1308
"181202" 5.1019 5.1226 "Trvl related to attending or hosting social events" 0.1871
"181204" 5.0067 5.073 "Travel for arts and entertainment" 0.1724
"181205" 5.1206 5.0307 "Travel as a form of entertainment" 0.0582
"181206" 4.7928 5.0097 "Travel for relaxing and leisure" 0.3648
"181301" 4.8777 5.071 "Travel for sports, exercise, or recreation" 0.5078
"181302" 4.8429 5.0556 "Travel for attending sporting events" 0.0643
"181401" 5.0299 5.5472 "Travel for religious practices" 0.5638
"181501" 4.8462 5.2251 "Travel for volunteering" 0.2669
"181599" 5.0713 5.285 "Travel for volunteer activities, misc." 0.0084
"181601" 4.356 4.9264 "Travel for phone calls" 0.0229
"181801" 4.7595 4.3052 "Security procedures related to traveling" 0.009
"189999" 4.6894 5.1014 "Traveling, misc." 0.2231
"500101" 4.5424 5.223 "Insufficient detail in verbatim" 0.5265
"500103" 4.907 5.2302 "Missing travel or destination" 0.0964
"500104" 4.4997 5.2727 "Recorded simultaneous activities incorrectly" 0.0315
"500107" 4.6635 5.3266 "Unable to code activity at 1st tier" 0.0125
1 activity schappy_mean meaning_mean descrip relwt
2 010301 3.65 5.2875 Health-related self care 0.3437
3 010399 0.4441 4.332 Self care, misc. 0.0022
4 020101 4.3016 5.0383 Interior cleaning 1.362
5 020102 4.1979 4.866 Laundry 0.806
6 020103 4.8934 5.4284 Sewing, repairing, and maintaining textiles 0.076
7 020104 4.5711 4.8468 Storing interior household items, inc. food 0.2002
8 020201 4.6729 5.1604 Food and drink prep. 3.8685
9 020202 4.9016 5.5208 Food presentation 0.0659
10 020203 4.3252 4.9249 Kitchen and food clean-up 0.9425
11 020301 4.5569 5.2724 Interior arrangement, decoration, and repairs 0.1527
12 020302 4.7587 4.8901 Building and repairing furniture 0.0073
13 020303 4.2926 5.29 Heating and cooling 0.0446
14 020401 4.1507 5.0967 Exterior cleaning 0.1179
15 020402 4.8953 5.3774 Exterior repair, improvements, and decoration 0.0696
16 020501 4.6695 5.2066 Lawn, garden, and houseplant care 0.6958
17 020502 4.0334 5.083 Ponds, pools, and hot tubs 0.0143
18 020602 4.591 5.3077 Care for animals and pets 0.6464
19 020603 4.9233 5.2797 Walking, exercising, playing with animals 0.4182
20 020699 4.4816 4.6297 Pet and animal care, misc. 0.0032
21 020701 4.3308 5.1412 Vehicle repair and maintenance (by self) 0.14
22 020801 4.3562 5.1824 App, tool, toy set-up, repair, and maint (by self) 0.0589
23 020901 3.715 4.999 Financial management 0.1445
24 020902 4.386 4.9614 Household and personal organization 0.6869
25 020903 4.3574 4.8634 Household and personal mail and messages (except e-mail) 0.1483
26 020904 4.1977 4.3381 Household and personal e-mail and messages 0.2182
27 020905 4.0463 4.9778 Home security 0.023
28 029999 4.4219 4.895 Household activities, misc. 0.0023
29 030101 4.8037 5.4819 Care for household children 1.7066
30 030102 5.3559 5.7285 Reading to/with household children 0.1706
31 030103 5.5047 5.7429 Playing with household children 0.5338
32 030104 5.4589 5.6239 Arts and crafts with household children 0.0131
33 030105 5.3366 5.712 Playing sports with household children 0.0246
34 030106 4.997 5.5712 Talking with/listening to household children 0.1503
35 030108 4.4771 5.0912 Organization for household children 0.0445
36 030109 5.0333 5.5065 Looking after household children 0.1501
37 030110 5.0778 5.615 Attending household children's events 0.0925
38 030111 4.7433 5.3825 Waiting for/with household children 0.0482
39 030112 4.7327 5.3525 Picking up/dropping off household children 0.3373
40 030199 5.0626 5.4164 Caring for and helping household children, misc. 0.0058
41 030201 4.5065 5.5892 Homework (household children) 0.1711
42 030202 4.062 5.6243 Meetings and school conferences (household children) 0.0058
43 030203 5.0198 5.808 Home schooling of household children 0.0062
44 030299 3.4516 5.3227 Activities related to household child's education, misc. 0.0037
45 030301 3.2966 5.5604 Providing medical care to household children 0.0218
46 030302 3.484 5.545 Obtaining medical care for household children 0.0127
47 030303 2.7979 5.6905 Waiting associated with household children's health 0.0101
48 030401 4.3313 5.5832 Care for household adults 0.0634
49 030402 4.6669 5.0003 Looking after household adult (as a primary activity) 0.0043
50 030403 3.7147 5.525 Providing medical care to household adult 0.021
51 030404 4.71 5.7405 Obtaining medical and care services for household adult 0.0075
52 030405 4.234 5.476 Waiting associated with caring for household adults 0.006
53 030501 4.3418 5.0822 Helping household adults 0.0088
54 030502 3.9261 5.5183 Organization and planning for household adults 0.0032
55 030503 4.6838 5.0713 Picking up/dropping off household adult 0.0368
56 030504 4.8728 5.4733 Waiting associated with helping household adults 0.0247
57 030599 4.7353 5.1179 Helping household adults, misc. 0.0041
58 040101 5.3144 5.6892 Care for non-household children 0.0835
59 040102 5.632 5.8949 Reading to/with non-household children 0.0091
60 040103 5.7316 5.8642 Playing with non-household children 0.116
61 040105 4.7162 6 Playing sports with non-household children 0.005
62 040106 5.632 5.8326 Talking with/listening to non-household children 0.0251
63 040108 4.6278 5.5581 Organization and planning for non-household children 0.0052
64 040109 5.3345 5.8355 Looking after non-household children (as primary activity) 0.033
65 040110 5.5768 5.7883 Attending non-household children's events 0.0165
66 040111 5.1291 5.322 Waiting for/with non-household children 0.0074
67 040112 5.0798 5.5207 Dropping off/picking up non-household children 0.0691
68 040199 5.5774 5.7106 Caring for and helping non-household children, misc. 0.0054
69 040201 4.8287 5.8439 Homework (non-household children) 0.0077
70 040401 4.5175 5.6303 Care for non-household adults 0.0244
71 040402 3.6183 5.4763 Looking after non-household adult 0.005
72 040403 4.3324 5.7824 Providing medical care to non-household adult 0.0083
73 040404 3.697 5.7815 Obtaining medical and care svcs for non-household adult 0.0028
74 040405 3.8136 5.5421 Waiting associated with caring for non-household adults 0.0045
75 040501 4.7363 5.3113 Hswrk, cooking, and shopping asst, non-household adults 0.0447
76 040502 4.6688 5.368 House and lawn maint and repair asst, non-household adults 0.0436
77 040503 5.3119 4.9995 Animal and pet care assistance for non-household adults 0.0134
78 040504 4.5605 5.2475 Vehicle/appliance maint/repair asst, non-household adults 0.0201
79 040505 4.4638 4.9507 Financial mgmt asst for non-household adults 0.0049
80 040506 4.1688 5.3376 household mgmt and paperwork asst, non-household adults 0.0255
81 040507 4.9319 5.3192 Picking up/dropping off non-household adult 0.1284
82 040508 4.2182 5.2695 Waiting associated with helping non-household adults 0.023
83 040599 4.3443 5.2868 Helping non-household adults, misc. 0.015
84 050101 4.2106 5.0372 Work, main job 3.8671
85 050102 4.2169 5.0135 Work, other job(s) 0.1346
86 050104 4.1585 4.952 Waiting associated with working 0.0258
87 050199 3.502 3.8063 Working, misc. 0.0012
88 050201 4.8683 4.8224 Socializing, relaxing, and leisure as part of job 0.0028
89 050202 4.6143 4.9853 Eating and drinking as part of job 0.0178
90 050301 5.1982 5.486 Income-generating hobbies, crafts, and food 0.0079
91 050303 4.7095 4.9767 Income-generating services 0.0307
92 050304 3.7731 5.3123 Income-generating rental property activities 0.0053
93 050399 4.5872 5.2503 Other income-generating activities, misc. 0.0391
94 050401 3.4136 5.4454 Job search activities 0.1018
95 050403 4.4473 5.6315 Job interviewing 0.0046
96 060101 4.0938 4.9396 Taking class for degree, certification, or lic 0.1708
97 060102 4.8102 5.4599 Taking class for personal interest 0.0199
98 060103 3.7852 5.4278 Waiting associated with taking classes 0.005
99 060201 5.3468 5.7823 Extracurricular club activities 0.0028
100 060202 4.7063 5.0467 Extracurricular music and performance activities 0.0049
101 060299 4.8569 3.7138 Education-related extracurricular activities, misc. 0.0017
102 060301 3.3418 4.9021 Homework for class, for degree 0.2883
103 060302 4.9457 5.6787 Homework for class, for personal interest 0.0067
104 060399 3.0733 4.7988 Research/homework misc. 0.0048
105 060401 5.1 5.8001 Admin activities: class for degree, cert, or lic 0.0048
106 069999 3.8977 5.3269 Education, misc. 0.0103
107 070101 4.3286 4.8367 Grocery shopping 0.5658
108 070102 4.2173 4.872 Purchasing gas 0.0943
109 070103 4.6715 4.8424 Purchasing food (not groceries) 0.3922
110 070104 4.6217 4.9111 Shopping 1.0884
111 070105 3.8775 5.1629 Waiting associated with shopping 0.0118
112 070201 4.6118 4.9319 Comparison shopping 0.0037
113 080101 5.0985 5.5574 Using paid childcare services 0.0073
114 080201 4.2378 4.9952 Banking 0.0579
115 080202 4.6522 5.3043 Using other financial services 0.0055
116 080203 4.5258 5.3144 Waiting associated w/banking/financial services 0.0023
117 080401 3.5839 5.4735 Using health and care services outside the home 0.1335
118 080402 3.5935 4.8952 Using in-home health and care services 0.0068
119 080403 3.3676 5.2215 Waiting associated with medical services 0.031
120 080501 4.8617 5.0354 Using personal care services 0.0583
121 080502 4.809 3.6661 Waiting associated w/personal care services 0.0025
122 080601 3.9619 5.0571 Activities rel. to purchasing/selling real estate 0.0125
123 080701 3.0977 5.7036 Using veterinary services 0.0085
124 080702 4.4371 5.4764 Waiting associated with veterinary services 0.003
125 089999 4.8267 5.1165 Professional and personal services, misc. 0.0083
126 090103 4.9078 5.18 Using clothing repair and cleaning services 0.0066
127 090201 4.0885 5.0779 Using home maint/repair/décor/construction svcs 0.0121
128 090202 4.866 5.2007 Wtg assoc w/ home main/repair/décor/constr 0.0058
129 090301 4.139 4.4996 Using pet services 0.0043
130 090401 5.0353 5.5002 Using lawn and garden services 0.0034
131 090501 3.5476 4.8717 Using vehicle maintenance or repair services 0.021
132 090502 4.4548 4.9964 Waiting assoc with vehicle main. or repair svcs 0.0087
133 100102 4.036 5.3569 Using social services 0.0034
134 100103 3.6129 5.5428 Obtaining licenses and paying fines, fees, taxes 0.0071
135 100201 3.8247 5.8242 Civic obligations and participation 0.0055
136 100304 4.2609 4.9115 Waiting associated with using government services 0.0028
137 110101 4.8524 5.1731 Eating and drinking 10
138 110201 4.6021 4.9123 Waiting associated w/eating and drinking 0.0332
139 120101 5.0809 5.424 Socializing and communicating 2.5822
140 120201 5.4271 5.486 Attending or hosting parties/receptions/ceremonies 0.164
141 120202 4.4307 5.3018 Attending meetings for personal interest (not volunteering) 0.0262
142 120301 4.6856 5.1863 Relaxing, thinking 1.0886
143 120302 4.5497 5.0903 Tobacco and drug use 0.0602
144 120303 4.634 4.7545 Television and movies 5.058
145 120304 4.6446 5.4465 Television (religious) 0.0193
146 120305 4.5594 5.1203 Listening to the radio 0.0842
147 120306 4.9839 5.1187 Listening to/playing music 0.112
148 120307 4.9215 4.6528 Playing games 0.4886
149 120308 4.274 4.4493 Computer use for leisure (exc. Games) 0.5267
150 120309 4.9311 5.2819 Arts and crafts as a hobby 0.0832
151 120311 4.9605 5.5621 Hobbies, except arts and crafts and collecting 0.0094
152 120312 4.5865 4.8958 Reading for personal interest 1.1138
153 120313 4.8226 5.2921 Writing for personal interest 0.0148
154 120399 5.3157 5.4208 Relaxing and leisure, misc. 0.0091
155 120401 5.2838 5.2415 Attending performing arts 0.0313
156 120402 5.2915 5.4177 Attending museums 0.019
157 120403 5.1679 5.0339 Attending movies/film 0.0597
158 120404 4.9542 4.7208 Attending gambling establishments 0.0142
159 120499 5.3123 5.3884 Arts and entertainment, misc. 0.0612
160 120504 5.3712 5.571 Waiting associated with arts and entertainment 0.0042
161 130101 5.1623 5.4596 Doing aerobics 0.0089
162 130102 5.2133 4.9253 Playing baseball 0.0034
163 130103 5.3224 5.1499 Playing basketball 0.0297
164 130104 5.3086 5.3288 Biking 0.0459
165 130105 5.1553 4.7978 Playing billiards 0.0084
166 130106 5.5945 5.2725 Boating 0.0158
167 130107 4.257 4.9967 Bowling 0.0098
168 130109 5.2666 5.6163 Dancing 0.0144
169 130110 4.1328 5.5767 Participating in equestrian sports 0.0054
170 130112 5.1375 5.3017 Fishing 0.0328
171 130113 5.1277 4.4822 Playing football 0.0075
172 130114 5.1526 5.1615 Golfing 0.0337
173 130116 5.3033 5.4277 Hiking 0.0162
174 130117 4.9474 5.6306 Playing hockey 0.0046
175 130118 4.6138 5.5714 Hunting 0.0177
176 130119 5 5.878 Participating in martial arts 0.0049
177 130120 5.2921 5.1088 Playing racquet sports 0.0087
178 130122 5.2786 4.8898 Rollerblading 0.0065
179 130124 4.8552 5.4258 Running 0.0721
180 130125 5.7289 5.2832 Skiing, ice skating, snowboarding 0.0084
181 130126 5.3031 5.3535 Playing soccer 0.0116
182 130127 4.7308 5.2851 Playing softball 0.0067
183 130128 4.4901 5.4879 Using cardiovascular equipment 0.0678
184 130129 5.8696 5.5908 Vehicle touring/racing 0.0065
185 130130 5.8128 5.4136 Playing volleyball 0.0058
186 130131 4.9928 5.4046 Walking 0.3685
187 130132 5.4465 5.4959 Participating in water sports 0.0895
188 130133 4.8286 5.4693 Weightlifting/strength training 0.0689
189 130134 4.6372 5.3806 Working out, unspecified 0.2212
190 130136 4.567 5.4904 Doing yoga 0.0186
191 130199 5.1362 5.4151 Playing sports misc. 0.0416
192 130202 4.9877 5.1101 Watching baseball 0.0108
193 130203 5.5753 5.0357 Watching basketball 0.0063
194 130213 5.238 5.4997 Watching football 0.0096
195 130216 4.6272 5.2029 Watching hockey 0.0071
196 130218 4.8914 4.4692 Watching racquet sports 0.0023
197 130224 5.5379 5.3283 Watching soccer 0.0081
198 130227 5.499 4.9985 Watching volleyball 0.0022
199 130299 4.818 5.182 Attending sporting events, misc. 0.0053
200 140101 5.1801 5.7656 Attending religious services 0.5128
201 140102 5.1242 5.8226 Participation in religious practices 0.3447
202 140103 5.3894 5.4142 Waiting assoc w/religious and spiritual activities 0.0098
203 140105 5.294 5.8076 Religious education activities 0.0787
204 149999 5.4999 6 Religious and spiritual activities, misc. 0.0029
205 150101 4.3872 5.1186 Computer use 0.0465
206 150102 4.892 5.3698 Organizing and preparing 0.0538
207 150103 5.1465 5.8767 Reading 0.0049
208 150104 3.9379 5.2894 Telephone calls (except hotline counseling) 0.0174
209 150105 5.0888 4.8161 Writing 0.0026
210 150106 5.5408 5.6845 Fundraising 0.0133
211 150199 5.2515 5.4781 Administrative and support activities, misc. 0.0196
212 150201 5.0504 5.6601 Food preparation, presentation, clean-up 0.036
213 150202 4.4875 5.4283 Collecting and delivering clothing and other goods 0.0101
214 150203 5.1426 5.5682 Providing care 0.0195
215 150204 5.2749 5.6544 Teaching, leading, counseling, mentoring 0.0525
216 150299 4.7265 5.6233 Social service and care activities, misc. 0.0093
217 150302 4.833 5.3045 Indoor and outdoor maintenance, repair, and clean-up 0.0173
218 150401 5.2987 5.6969 Performing 0.0265
219 150402 5.037 5.5589 Serving at volunteer events and cultural activities 0.0194
220 150501 4.5845 5.3972 Attending meetings, conferences, and training 0.0507
221 150701 4.5999 5.2999 Waiting associated with volunteer activities 0.0024
222 159999 5.2785 5.6518 Volunteer activities, misc. 0.1119
223 160101 4.7783 5.5471 Telephone calls to/from family members 0.3752
224 160102 4.795 5.1776 Phone calls to/from friends, neighbors 0.2003
225 160103 2.2221 5.5185 Telephone calls to/from education svcs providers 0.0032
226 160104 3.4873 5.4081 Telephone calls to/from salespeople 0.0059
227 160105 2.6467 4.8562 Phone calls to/from prof, personal svcs providers 0.0167
228 160106 2.1017 5.3628 Phone calls to/from household services providers 0.0106
229 160108 3.7003 5.8925 Telephone calls to/from government officials 0.0056
230 160199 4.5566 5.211 Telephone calls (to or from), misc. 0.1438
231 180101 4.674 5.1188 Travel for personal care 0.0959
232 180201 4.4686 5.0219 Travel for housework 0.0524
233 180202 4.8177 5.1817 Travel for food and drink prep 0.0526
234 180203 4.4063 5.4387 Travel for int. maint, repair, and decoration 0.0109
235 180204 4.6292 4.7371 Travel for ext. maint, repair, and decoration 0.0055
236 180205 4.7036 5.5364 Travel for lawn, garden, and houseplants 0.013
237 180206 4.7082 5.0638 Travel for care for animals (not vet care) 0.0486
238 180207 5.0427 5.0209 Travel for vehicle care and maint (by self) 0.0223
239 180208 5.8333 6 Travel for tool, repair, and maintenance 0.0043
240 180209 4.6447 5.0846 Travel for household management 0.2689
241 180302 4.797 5.2995 Travel for caring for and helping household children 0.859
242 180303 4.2 5.0188 Travel for household children's education 0.0126
243 180304 4.1476 5.2791 Travel for household children's health 0.0163
244 180305 3.8614 5.8019 Travel for caring for household adults 0.0206
245 180306 4.5551 5.1211 Travel for helping household adults 0.1177
246 180402 4.8915 5.2767 Travel for helping non-household kids 0.1991
247 180404 3.6108 5.3335 Travel for non-household children's health 0.0043
248 180405 4.352 5.2076 Travel for caring for non-household adults 0.015
249 180406 4.8412 5.1668 Travel for helping non-household adults 0.4152
250 180501 4.433 4.9649 Travel for working 2.2379
251 180502 3.9999 4.9312 Travel for work-related activities 0.007
252 180503 4.5506 5.4222 Travel for income-generating activities 0.0318
253 180504 3.8844 5.2982 Travel for job search and interviewing 0.0322
254 180601 4.2031 4.8203 Travel for taking class 0.125
255 180602 4.9581 4.6657 Travel for extracurricular activities (ex. Sports) 0.0058
256 180603 4.4433 4.6157 Travel for research/homework 0.0171
257 180604 4.1596 4.7597 Travel for registration/admin activities 0.003
258 180701 4.596 4.8843 Traveling to/from the grocery store 0.8789
259 180703 4.7388 4.952 Travel for purchasing food (not groceries) 0.5882
260 180704 4.6983 5.0044 Travel for shopping, not groceries 1.433
261 180705 4.5856 5.0456 Traveling to/from gas station 0.1591
262 180801 4.8568 6 Travel for using childcare services 0.005
263 180802 4.3214 5.0572 Travel for using financial svcs and banking 0.0787
264 180804 3.6482 5.3131 Travel for using medical services 0.1596
265 180805 4.8084 4.9991 Travel for using personal care services 0.057
266 180806 4.1981 4.8519 Travel for using real estate services 0.0163
267 180807 3.4253 5.2574 Travel for using veterinary services 0.013
268 180899 5.0215 4.9994 Travel rel. to using prof, personal care svcs misc. 0.0055
269 180901 4.4148 5.1697 Travel for using household services 0.0113
270 180902 3.6941 5.7827 Travel for home maintenance 0.0028
271 180903 4.5553 4.2484 Travel for using pet services (not vet) 0.0086
272 180905 4.3643 5.0414 Travel for vehicle maintenance 0.0455
273 181001 4.543 5.2496 Travel for using government services 0.0124
274 181002 4.9754 5.6815 Travel for civic obligations and participation 0.0049
275 181101 4.9796 5.0953 Travel for eating and drinking 1.4294
276 181201 4.8021 5.1563 Travel for socializing 1.1308
277 181202 5.1019 5.1226 Trvl related to attending or hosting social events 0.1871
278 181204 5.0067 5.073 Travel for arts and entertainment 0.1724
279 181205 5.1206 5.0307 Travel as a form of entertainment 0.0582
280 181206 4.7928 5.0097 Travel for relaxing and leisure 0.3648
281 181301 4.8777 5.071 Travel for sports, exercise, or recreation 0.5078
282 181302 4.8429 5.0556 Travel for attending sporting events 0.0643
283 181401 5.0299 5.5472 Travel for religious practices 0.5638
284 181501 4.8462 5.2251 Travel for volunteering 0.2669
285 181599 5.0713 5.285 Travel for volunteer activities, misc. 0.0084
286 181601 4.356 4.9264 Travel for phone calls 0.0229
287 181801 4.7595 4.3052 Security procedures related to traveling 0.009
288 189999 4.6894 5.1014 Traveling, misc. 0.2231
289 500101 4.5424 5.223 Insufficient detail in verbatim 0.5265
290 500103 4.907 5.2302 Missing travel or destination 0.0964
291 500104 4.4997 5.2727 Recorded simultaneous activities incorrectly 0.0315
292 500107 4.6635 5.3266 Unable to code activity at 1st tier 0.0125
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Activities, Happiness, and Meaning</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
</head>
<div id="main-wrapper">
<h1>Meaningfulness with Happiness</h1>
<div id="chart"></div>
</div>
<script src="js/d3.v7.min.js"></script>
<script src="js/scatterplot.js"></script>
@@ -0,0 +1,2 @@
// https://d3js.org v7.4.0 Copyright 2010-2022 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t,i=t;function o(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<0?e=r+1:o=r}while(e<o)}return e}return 2!==t.length&&(e=(n,e)=>t(n)-e,r=n,i=(e,r)=>n(t(e),r)),{left:o,center:function(t,n,r=0,i=t.length){const a=o(t,n,r,i-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<=0?e=r+1:o=r}while(e<o)}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;var c=o;function f(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function s(t){return 0|t.length}function l(t){return!(t>0)}function h(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function d(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function p(t,n){const e=d(t,n);return e?Math.sqrt(e):e}function g(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class y{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(v(this,t))}has(t){return super.has(v(this,t))}set(t,n){return super.set(_(this,t),n)}delete(t){return super.delete(b(this,t))}}class InternSet extends Set{constructor(t,n=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(v(this,t))}add(t){return super.add(_(this,t))}delete(t){return super.delete(b(this,t))}}function v({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function _({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function b({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function m(t){return null!==t&&"object"==typeof t?t.valueOf():t}function x(t){return t}function w(t,...n){return k(t,x,x,n)}function M(t,...n){return k(t,Array.from,x,n)}function A(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function T(t,n,...e){return k(t,x,n,e)}function S(t,n,...e){return k(t,Array.from,n,e)}function E(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function k(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function N(t,n){return Array.from(n,(n=>t[n]))}function C(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=z(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>z(e[t],e[n])))),N(t,r)}return t.sort(P(e))}function P(t=n){if(t===n)return z;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function z(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var D=Array.prototype.slice;function R(t){return()=>t}var F=Math.sqrt(50),q=Math.sqrt(10),O=Math.sqrt(2);function U(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=I(t,n,e))||!isFinite(a))return[];if(a>0){let e=Math.round(t/a),r=Math.round(n/a);for(e*a<t&&++e,r*a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)*a}else{a=-a;let e=Math.round(t*a),r=Math.round(n*a);for(e/a<t&&++e,r/a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)/a}return r&&o.reverse(),o}function I(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=F?10:o>=q?5:o>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=F?10:o>=q?5:o>=O?2:1)}funLine truncated
@@ -0,0 +1,103 @@
// Dimensions of chart.
let margin = { top: 20, right: 10, bottom: 50, left: 45 },
// width = parseInt(d3.select('#chart').style('width'), 10) - margin.left - margin.right,
width = 600 - margin.left - margin.right,
height = 750 - margin.top - margin.bottom;
// Start SVG
let svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Scales: x and y
let x = d3.scaleLinear()
// .domain([0, 6])
.domain([3, 6])
.range([0, width]);
let y = d3.scaleLinear()
// .domain([0, 6])
.domain([2, 6])
.range([height, 0]);
// Point color
let ptcolor = "#5a8171";
// x-axis
let xAxis = d3.axisBottom(x)
// .ticks(7)
.ticks(4)
.tickSize(-height-8)
.tickPadding(5);
let xAxisEl = svg.append("g")
.attr("class", "x axis bottom")
.attr("transform", "translate(0,"+(height+8)+")");
xAxisEl.append("text")
.attr("class", "axistitle")
.attr("text-anchor", "start")
.attr("x", 0).attr("y", 0)
.attr("dx", "-.25em")
.attr("dy", "2.5em")
.text("Meaningfulness Score Average");
xAxisEl.call(xAxis);
// y-axis
let yAxis = d3.axisLeft(y)
// .ticks(7)
.ticks(5)
.tickSize(-width-8)
.tickPadding(5);
var yAxisEl = svg.append("g")
.attr("class", "y axis left")
.attr("transform", "translate("+(-8)+",0)");
yAxisEl.append("text")
.attr("class", "axistitle")
.attr("x", 0).attr("y", 0)
.attr("dx", "4px")
.attr("dy", "-2em")
.style("text-anchor", "end")
.attr("transform", "rotate(-90)")
.text("Happiness Score Average");
yAxisEl.call(yAxis);
let activities;
let circle;
// Load data
const activitiesData = Promise.all([
d3.tsv("data/act_means.tsv", d3.autoType)
]);
activitiesData.then(function(data) {
activities = data[0];
console.log(activities);
// Initialize chart now that data is loaded.
initChart();
});
function initChart() {
// Circle for each node.
circle = svg.append("g")
.selectAll("circle")
.data(activities)
.join("circle")
.attr("id", d => "circle"+d.activity)
.attr("cx", d => x(d.meaning_mean))
.attr("cy", d => y(d.schappy_mean))
.attr("fill", ptcolor)
// .attr("fill-opacity", .8)
.attr("r", 3);
// .attr("stroke", "#fff");
}
@@ -0,0 +1,65 @@
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* Main layout
============================ */
#main-wrapper {
width: 600px;
margin: 40px auto;
}
h1 {
font-family: Georgia, serif;
font-size: 1.45em;
text-align: center;
}
/* Chart
============================ */
#chart {
margin: 0 auto;
}
.axis text {
font-family: "Courier New", Courier, monospace;
font-size: .8rem;
}
.axis .axistitle {
text-transform: uppercase;
fill: #333;
font-size: .8rem;
}
.axis path,
.axis line {
fill: none;
stroke: #ccc;
stroke-width: 1px;
shape-rendering: crispEdges;
}
.x.axis path, .y.axis path {
display: none;
}