diff --git a/.gitignore b/.gitignore index a584738f..49f1e6ec 100644 --- a/.gitignore +++ b/.gitignore @@ -259,4 +259,4 @@ src/lib/stories/dark-data-survey/data/trust_circles2.csv src/lib/stories/dark-data-survey/data/trust_circles_individual_all_timepoints.csv src/lib/stories/dark-data-survey/data/trust_circles_individual.csv drizzle/ -frontend/.env \ No newline at end of file +frontend/.env diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d5712b06..688601af 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -37,7 +37,7 @@ "reveal.js": "^5.2.1", "sharp": "^0.34.2", "svelte-exmarkdown": "^5.0.1", - "svelteplot": "^0.5.3", + "svelteplot": "^0.9.2", "svg2pdf.js": "^2.5.0", "valibot": "^1.1.0" }, @@ -81,41 +81,41 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@better-auth/core": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/@better-auth/core/-/core-1.4.10.tgz", - "integrity": "sha512-AThrfb6CpG80wqkanfrbN2/fGOYzhGladHFf3JhaWt/3/Vtf4h084T6PJLrDE7M/vCCGYvDI1DkvP3P1OB2HAg==", + "version": "1.4.17", + "resolved": "https://registry.npmjs.org/@better-auth/core/-/core-1.4.17.tgz", + "integrity": "sha512-WSaEQDdUO6B1CzAmissN6j0lx9fM9lcslEYzlApB5UzFaBeAOHNUONTdglSyUs6/idiZBoRvt0t/qMXCgIU8ug==", "dependencies": { "@standard-schema/spec": "^1.0.0", - "zod": "^4.1.12" + "zod": "^4.3.5" }, "peerDependencies": { "@better-auth/utils": "0.3.0", "@better-fetch/fetch": "1.1.21", - "better-call": "1.1.7", + "better-call": "1.1.8", "jose": "^6.1.0", "kysely": "^0.28.5", "nanostores": "^1.0.1" } }, "node_modules/@better-auth/telemetry": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/@better-auth/telemetry/-/telemetry-1.4.10.tgz", - "integrity": "sha512-Dq4XJX6EKsUu0h3jpRagX739p/VMOTcnJYWRrLtDYkqtZFg+sFiFsSWVcfapZoWpRSUGYX9iKwl6nDHn6Ju2oQ==", + "version": "1.4.17", + "resolved": "https://registry.npmjs.org/@better-auth/telemetry/-/telemetry-1.4.17.tgz", + "integrity": "sha512-R1BC4e/bNjQbXu7lG6ubpgmsPj7IMqky5DvMlzAtnAJWJhh99pMh/n6w5gOHa0cqDZgEAuj75IPTxv+q3YiInA==", "dependencies": { "@better-auth/utils": "0.3.0", "@better-fetch/fetch": "1.1.21" }, "peerDependencies": { - "@better-auth/core": "1.4.10" + "@better-auth/core": "1.4.17" } }, "node_modules/@better-auth/utils": { @@ -1145,9 +1145,9 @@ } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.4.tgz", - "integrity": "sha512-p7X/ytJDIdwUfFL/CLOhKgdfJe1Fa8uw9seJYvdOmnP9JBWGWHW69HkOixXS6Wy9yvGf1MbhcS6lVmrhy4jm2g==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.5.tgz", + "integrity": "sha512-k64Lbyb7ycCSXHSLzxVdb2xsKGPMvYZfCICXvDsI8Z65CeWQzTEKS4YmGbnqw+U9RBvLPTsB6UCmwkgsDTGWIw==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -1301,9 +1301,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz", - "integrity": "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.56.0.tgz", + "integrity": "sha512-LNKIPA5k8PF1+jAFomGe3qN3bbIgJe/IlpDBwuVjrDKrJhVWywgnJvflMt/zkbVNLFtF1+94SljYQS6e99klnw==", "cpu": [ "arm" ], @@ -1315,9 +1315,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.1.tgz", - "integrity": "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.56.0.tgz", + "integrity": "sha512-lfbVUbelYqXlYiU/HApNMJzT1E87UPGvzveGg2h0ktUNlOCxKlWuJ9jtfvs1sKHdwU4fzY7Pl8sAl49/XaEk6Q==", "cpu": [ "arm64" ], @@ -1329,9 +1329,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.1.tgz", - "integrity": "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.56.0.tgz", + "integrity": "sha512-EgxD1ocWfhoD6xSOeEEwyE7tDvwTgZc8Bss7wCWe+uc7wO8G34HHCUH+Q6cHqJubxIAnQzAsyUsClt0yFLu06w==", "cpu": [ "arm64" ], @@ -1343,9 +1343,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.1.tgz", - "integrity": "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.56.0.tgz", + "integrity": "sha512-1vXe1vcMOssb/hOF8iv52A7feWW2xnu+c8BV4t1F//m9QVLTfNVpEdja5ia762j/UEJe2Z1jAmEqZAK42tVW3g==", "cpu": [ "x64" ], @@ -1357,9 +1357,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.1.tgz", - "integrity": "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.56.0.tgz", + "integrity": "sha512-bof7fbIlvqsyv/DtaXSck4VYQ9lPtoWNFCB/JY4snlFuJREXfZnm+Ej6yaCHfQvofJDXLDMTVxWscVSuQvVWUQ==", "cpu": [ "arm64" ], @@ -1371,9 +1371,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.1.tgz", - "integrity": "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.56.0.tgz", + "integrity": "sha512-KNa6lYHloW+7lTEkYGa37fpvPq+NKG/EHKM8+G/g9WDU7ls4sMqbVRV78J6LdNuVaeeK5WB9/9VAFbKxcbXKYg==", "cpu": [ "x64" ], @@ -1385,9 +1385,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.1.tgz", - "integrity": "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.56.0.tgz", + "integrity": "sha512-E8jKK87uOvLrrLN28jnAAAChNq5LeCd2mGgZF+fGF5D507WlG/Noct3lP/QzQ6MrqJ5BCKNwI9ipADB6jyiq2A==", "cpu": [ "arm" ], @@ -1399,9 +1399,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.1.tgz", - "integrity": "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.56.0.tgz", + "integrity": "sha512-jQosa5FMYF5Z6prEpTCCmzCXz6eKr/tCBssSmQGEeozA9tkRUty/5Vx06ibaOP9RCrW1Pvb8yp3gvZhHwTDsJw==", "cpu": [ "arm" ], @@ -1413,9 +1413,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.1.tgz", - "integrity": "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.56.0.tgz", + "integrity": "sha512-uQVoKkrC1KGEV6udrdVahASIsaF8h7iLG0U0W+Xn14ucFwi6uS539PsAr24IEF9/FoDtzMeeJXJIBo5RkbNWvQ==", "cpu": [ "arm64" ], @@ -1427,9 +1427,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.1.tgz", - "integrity": "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.56.0.tgz", + "integrity": "sha512-vLZ1yJKLxhQLFKTs42RwTwa6zkGln+bnXc8ueFGMYmBTLfNu58sl5/eXyxRa2RarTkJbXl8TKPgfS6V5ijNqEA==", "cpu": [ "arm64" ], @@ -1441,9 +1441,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.1.tgz", - "integrity": "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.56.0.tgz", + "integrity": "sha512-FWfHOCub564kSE3xJQLLIC/hbKqHSVxy8vY75/YHHzWvbJL7aYJkdgwD/xGfUlL5UV2SB7otapLrcCj2xnF1dg==", "cpu": [ "loong64" ], @@ -1455,9 +1455,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.1.tgz", - "integrity": "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.56.0.tgz", + "integrity": "sha512-z1EkujxIh7nbrKL1lmIpqFTc/sr0u8Uk0zK/qIEFldbt6EDKWFk/pxFq3gYj4Bjn3aa9eEhYRlL3H8ZbPT1xvA==", "cpu": [ "loong64" ], @@ -1469,9 +1469,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.1.tgz", - "integrity": "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.56.0.tgz", + "integrity": "sha512-iNFTluqgdoQC7AIE8Q34R3AuPrJGJirj5wMUErxj22deOcY7XwZRaqYmB6ZKFHoVGqRcRd0mqO+845jAibKCkw==", "cpu": [ "ppc64" ], @@ -1483,9 +1483,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.1.tgz", - "integrity": "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.56.0.tgz", + "integrity": "sha512-MtMeFVlD2LIKjp2sE2xM2slq3Zxf9zwVuw0jemsxvh1QOpHSsSzfNOTH9uYW9i1MXFxUSMmLpeVeUzoNOKBaWg==", "cpu": [ "ppc64" ], @@ -1497,9 +1497,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.1.tgz", - "integrity": "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.56.0.tgz", + "integrity": "sha512-in+v6wiHdzzVhYKXIk5U74dEZHdKN9KH0Q4ANHOTvyXPG41bajYRsy7a8TPKbYPl34hU7PP7hMVHRvv/5aCSew==", "cpu": [ "riscv64" ], @@ -1511,9 +1511,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.1.tgz", - "integrity": "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.56.0.tgz", + "integrity": "sha512-yni2raKHB8m9NQpI9fPVwN754mn6dHQSbDTwxdr9SE0ks38DTjLMMBjrwvB5+mXrX+C0npX0CVeCUcvvvD8CNQ==", "cpu": [ "riscv64" ], @@ -1525,9 +1525,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.1.tgz", - "integrity": "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.56.0.tgz", + "integrity": "sha512-zhLLJx9nQPu7wezbxt2ut+CI4YlXi68ndEve16tPc/iwoylWS9B3FxpLS2PkmfYgDQtosah07Mj9E0khc3Y+vQ==", "cpu": [ "s390x" ], @@ -1539,9 +1539,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.1.tgz", - "integrity": "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.56.0.tgz", + "integrity": "sha512-MVC6UDp16ZSH7x4rtuJPAEoE1RwS8N4oK9DLHy3FTEdFoUTCFVzMfJl/BVJ330C+hx8FfprA5Wqx4FhZXkj2Kw==", "cpu": [ "x64" ], @@ -1552,9 +1552,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.1.tgz", - "integrity": "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.56.0.tgz", + "integrity": "sha512-ZhGH1eA4Qv0lxaV00azCIS1ChedK0V32952Md3FtnxSqZTBTd6tgil4nZT5cU8B+SIw3PFYkvyR4FKo2oyZIHA==", "cpu": [ "x64" ], @@ -1566,9 +1566,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.1.tgz", - "integrity": "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.56.0.tgz", + "integrity": "sha512-O16XcmyDeFI9879pEcmtWvD/2nyxR9mF7Gs44lf1vGGx8Vg2DRNx11aVXBEqOQhWb92WN4z7fW/q4+2NYzCbBA==", "cpu": [ "x64" ], @@ -1580,9 +1580,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.1.tgz", - "integrity": "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.56.0.tgz", + "integrity": "sha512-LhN/Reh+7F3RCgQIRbgw8ZMwUwyqJM+8pXNT6IIJAqm2IdKkzpCh/V9EdgOMBKuebIrzswqy4ATlrDgiOwbRcQ==", "cpu": [ "arm64" ], @@ -1594,9 +1594,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.1.tgz", - "integrity": "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.56.0.tgz", + "integrity": "sha512-kbFsOObXp3LBULg1d3JIUQMa9Kv4UitDmpS+k0tinPBz3watcUiV2/LUDMMucA6pZO3WGE27P7DsfaN54l9ing==", "cpu": [ "arm64" ], @@ -1608,9 +1608,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.1.tgz", - "integrity": "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.56.0.tgz", + "integrity": "sha512-vSSgny54D6P4vf2izbtFm/TcWYedw7f8eBrOiGGecyHyQB9q4Kqentjaj8hToe+995nob/Wv48pDqL5a62EWtg==", "cpu": [ "ia32" ], @@ -1622,9 +1622,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.1.tgz", - "integrity": "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.56.0.tgz", + "integrity": "sha512-FeCnkPCTHQJFbiGG49KjV5YGW/8b9rrXAM2Mz2kiIoktq2qsJxRD5giEMEOD2lPdgs72upzefaUvS+nc8E3UzQ==", "cpu": [ "x64" ], @@ -1636,9 +1636,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.1.tgz", - "integrity": "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.56.0.tgz", + "integrity": "sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g==", "cpu": [ "x64" ], @@ -1675,9 +1675,9 @@ } }, "node_modules/@sveltejs/adapter-node": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.4.0.tgz", - "integrity": "sha512-NMsrwGVPEn+J73zH83Uhss/hYYZN6zT3u31R3IHAn3MiKC3h8fjmIAhLfTSOeNHr5wPYfjjMg8E+1gyFgyrEcQ==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.5.2.tgz", + "integrity": "sha512-L15Djwpr7HrSAPj/Z8PYfc0pa9A1tllrr18phKI0WJHJeoWw45yinPf0IGgVTmakqx1B3JQ+C/OFl9ZwmxHU1Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1720,9 +1720,9 @@ } }, "node_modules/@sveltejs/kit": { - "version": "2.49.3", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.49.3.tgz", - "integrity": "sha512-luTmE2Isk9GRJnitqanLoByKBiyLdfLpV2qV9a25JMxjbQt919TVqG8pibJDkxTvX9+w2k/9IL7o+/RtG++3QA==", + "version": "2.50.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.50.1.tgz", + "integrity": "sha512-XRHD2i3zC4ukhz2iCQzO4mbsts081PAZnnMAQ7LNpWeYgeBmwMsalf0FGSwhFXBbtr2XViPKnFJBDCckWqrsLw==", "devOptional": true, "license": "MIT", "dependencies": { @@ -1731,7 +1731,7 @@ "@types/cookie": "^0.6.0", "acorn": "^8.14.1", "cookie": "^0.6.0", - "devalue": "^5.3.2", + "devalue": "^5.6.2", "esm-env": "^1.2.2", "kleur": "^4.1.5", "magic-string": "^0.30.5", @@ -1763,9 +1763,9 @@ } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.2.tgz", - "integrity": "sha512-9P/0sA/+lWxvRmJFGmVVoVQFeCIktv9bNju1Gc8h1Ptf/UeWCfVgpSy0CDdozVpQWfTvBZblttjrvo6ICxujdg==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.4.tgz", + "integrity": "sha512-ou/d51QSdTyN26D7h6dSpusAKaZkAiGM55/AKYi+9AGZw7q85hElbjK3kEyzXHhLSnRISHOYzVge6x0jRZ7DXA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -1812,9 +1812,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.90.16", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.16.tgz", - "integrity": "sha512-MvtWckSVufs/ja463/K4PyJeqT+HMlJWtw6PrCpywznd2NSgO3m4KwO9RqbFqGg6iDE8vVMFWMeQI4Io3eEYww==", + "version": "5.90.20", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.20.tgz", + "integrity": "sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg==", "license": "MIT", "funding": { "type": "github", @@ -1822,12 +1822,12 @@ } }, "node_modules/@tanstack/svelte-query": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/@tanstack/svelte-query/-/svelte-query-6.0.14.tgz", - "integrity": "sha512-gKuHxbyGP2pCQgE/Px9FtlyFmHTt0OV5xTrKrk7PMKGkv3LPWTTwDb7xlMDe1V7U2K5ci+jq1j3HsuTPqIZxjA==", + "version": "6.0.18", + "resolved": "https://registry.npmjs.org/@tanstack/svelte-query/-/svelte-query-6.0.18.tgz", + "integrity": "sha512-iGS8osfrIVUW5pkV4Ig6pspNIMtiNjGnVTNJKDas0m/QaNDFFIKbgg74rCzcjwrTIvO38tMpzb4VUKklvAmjxw==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.90.16" + "@tanstack/query-core": "5.90.20" }, "funding": { "type": "github", @@ -1875,9 +1875,9 @@ } }, "node_modules/@types/katex": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", - "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.8.tgz", + "integrity": "sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==", "license": "MIT" }, "node_modules/@types/mdast": { @@ -1896,9 +1896,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.30.tgz", + "integrity": "sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g==", "dev": true, "license": "MIT", "dependencies": { @@ -2037,29 +2037,30 @@ } }, "node_modules/better-auth": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/better-auth/-/better-auth-1.4.10.tgz", - "integrity": "sha512-0kqwEBJLe8eyFzbUspRG/htOriCf9uMLlnpe34dlIJGdmDfPuQISd4shShvUrvIVhPxsY1dSTXdXPLpqISYOYg==", + "version": "1.4.17", + "resolved": "https://registry.npmjs.org/better-auth/-/better-auth-1.4.17.tgz", + "integrity": "sha512-VmHGQyKsEahkEs37qguROKg/6ypYpNF13D7v/lkbO7w7Aivz0Bv2h+VyUkH4NzrGY0QBKXi1577mGhDCVwp0ew==", "license": "MIT", "dependencies": { - "@better-auth/core": "1.4.10", - "@better-auth/telemetry": "1.4.10", + "@better-auth/core": "1.4.17", + "@better-auth/telemetry": "1.4.17", "@better-auth/utils": "0.3.0", "@better-fetch/fetch": "1.1.21", "@noble/ciphers": "^2.0.0", "@noble/hashes": "^2.0.0", - "better-call": "1.1.7", + "better-call": "1.1.8", "defu": "^6.1.4", "jose": "^6.1.0", "kysely": "^0.28.5", "nanostores": "^1.0.1", - "zod": "^4.1.12" + "zod": "^4.3.5" }, "peerDependencies": { "@lynx-js/react": "*", "@prisma/client": "^5.0.0 || ^6.0.0 || ^7.0.0", "@sveltejs/kit": "^2.0.0", "@tanstack/react-start": "^1.0.0", + "@tanstack/solid-start": "^1.0.0", "better-sqlite3": "^12.0.0", "drizzle-kit": ">=0.31.4", "drizzle-orm": ">=0.41.0", @@ -2088,6 +2089,9 @@ "@tanstack/react-start": { "optional": true }, + "@tanstack/solid-start": { + "optional": true + }, "better-sqlite3": { "optional": true }, @@ -2133,9 +2137,9 @@ } }, "node_modules/better-call": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/better-call/-/better-call-1.1.7.tgz", - "integrity": "sha512-6gaJe1bBIEgVebQu/7q9saahVzvBsGaByEnE8aDVncZEDiJO7sdNB28ot9I6iXSbR25egGmmZ6aIURXyQHRraQ==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/better-call/-/better-call-1.1.8.tgz", + "integrity": "sha512-XMQ2rs6FNXasGNfMjzbyroSwKwYbZ/T3IxruSS6U2MJRsSYh3wYtG3o6H00ZlKZ/C/UPOAD97tqgQJNsxyeTXw==", "license": "MIT", "dependencies": { "@better-auth/utils": "^0.3.0", @@ -2306,9 +2310,9 @@ } }, "node_modules/core-js": { - "version": "3.47.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.47.0.tgz", - "integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==", + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", + "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", "hasInstallScript": true, "license": "MIT", "optional": true, @@ -2542,9 +2546,9 @@ } }, "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", "license": "ISC", "engines": { "node": ">=12" @@ -2807,9 +2811,9 @@ } }, "node_modules/decode-named-character-reference": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.2.0.tgz", - "integrity": "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", "license": "MIT", "dependencies": { "character-entities": "^2.0.0" @@ -2863,9 +2867,9 @@ } }, "node_modules/devalue": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.1.tgz", - "integrity": "sha512-jDwizj+IlEZBunHcOuuFVBnIMPAEHvTsJj0BcIp94xYguLRVBcXO853px/MyIJvbVzWdsGvrRweIUWJw8hBP7A==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.2.tgz", + "integrity": "sha512-nPRkjWzzDQlsejL1WVifk5rvcFi/y1onBRxjaFMjZeR9mFpqu2gmAZ9xUB9/IEanEP/vBtGeGganC/GO1fmufg==", "license": "MIT" }, "node_modules/devlop": { @@ -2910,9 +2914,9 @@ } }, "node_modules/es-toolkit": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.43.0.tgz", - "integrity": "sha512-SKCT8AsWvYzBBuUqMk4NPwFlSdqLpJwmy6AP322ERn8W2YLIB6JBXnwMI2Qsh2gfphT3q7EKAxKb23cvFHFwKA==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.44.0.tgz", + "integrity": "sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg==", "license": "MIT", "workspaces": [ "docs", @@ -2980,9 +2984,9 @@ "license": "MIT" }, "node_modules/esrap": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.1.tgz", - "integrity": "sha512-GiYWG34AN/4CUyaWAgunGt0Rxvr1PTMlGC0vvEov/uOQYWne2bpN03Um+k8jT+q3op33mKouP2zeJ6OlM+qeUg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.2.tgz", + "integrity": "sha512-zA6497ha+qKvoWIK+WM9NAh5ni17sKZKhbS5B3PoYbBvaYHZWoS33zmFybmyqpn07RLUxSmn+RCls2/XF+d0oQ==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" @@ -3001,9 +3005,9 @@ "license": "MIT" }, "node_modules/fast-equals": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.4.0.tgz", - "integrity": "sha512-jt2DW/aNFNwke7AUd+Z+e6pz39KO5rzdbbFCg2sGafS4mk13MI7Z8O5z9cADNn5lhGODIgLwug6TZO2ctf7kcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-6.0.0.tgz", + "integrity": "sha512-PFhhIGgdM79r5Uztdj9Zb6Tt1zKafqVfdMGwVca1z5z6fbX7DmsySSuJd8HiP6I1j505DCS83cLxo5rmSNeVEA==", "license": "MIT", "engines": { "node": ">=6.0.0" @@ -3521,9 +3525,9 @@ } }, "node_modules/kysely": { - "version": "0.28.9", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.9.tgz", - "integrity": "sha512-3BeXMoiOhpOwu62CiVpO6lxfq4eS6KMYfQdMsN/2kUCRNuF2YiEr7u0HLHaQU+O4Xu8YXE3bHVkwaQ85i72EuA==", + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.10.tgz", + "integrity": "sha512-ksNxfzIW77OcZ+QWSAPC7yDqUSaIVwkTWnTPNiIy//vifNbwsSgQ57OkkncHxxpcBHM3LRfLAZVEh7kjq5twVA==", "license": "MIT", "engines": { "node": ">=20.0.0" @@ -4752,9 +4756,9 @@ } }, "node_modules/prettier": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", - "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "dev": true, "license": "MIT", "bin": { @@ -5022,9 +5026,9 @@ "license": "Unlicense" }, "node_modules/rollup": { - "version": "4.55.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.1.tgz", - "integrity": "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==", + "version": "4.56.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.56.0.tgz", + "integrity": "sha512-9FwVqlgUHzbXtDg9RCMgodF3Ua4Na6Gau+Sdt9vyCN4RhHfVKX2DCHy3BjMLTDd47ITDhYAnTwGulWTblJSDLg==", "devOptional": true, "license": "MIT", "dependencies": { @@ -5038,31 +5042,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.55.1", - "@rollup/rollup-android-arm64": "4.55.1", - "@rollup/rollup-darwin-arm64": "4.55.1", - "@rollup/rollup-darwin-x64": "4.55.1", - "@rollup/rollup-freebsd-arm64": "4.55.1", - "@rollup/rollup-freebsd-x64": "4.55.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", - "@rollup/rollup-linux-arm-musleabihf": "4.55.1", - "@rollup/rollup-linux-arm64-gnu": "4.55.1", - "@rollup/rollup-linux-arm64-musl": "4.55.1", - "@rollup/rollup-linux-loong64-gnu": "4.55.1", - "@rollup/rollup-linux-loong64-musl": "4.55.1", - "@rollup/rollup-linux-ppc64-gnu": "4.55.1", - "@rollup/rollup-linux-ppc64-musl": "4.55.1", - "@rollup/rollup-linux-riscv64-gnu": "4.55.1", - "@rollup/rollup-linux-riscv64-musl": "4.55.1", - "@rollup/rollup-linux-s390x-gnu": "4.55.1", - "@rollup/rollup-linux-x64-gnu": "4.55.1", - "@rollup/rollup-linux-x64-musl": "4.55.1", - "@rollup/rollup-openbsd-x64": "4.55.1", - "@rollup/rollup-openharmony-arm64": "4.55.1", - "@rollup/rollup-win32-arm64-msvc": "4.55.1", - "@rollup/rollup-win32-ia32-msvc": "4.55.1", - "@rollup/rollup-win32-x64-gnu": "4.55.1", - "@rollup/rollup-win32-x64-msvc": "4.55.1", + "@rollup/rollup-android-arm-eabi": "4.56.0", + "@rollup/rollup-android-arm64": "4.56.0", + "@rollup/rollup-darwin-arm64": "4.56.0", + "@rollup/rollup-darwin-x64": "4.56.0", + "@rollup/rollup-freebsd-arm64": "4.56.0", + "@rollup/rollup-freebsd-x64": "4.56.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.56.0", + "@rollup/rollup-linux-arm-musleabihf": "4.56.0", + "@rollup/rollup-linux-arm64-gnu": "4.56.0", + "@rollup/rollup-linux-arm64-musl": "4.56.0", + "@rollup/rollup-linux-loong64-gnu": "4.56.0", + "@rollup/rollup-linux-loong64-musl": "4.56.0", + "@rollup/rollup-linux-ppc64-gnu": "4.56.0", + "@rollup/rollup-linux-ppc64-musl": "4.56.0", + "@rollup/rollup-linux-riscv64-gnu": "4.56.0", + "@rollup/rollup-linux-riscv64-musl": "4.56.0", + "@rollup/rollup-linux-s390x-gnu": "4.56.0", + "@rollup/rollup-linux-x64-gnu": "4.56.0", + "@rollup/rollup-linux-x64-musl": "4.56.0", + "@rollup/rollup-openbsd-x64": "4.56.0", + "@rollup/rollup-openharmony-arm64": "4.56.0", + "@rollup/rollup-win32-arm64-msvc": "4.56.0", + "@rollup/rollup-win32-ia32-msvc": "4.56.0", + "@rollup/rollup-win32-x64-gnu": "4.56.0", + "@rollup/rollup-win32-x64-msvc": "4.56.0", "fsevents": "~2.3.2" } }, @@ -5523,9 +5527,9 @@ } }, "node_modules/svelte": { - "version": "5.46.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.46.1.tgz", - "integrity": "sha512-ynjfCHD3nP2el70kN5Pmg37sSi0EjOm9FgHYQdC4giWG/hzO3AatzXXJJgP305uIhGQxSufJLuYWtkY8uK/8RA==", + "version": "5.48.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.48.0.tgz", + "integrity": "sha512-+NUe82VoFP1RQViZI/esojx70eazGF4u0O/9ucqZ4rPcOZD+n5EVp17uYsqwdzjUjZyTpGKunHbDziW6AIAVkQ==", "license": "MIT", "dependencies": { "@jridgewell/remapping": "^2.3.4", @@ -5536,7 +5540,7 @@ "aria-query": "^5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", - "devalue": "^5.5.0", + "devalue": "^5.6.2", "esm-env": "^1.2.1", "esrap": "^2.2.1", "is-reference": "^3.0.3", @@ -5630,9 +5634,9 @@ } }, "node_modules/svelteplot": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/svelteplot/-/svelteplot-0.5.3.tgz", - "integrity": "sha512-ssP5Z5o5FPHnwEOM44c7jTnUwVxCO1NZFP287hZAeRo3jLf5is6PtDEofSbe1kXdNIGh2NmcCwej0O/4KCpBOg==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/svelteplot/-/svelteplot-0.9.2.tgz", + "integrity": "sha512-Up6m8uRXBHFQLD0yi0uT1SZjvykysLOkjF9zSzx6W6/24l485hewWZMw4yKmDXZeXfwjgBSNlw0ic37LFDLnTg==", "license": "ISC", "dependencies": { "d3-array": "^3.2.4", @@ -5647,45 +5651,11 @@ "d3-scale-chromatic": "^3.1.0", "d3-shape": "^3.2.0", "d3-time": "^3.1.0", - "es-toolkit": "^1.41.0", - "fast-equals": "^5.3.2", + "es-toolkit": "^1.43.0", + "fast-equals": "^6.0.0", "interval-tree-1d": "^1.0.4", "merge-deep": "^3.0.3", - "svelte": "5.43.0" - } - }, - "node_modules/svelteplot/node_modules/is-reference": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", - "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.6" - } - }, - "node_modules/svelteplot/node_modules/svelte": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.0.tgz", - "integrity": "sha512-1sRxVbgJAB+UGzwkc3GUoiBSzEOf0jqzccMaVoI2+pI+kASUe9qubslxace8+Mzhqw19k4syTA5niCIJwfXpOA==", - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "@jridgewell/sourcemap-codec": "^1.5.0", - "@sveltejs/acorn-typescript": "^1.0.5", - "@types/estree": "^1.0.5", - "acorn": "^8.12.1", - "aria-query": "^5.3.1", - "axobject-query": "^4.1.0", - "clsx": "^2.1.1", - "esm-env": "^1.2.1", - "esrap": "^2.1.0", - "is-reference": "^3.0.3", - "locate-character": "^3.0.0", - "magic-string": "^0.30.11", - "zimmerframe": "^1.1.2" - }, - "engines": { - "node": ">=18" + "svelte": "5" } }, "node_modules/svg-pathdata": { @@ -5919,9 +5889,9 @@ } }, "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -6014,9 +5984,9 @@ } }, "node_modules/vite": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz", - "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", + "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -6162,9 +6132,9 @@ "license": "MIT" }, "node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/frontend/package.json b/frontend/package.json index abe7d2b1..832b316b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -58,8 +58,9 @@ "reveal.js": "^5.2.1", "sharp": "^0.34.2", "svelte-exmarkdown": "^5.0.1", - "svelteplot": "^0.5.3", + "svelteplot": "^0.9.2", "svg2pdf.js": "^2.5.0", + "tone": "^15.1.22", "valibot": "^1.1.0" }, "optionalDependencies": { diff --git a/frontend/src/lib/components/helpers/ScrollySnippets.svelte b/frontend/src/lib/components/helpers/ScrollySnippets.svelte index cec04df8..c88008bd 100644 --- a/frontend/src/lib/components/helpers/ScrollySnippets.svelte +++ b/frontend/src/lib/components/helpers/ScrollySnippets.svelte @@ -28,6 +28,7 @@ {@const active = state.scrollyIndex === i}
+ {i} {@render contentRenderer(step, active)}
diff --git a/frontend/src/lib/components/survey/SurveyQuestion.Checkbox.svelte b/frontend/src/lib/components/survey/SurveyQuestion.Checkbox.svelte deleted file mode 100644 index 214ce143..00000000 --- a/frontend/src/lib/components/survey/SurveyQuestion.Checkbox.svelte +++ /dev/null @@ -1,158 +0,0 @@ - - -
-
-

{question}

-
-
- {#each options as option} - - {/each} -
-
- {#if saveMessage} - - {saveMessage} - - {/if} -
-
- - diff --git a/frontend/src/lib/components/survey/SurveyQuestion.Radio.svelte b/frontend/src/lib/components/survey/SurveyQuestion.Radio.svelte deleted file mode 100644 index 598faafb..00000000 --- a/frontend/src/lib/components/survey/SurveyQuestion.Radio.svelte +++ /dev/null @@ -1,144 +0,0 @@ - - -
-

{question}

-
-
- - {#each options as option} -
- - {option.label} - {#if value === option.value && saveMessage} - - {saveMessage} - - {/if} -
- {/each} -
- {#if errors} - {#each errors as error} -

{error.message}

- {/each} - {/if} -
- - \ No newline at end of file diff --git a/frontend/src/lib/components/survey/SurveyQuestion.svelte b/frontend/src/lib/components/survey/SurveyQuestion.svelte deleted file mode 100644 index 4d60e6ad..00000000 --- a/frontend/src/lib/components/survey/SurveyQuestion.svelte +++ /dev/null @@ -1,59 +0,0 @@ - - -{#if multiple} - -{:else} - -{/if} \ No newline at end of file diff --git a/frontend/src/lib/components/survey/SurveyScrolly.svelte b/frontend/src/lib/components/survey/SurveyScrolly.svelte deleted file mode 100644 index b172a24a..00000000 --- a/frontend/src/lib/components/survey/SurveyScrolly.svelte +++ /dev/null @@ -1,86 +0,0 @@ - - - -{#snippet surveyScrollyContent(surveyItems, scrollyState, userFingerprint, saveAnswer, answers)} -
- - {#each surveyItems as item, i} - {@const active = scrollyState.scrollyIndex === i} -
-
- {#if item.type === 'question'} - - {:else} - {@render renderTextContent(item)} - {/if} -
-
- {/each} -
-
-
-{/snippet} - - diff --git a/frontend/src/lib/stories/dark-data-survey/components/ACESSlider.svelte b/frontend/src/lib/stories/dark-data-survey/components/ACESSlider.svelte new file mode 100644 index 00000000..18c2384f --- /dev/null +++ b/frontend/src/lib/stories/dark-data-survey/components/ACESSlider.svelte @@ -0,0 +1,151 @@ + + +
+ + {#snippet children({ tickItems, thumbItems })} + + + + {#each thumbItems as { index } (index)} + + {/each} + {#each tickItems as { index, value: tickValue } (index)} + + {#if tickValue % 1 === 0 && tickValue <= 6} + + {Math.floor(tickValue)} + + {/if} + {/each} + {/snippet} + +
+ + diff --git a/frontend/src/lib/stories/dark-data-survey/components/BarChartRank.svelte b/frontend/src/lib/stories/dark-data-survey/components/BarChartRank.svelte deleted file mode 100644 index 7d209feb..00000000 --- a/frontend/src/lib/stories/dark-data-survey/components/BarChartRank.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - - - labelMap[d.types] } - {fill} - stroke="grey" - sort={{ channel: '-y' }} /> - - diff --git a/frontend/src/lib/stories/dark-data-survey/components/ConsentPopup.svelte b/frontend/src/lib/stories/dark-data-survey/components/ConsentPopup.svelte deleted file mode 100644 index 048ac533..00000000 --- a/frontend/src/lib/stories/dark-data-survey/components/ConsentPopup.svelte +++ /dev/null @@ -1,129 +0,0 @@ - - -{#if showPopup} - -{/if} - - diff --git a/frontend/src/lib/stories/dark-data-survey/components/Dashboard.svelte b/frontend/src/lib/stories/dark-data-survey/components/Dashboard.svelte index d7c0e614..c8744a41 100644 --- a/frontend/src/lib/stories/dark-data-survey/components/Dashboard.svelte +++ b/frontend/src/lib/stories/dark-data-survey/components/Dashboard.svelte @@ -1,17 +1,15 @@
@@ -101,26 +71,19 @@
-
@@ -138,7 +101,7 @@
- {#each categoryOptions as option} {/each} @@ -147,7 +110,7 @@
- {#each valueOptions as option} {/each} diff --git a/frontend/src/lib/stories/dark-data-survey/components/Index.svelte b/frontend/src/lib/stories/dark-data-survey/components/Index.svelte index 8c5f1405..2d6977a2 100644 --- a/frontend/src/lib/stories/dark-data-survey/components/Index.svelte +++ b/frontend/src/lib/stories/dark-data-survey/components/Index.svelte @@ -1,102 +1,20 @@ - -
-

Tell us about yourself (optional)

- -
-
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
- - diff --git a/frontend/src/lib/stories/dark-data-survey/components/TrustDistributionChart.svelte b/frontend/src/lib/stories/dark-data-survey/components/TrustDistributionChart.svelte index 286238b7..db774a67 100644 --- a/frontend/src/lib/stories/dark-data-survey/components/TrustDistributionChart.svelte +++ b/frontend/src/lib/stories/dark-data-survey/components/TrustDistributionChart.svelte @@ -26,29 +26,31 @@ requestAnimationFrame(() => { // Update or create institution objects in the map filteredData.forEach(item => { - if (!institutionMap.has(item.institution)) { - institutionMap.set(item.institution, { - institution: item.institution, - distance: Number(item.distance) + if (!institutionMap.has(item.Trust_Category)) { + institutionMap.set(item.Trust_Category, { + Trust_Category: item.Trust_Category, + Average_Trust: Number(item.Average_Trust) }); } else { // Update distance on existing object - institutionMap.get(item.institution).distance = Number(item.distance); + institutionMap.get(item.Trust_Category).distance = Number(item.Average_Trust); } }); // Get objects from map and sort them - reuse existing objects const items = Array.from(institutionMap.values()) - .filter(item => filteredData.some(fd => fd.institution === item.institution)); + .filter(item => filteredData.some(fd => fd.Trust_Category === item.Trust_Category)); // Sort in place using the same object references - items.sort((a, b) => a.distance - b.distance); + items.sort((a, b) => a.Average_Trust - b.Average_Trust); // Update state array (triggers reactivity while keeping object refs) distributionData = items; }); }); + $inspect(distributionData) + // Institution to icon mapping - updated for new data format const institutionIcons = { 'TP_Friend': Heart, @@ -105,18 +107,18 @@
- {#each distributionData as item, i (item.institution)} + {#each distributionData as item, i (item.Trust_Category)} {@const maxBarWidth = 100} - {@const barWidth = Math.max(2, (Number(item.distance) / maxDistance) * maxBarWidth)} - {@const IconComponent = institutionIcons[item.institution] || UserX} - {@const name = institutionLabels[item.institution] || item.institution.replace('TP_', '').replace(/_/g, ' ')} - {@const isHighlighted = item.institution === highlightCircle} + {@const barWidth = Math.max(2, (Number(item.Average_Trust) / maxDistance) * maxBarWidth)} + {@const IconComponent = institutionIcons[item.Trust_Category] || UserX} + {@const name = institutionLabels[item.Trust_Category] || item.Trust_Category.replace('TP_', '').replace(/_/g, ' ')} + {@const isHighlighted = item.Trust_Category === highlightCircle}
onInstitutionClick?.(item.institution)} - onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onInstitutionClick?.(item.institution); } }} + onclick={() => onInstitutionClick?.(item.Trust_Category)} + onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onInstitutionClick?.(item.Trust_Category); } }} role={onInstitutionClick ? "button" : undefined} tabindex={onInstitutionClick ? 0 : undefined} aria-label={onInstitutionClick ? `Select ${name}` : undefined} @@ -144,13 +146,13 @@
- {Number(item.distance).toFixed(2)} + {Number(item.Average_Trust).toFixed(2)}
{/each} diff --git a/frontend/src/lib/stories/dark-data-survey/components/TrustEvo.svelte b/frontend/src/lib/stories/dark-data-survey/components/TrustEvo.svelte index cb07265f..04651a43 100644 --- a/frontend/src/lib/stories/dark-data-survey/components/TrustEvo.svelte +++ b/frontend/src/lib/stories/dark-data-survey/components/TrustEvo.svelte @@ -4,17 +4,13 @@ import { extent } from 'd3-array'; import TrustDistributionChart from './TrustDistributionChart.svelte'; - import Controls from './Controls.svelte'; - import TrustCircles from './TrustCircles.svelte'; - import IndividualPoints from './IndividualPoints.svelte'; - // import DataPanel from './DataPanel.svelte'; + import ACESSlider from './ACESSlider.svelte'; + import TrustSonification from './TrustSonification.svelte'; import { institutionColorMap, getInstitutionColor } from '../utils/institutionColors.js'; - // load data - import trust_circles from '../data/trust_circles.csv'; - // import trust_circles_individual from '../data/trust_circles_individual.csv'; let { + data, scrollyIndex, width, height, @@ -23,20 +19,20 @@ storySection, conclusionVisible = false, externalCategory = undefined, - externalValue = undefined, externalHighlight = undefined, - onInstitutionClick = undefined + onInstitutionClick = undefined, + showACESSlider = false, + acesValue = $bindable(0) } = $props(); // Track if story section is in viewport let storySectionVisible = $state(false); + let sonificationData = $state([]); - // Track DataPanel collapse state - let isCollapsed = $state(true); - - const TIMEPOINT = 1; - const GENDER = 0; // 0=Women/1=Men - const INST = "TP_Police"; + $effect(() => { + scrollyIndex; + sonificationData = Array.isArray(data) ? [...data] : []; + }); $effect(() => { if (typeof window !== 'undefined' && storySection) { @@ -51,167 +47,108 @@ }); // Manual filter controls for interactive phase - let selectedDemCategory = $state('overall_average'); - let selectedValue = $state("1.0"); + let selectedDemCategory = $state('Dem_Gender_Woman'); let highlightCircle = $state(""); - // Get available categories and values - const categories = [...new Set(trust_circles.map(d => d.category))]; - const getValuesForCategory = (cat) => [...new Set(trust_circles.filter(d => d.category === cat).map(d => d.value))]; - - // Available demographic categories and their values: - // - overall_average: 1.0 (baseline) - // - gender_ord: 0 (Women), 1 (Men) - // - Dem_Relationship_Status_Single: 0 (Not Single), 1 (Single) - // - orientation_ord: 0 (Straight), 1 (Bisexual), 2 (Gay), 3 (Other) - // - race_ord: 0 (White), 1 (Mixed), 2 (POC) + // Available demographic values in new format: + // - Dem_Gender_Woman, Dem_Gender_Man, Dem_Gender_Other + // - ACES_No, ACES_Yes (ACES_Compound exists in data but not used in storytelling) $effect(() => { + console.log(data) // If external props are provided (dashboard mode), use those instead of scrollyIndex if (externalCategory !== undefined) { selectedDemCategory = externalCategory; - selectedValue = externalValue || "1.0"; highlightCircle = externalHighlight || ""; return; } // Otherwise use scrollyIndex to control state switch (scrollyIndex) { - // missing cases default to overall average. + // missing cases default to Dem_Gender_Woman baseline case 1: - selectedDemCategory = 'overall_average'; - selectedValue = "1.0"; + selectedDemCategory = 'Dem_Gender_Woman'; highlightCircle = "TP_Platform"; break; case 2: - selectedDemCategory = 'multi_platform_ord'; - selectedValue = "1.0"; + selectedDemCategory = 'Dem_Gender_Woman'; highlightCircle = "TP_Platform"; break; case 3: - selectedDemCategory = 'multi_platform_ord'; - selectedValue = "4.0"; + selectedDemCategory = 'Dem_Gender_Man'; highlightCircle = "TP_Platform"; break; case 4: - selectedDemCategory = 'overall_average'; - selectedValue = "1.0"; + selectedDemCategory = 'Dem_Gender_Woman'; highlightCircle = ""; break; case 5: - selectedDemCategory = 'orientation_ord'; - selectedValue = "0.0"; - highlightCircle = "TP_Police"; + selectedDemCategory = 'Dem_Gender_Woman'; + highlightCircle = "TP_Medical"; break; case 6: - selectedDemCategory = 'orientation_ord'; - selectedValue = "1.0"; - highlightCircle = "TP_Police"; + selectedDemCategory = 'Dem_Gender_Man'; + highlightCircle = "TP_Medical"; break; case 7: - selectedDemCategory = 'orientation_ord'; - selectedValue = "0.0"; - highlightCircle = "TP_Relative"; + selectedDemCategory = 'Dem_Gender_Woman'; + highlightCircle = ""; break; case 8: - selectedDemCategory = 'orientation_ord'; - selectedValue = "1.0"; - highlightCircle = "TP_Relative"; + selectedDemCategory = 'Dem_Gender_Man'; + highlightCircle = "TP_Police"; break; case 9: - selectedDemCategory = 'overall_average'; - selectedValue = "1.0"; - highlightCircle = ""; + selectedDemCategory = 'Dem_Gender_Other'; + highlightCircle = "TP_Police"; break; case 10: - selectedDemCategory = 'ACES_Compound'; - selectedValue = "0.0"; - highlightCircle = "TP_Relative"; + selectedDemCategory = 'Dem_Gender_Woman'; + highlightCircle = ""; break; case 11: - selectedDemCategory = 'ACES_Compound'; - selectedValue = "8.0"; + selectedDemCategory = 'ACES_0.0'; + acesValue = 0.0; highlightCircle = "TP_Relative"; break; case 12: - selectedDemCategory = 'ACES_Compound'; - selectedValue = "9.0"; + selectedDemCategory = 'ACES_1.25'; + acesValue = 1.25; highlightCircle = "TP_Relative"; break; case 13: - selectedDemCategory = 'ACES_Compound'; - selectedValue = "9.0"; - highlightCircle = "TP_Acquaintance"; + selectedDemCategory = 'ACES_2.25'; + acesValue = 2.25; + highlightCircle = "TP_Relative"; break; case 14: - selectedDemCategory = 'ACES_Compound'; - selectedValue = "9.0"; - highlightCircle = "TP_NonProf"; + selectedDemCategory = 'ACES_4.25'; + acesValue = 4.25; + highlightCircle = "TP_Relative"; + break; + case 15: + selectedDemCategory = 'ACES_5.25+'; + acesValue = 5.25; + highlightCircle = "TP_Relative"; break; default: - selectedDemCategory = 'overall_average'; - selectedValue = "1.0"; + selectedDemCategory = 'Dem_Gender_Woman'; highlightCircle = ""; } }) // Simple filter - return new array (this is fine, flip doesn't depend on this) let filteredCircles = $derived.by(() => - trust_circles.filter((c) => - c.Timepoint == TIMEPOINT && - c.value == selectedValue && - c.category == selectedDemCategory + data.filter((c) => c.Demographic == selectedDemCategory ) ) - - // Individual data points for visualization - const individualPoints = $derived(() => { - if (scrollyIndex !== 1) return []; - - // Filter for current demographic and institution - const filteredPoliceData = trust_circles_individual.filter(d => { - return d.gender_ord == GENDER && d.institution === INST && d.Timepoint == TIMEPOINT; - }); - - // Position each point around the police trust circle - const positionedPoints = []; - - // Race color mapping - const raceColors = { - 0: '#3b82f6', // Blue for White - 1: '#f59e0b', // Amber for Mixed - 2: '#ef4444' // Red for POC - }; - - filteredPoliceData.forEach((point, i) => { - const distance = parseFloat(point.distance); - const pointRadius = radiusScale(distance); - const raceValue = point.race_ord; - const orientationValue = point.orientation_ord; - - // Spread points evenly around the circle at the exact radius for their trust level - const angle = (i / filteredPoliceData.length) * 2 * Math.PI; - - const x = centerX + Math.cos(angle) * pointRadius; - const y = centerY + Math.sin(angle) * pointRadius; - - positionedPoints.push({ - ...point, - x: x, - y: y, - baseRadius: pointRadius, - trustLevel: distance, - raceColor: raceColors[raceValue] || '#6b7280', - raceLabel: raceValue === "0" ? 'White' : raceValue === "1" ? 'Mixed' : raceValue === "2" ? 'POC' : 'Unknown', - orientationLabel: orientationValue === "0" ? 'Straight' : - orientationValue === "1" ? 'Bisexual' : - orientationValue === "2" ? 'Gay' : - orientationValue === "3" ? 'Other' : 'Unknown' - }); - }); - return positionedPoints; + // Trust value of the currently highlighted institution under the active demographic filter. + let highlightedValue = $derived.by(() => { + if (!highlightCircle) return null; + const circle = filteredCircles.find(c => c.Trust_Category === highlightCircle); + return circle ? +circle.Average_Trust : null; }); - + // TRUST CIRCLES PLOTTING --- // Use the responsive width/height from props @@ -220,7 +157,7 @@ const centerY = $derived(isDashboard ? height * 0.5 : height * 0.6); const maxRadius = $derived(isDashboard ? height * 0.95 : height * 0.43); - const zScale = $derived(scaleSequential(interpolateRdYlGn).domain(extent(trust_circles.map(d=>d.distance)))); + const zScale = $derived(scaleSequential(interpolateRdYlGn).domain(extent(trust_circles.map(d=>d.Average_Trust)))); // Likert scale from 1 to 7 const radiusScale = $derived(scaleLinear().domain([1, 7]).range([50, maxRadius])); @@ -232,18 +169,21 @@
+ {#if !isDashboard} + + {/if}
{#each filteredCircles as circle} - {@const isHighlighted = circle.institution === highlightCircle} + {@const isHighlighted = circle.Trust_Category === highlightCircle} {@const hasHighlight = highlightCircle !== ""}
- - - - + {#if showACESSlider} +
+
- {/if} --> - + {/if} + {#if !isDashboard}
+ import * as Tone from 'tone'; + import { onDestroy, onMount } from 'svelte'; + import softPianoUrl from '../data/sounds/soft-piano.wav'; + + // Tempo bounds when all groups are playing together. + const ALL_MIN_TEMPO_BPM = 2; + const ALL_MAX_TEMPO_BPM = 30; + // Tempo bounds when the highlight feature isolates a single group. + const HIGHLIGHT_MIN_TEMPO_BPM = 10; + const HIGHLIGHT_MAX_TEMPO_BPM = 120; + // true → higher trust value = faster tempo + // false → higher trust value = slower tempo + const HIGH_VALUE_IS_FAST = true; + // Expected data range for tempo mapping — values outside this range are clamped by the linear scale. + const DATA_VALUE_MIN = 2; + const DATA_VALUE_MAX = 6; + + // Component inputs: raw trust rows and the currently highlighted Trust_Category (e.g. "TP_Platform"). + // When highlightCircle is set, only the corresponding group plays. + let { data = [], highlightCircle = '', highlightedValue = null } = $props(); + + // Runtime flags/registries for audio session management. + let isReady = $state(false); + let playerRegistry = new Map(); + let masterLimiter = null; + let pointerListenerAttached = false; + let audioEnabled = $state(false); + let lastSignature = $state(''); + + // Plain JS ref read by every loop callback. Updated by the highlight $effect. + // activeGroup: null means all groups play; a group name isolates to that group. + // activeNote: when set, overrides the group's default note with the specific institution's note. + const highlightRef = { activeGroup: null, activeNote: null }; + + // Maps survey trust categories to broader musical groups. + const institutionGroupMap = { + // Green: Intimate/close relationships + 'TP_Friend': 'intimate', + 'TP_Relative': 'intimate', + 'TP_Neighbor': 'intimate', + 'TP_Acquaintance': 'intimate', + + // Blue: Professional peers + 'TP_Co_worker': 'professional', + + // Purple: Semi-institutional (Educational, Employer, Researcher, Non-Profits) + 'TP_School': 'semi-institutional', + 'TP_Employer': 'semi-institutional', + 'TP_Researcher': 'semi-institutional', + 'TP_NonProf': 'semi-institutional', + + // Orange/Red: Institutions handling sensitive data + 'TP_Platform': 'sensitive', + 'TP_Gov': 'sensitive', + 'TP_Police': 'sensitive', + 'TP_Financial': 'sensitive', + 'TP_Medical': 'sensitive', + + // Amber: Commercial entities + 'TP_Company_cust': 'commercial', + 'TP_Company_notcust': 'commercial', + + // Gray: Strangers/unknown + 'TP_Stranger': 'unknown' + }; + + const groupNoteMap = { + intimate: 'C3', + professional: 'D3', + 'semi-institutional': 'Eb3', + sensitive: 'G4', + commercial: 'A4', + unknown: 'B4' + }; + + // Per-institution notes used when a specific ring is highlighted. + // Institutions within the same group (e.g. TP_Platform/TP_Police/TP_Medical → "sensitive") + // would otherwise all play the same group note — this gives each its own pitch. + const institutionNoteMap = { + 'TP_Friend': 'C3', + 'TP_Relative': 'D3', + 'TP_Neighbor': 'E3', + 'TP_Acquaintance': 'F3', + 'TP_Co_worker': 'G3', + 'TP_School': 'A3', + 'TP_Employer': 'B3', + 'TP_Researcher': 'C4', + 'TP_NonProf': 'D4', + 'TP_Platform': 'E4', + 'TP_Gov': 'F4', + 'TP_Police': 'G4', + 'TP_Financial': 'A4', + 'TP_Medical': 'B4', + 'TP_Company_cust': 'C5', + 'TP_Company_notcust': 'D5', + 'TP_Stranger': 'E5' + }; + + const groupVolumeMap = { + intimate: -18, + professional: -20, + 'semi-institutional': -22, + sensitive: -24, + commercial: -21, + unknown: -26 + }; + + // Aggregate raw rows into a per-group average trust value. + const groupByCategory = (rows) => { + const totals = new Map(); + const counts = new Map(); + + for (const row of rows || []) { + const rawCategory = row?.Trust_Category; + const value = Number(row?.Average_Trust); + if (!rawCategory || Number.isNaN(value)) continue; + + // Convert granular category into our broader sonification bucket. + const category = institutionGroupMap[rawCategory] || rawCategory; + + // console.log(`Processing row with category "${rawCategory}" mapped to "${category}" and value ${value}`); + + totals.set(category, (totals.get(category) || 0) + value); + counts.set(category, (counts.get(category) || 0) + 1); + } + + const grouped = []; + for (const [category, total] of totals.entries()) { + const count = counts.get(category) || 1; + grouped.push({ category, average: total / count }); + } + + grouped.sort((a, b) => a.category.localeCompare(b.category)); + return grouped; + }; + + // Linearly map a trust value to a tempo. Direction controlled by HIGH_VALUE_IS_FAST. + const tempoFromValue = (value, dataMin, dataMax, tempoMin, tempoMax) => { + if (dataMax <= dataMin) return tempoMin; + const normalized = (value - dataMin) / (dataMax - dataMin); + return HIGH_VALUE_IS_FAST + ? tempoMin + normalized * (tempoMax - tempoMin) + : tempoMax - normalized * (tempoMax - tempoMin); + }; + + // Defensive teardown helper for a category player. + const stopAndDispose = (entry) => { + try { + entry.loop.stop(); + } catch { + // Ignore if already stopped. + } + entry.loop.dispose(); + entry.synth.dispose(); + }; + + // Loops are only started when audio has been explicitly enabled. + const ensureLoopStarted = (loop) => { + if (audioEnabled && loop.state !== 'started') { + loop.start(0); + } + }; + + // Reconcile existing synth/loop players with latest grouped assignments. + const syncPlayers = (assignments) => { + // Remove players for categories no longer present in the data. + const activeCategories = new Set(assignments.map((entry) => entry.category)); + for (const [category, entry] of playerRegistry.entries()) { + if (!activeCategories.has(category)) { + stopAndDispose(entry); + playerRegistry.delete(category); + } + } + + if (!assignments.length) return; + + for (const entry of assignments) { + // Lazily create a synth + loop for each category the first time it appears. + const existing = playerRegistry.get(entry.category); + if (!existing) { + if (!masterLimiter) { + masterLimiter = new Tone.Limiter(-3).toDestination(); + } + + const synth = new Tone.Sampler({ + urls: { C4: softPianoUrl } + }).connect(masterLimiter); + + const noteRef = { value: 'C4' }; + const volumeRef = { value: -12 }; + const groupCategory = entry.category; + + const loop = new Tone.Loop((time) => { + const active = highlightRef.activeGroup; + if (active !== null && active !== groupCategory) return; + synth.volume.value = volumeRef.value; + synth.triggerAttack(highlightRef.activeNote ?? noteRef.value, time); + }, 1); + + playerRegistry.set(entry.category, { synth, loop, noteRef, volumeRef }); + ensureLoopStarted(loop); + } + + const registryEntry = playerRegistry.get(entry.category); + if (!registryEntry) continue; + + // Keep timbre fixed by group, but vary tempo from trust strength. + const bpm = tempoFromValue(entry.average, DATA_VALUE_MIN, DATA_VALUE_MAX, ALL_MIN_TEMPO_BPM, ALL_MAX_TEMPO_BPM); + const intervalSeconds = 60 / bpm; + registryEntry.loop.interval = intervalSeconds; + registryEntry.noteRef.value = groupNoteMap[entry.category] || 'C4'; + registryEntry.volumeRef.value = groupVolumeMap[entry.category] ?? -12; + } + }; + + // Initialize/resume WebAudio and start all loops. + const startAudio = async () => { + if (!isReady) { + await Tone.start(); + await Tone.loaded(); + isReady = true; + } else { + await Tone.getContext().resume(); + } + + audioEnabled = true; + Tone.Destination.mute = false; + Tone.Transport.start(); + + for (const entry of playerRegistry.values()) { + ensureLoopStarted(entry.loop); + } + }; + + // Pause transport and silence output without disposing players. + const stopAudio = async () => { + audioEnabled = false; + Tone.Destination.mute = true; + Tone.Transport.pause(); + }; + + // UI handler for enable/disable button. + const toggleAudio = async () => { + if (audioEnabled) { + await stopAudio(); + } else { + await startAudio(); + } + }; + + // Browsers require a user gesture before audio can start; attach one-time listeners. + const attachPointerListener = () => { + if (pointerListenerAttached || typeof window === 'undefined') return; + + pointerListenerAttached = true; + const onFirstPointer = () => startAudio(); + const options = { once: true, passive: true }; + + window.addEventListener('pointerdown', onFirstPointer, options); + window.addEventListener('touchstart', onFirstPointer, options); + window.addEventListener('keydown', onFirstPointer, options); + + onDestroy(() => { + window.removeEventListener('pointerdown', onFirstPointer, options); + window.removeEventListener('touchstart', onFirstPointer, options); + window.removeEventListener('keydown', onFirstPointer, options); + }); + }; + + onMount(() => { + attachPointerListener(); + }); + + // Reactively recompute category assignments whenever `data` changes. + $effect(() => { + const grouped = groupByCategory(data); + const assignments = grouped; + syncPlayers(assignments); + + // Signature lets us detect meaningful data changes and re-phase loops. + const signature = assignments + .map((entry) => `${entry.category}:${entry.average.toFixed(3)}`) + .join('|'); + + if (signature && signature !== lastSignature) { + lastSignature = signature; + if (audioEnabled) { + // Restart loops together so updates sound synchronized. + for (const entry of playerRegistry.values()) { + entry.loop.stop(); + entry.loop.start(0); + } + } + } + }); + + // Keep highlightRef in sync with the prop. All loop callbacks read highlightRef.activeGroup + // at fire time, so this takes effect on the next trigger of each loop. + $effect(() => { + highlightRef.activeGroup = highlightCircle ? institutionGroupMap[highlightCircle] : null; + highlightRef.activeNote = highlightCircle ? (institutionNoteMap[highlightCircle] ?? null) : null; + + // When a specific institution is highlighted, drive its loop tempo from the + // live trust value (1–7 Likert scale) rather than the group average. + if (highlightedValue !== null && highlightRef.activeGroup) { + const bpm = tempoFromValue(highlightedValue, DATA_VALUE_MIN, DATA_VALUE_MAX, HIGHLIGHT_MIN_TEMPO_BPM, HIGHLIGHT_MAX_TEMPO_BPM); + const player = playerRegistry.get(highlightRef.activeGroup); + if (player) player.loop.interval = 60 / bpm; + } + }); + + // Full cleanup on component teardown. + onDestroy(() => { + for (const entry of playerRegistry.values()) { + stopAndDispose(entry); + } + playerRegistry.clear(); + masterLimiter?.dispose(); + masterLimiter = null; + }); + + +
+ +
+ + diff --git a/frontend/src/lib/stories/dark-data-survey/components/WaffleChart.svelte b/frontend/src/lib/stories/dark-data-survey/components/WaffleChart.svelte new file mode 100644 index 00000000..9476c249 --- /dev/null +++ b/frontend/src/lib/stories/dark-data-survey/components/WaffleChart.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/frontend/src/lib/stories/dark-data-survey/data/copy.json b/frontend/src/lib/stories/dark-data-survey/data/copy.json index 6dc5cc51..8bb39414 100644 --- a/frontend/src/lib/stories/dark-data-survey/data/copy.json +++ b/frontend/src/lib/stories/dark-data-survey/data/copy.json @@ -1,81 +1,4 @@ { - "survey": [ - { - "type": "question", - "value": { - "question": "Are your social media profiles typically public or private?", - "name": "socialMediaPrivacy", - "options": [ - { "value": "private", "label": "Private" }, - { "value": "mixed", "label": "Mixed" }, - { "value": "public", "label": "Public" } - ] - } - }, - { - "type": "question", - "value": { - "question": "Which social media platforms do you use? (multiple choices)", - "name": "platformMatters", - "multiple": true, - "options": [ - { "value": "Twitter", "label": "Twitter" }, - { "value": "Instagram", "label": "Instagram" }, - { "value": "Facebook", "label": "Facebook" }, - { "value": "TikTok", "label": "TikTok" }, - { "value": "Other", "label": "Other" } - ] - } - }, - { - "type": "question", - "value": { - "question": "How comfortable are you with sharing your personally identifiable data with a relative?", - "name": "relativePreferences", - "options": [ - { "value": "1", "label": "Very Comfortable" }, - { "value": "2", "label": "Comfortable" }, - { "value": "3", "label": "Slightly comfortable" }, - { "value": "4", "label": "Neutral" }, - { "value": "5", "label": "Slightly Uncomfortable" }, - { "value": "6", "label": "Uncomfortable" }, - { "value": "7", "label": "Very Uncomfortable" } - ] - } - }, - { - "type": "question", - "value": { - "question": "How comfortable are you with sharing your personally identifiable with the government?", - "name": "govPreferences", - "options": [ - { "value": "1", "label": "Very Comfortable" }, - { "value": "2", "label": "Comfortable" }, - { "value": "3", "label": "Slightly comfortable" }, - { "value": "4", "label": "Neutral" }, - { "value": "5", "label": "Slightly Uncomfortable" }, - { "value": "6", "label": "Uncomfortable" }, - { "value": "7", "label": "Very Uncomfortable" } - ] - } - }, - { - "type": "question", - "value": { - "question": "How comfortable are you with sharing your personally identifiable with the police?", - "name": "polPreferences", - "options": [ - { "value": "1", "label": "Very Comfortable" }, - { "value": "2", "label": "Comfortable" }, - { "value": "3", "label": "Slightly comfortable" }, - { "value": "4", "label": "Neutral" }, - { "value": "5", "label": "Slightly Uncomfortable" }, - { "value": "6", "label": "Uncomfortable" }, - { "value": "7", "label": "Very Uncomfortable" } - ] - } - } - ], "title": "A Taste for Privacy", "subtitle": "When do people give up their privacy?", "author1": "Jonathan St-Onge", @@ -88,11 +11,11 @@ }, { "type": "markdown", - "value": "Privacy depends on who you are and the context. Your willingness to share data varies dramatically across different institutions and relationships." + "value": "People willingness to share data varies dramatically across institutions and relationships." }, { "type": "markdown", - "value": "In this survey, we asked undergraduate students at the University of Vermont about their relative trust in different institutions. In this story, we look at a snapshot of a much longer survey that is ongoing, examining 416 responses from January 2023." + "value": "In this survey, we asked 712 college students about their relative trust in different institutions. In this story, we look at a snapshot of a much longer survey that is ongoing, examining 2,912 responses over seven survey periods during 2023 and 2024." }, { "type": "markdown", @@ -100,7 +23,7 @@ }, { "type": "component", - "component": "chart-rank" + "value": "WaffleChart" }, { "type": "markdown", @@ -135,43 +58,47 @@ }, { "type": "markdown", - "value": "In our survey, we also asked about sexual orientation. For instance, we were interested in the relationship between institutions such as the police and sexual orientation. Here it is for people identifying as straight." + "value": "In our survey, we first compared how responses varied by demographic groups. For instance, we were interested in the relationship between the medical institution and gender. Here's how Women feel about sharing data with medical professionals." + }, + { + "type": "markdown", + "value": "And here's how Men feel about sharing data with medical professionals. Recall that when circles are closer to the center, it means the given group is more comfortable." }, { "type": "markdown", - "value": "Here are the circles of trust for bisexual people, which are almost one rating scale lower than for straight people." + "value": "Let's return to the overall average as our anchor." }, { "type": "markdown", - "value": "But that’s not all." + "value": "Now let's look at how different gender groups feel about sharing data with the police. Here's how Men feel about sharing data with police." }, { "type": "markdown", - "value": "Notice also how relatives are less trusted with data." + "value": "And here's how Non-binary individuals feel about sharing data with police." }, { "type": "markdown", - "value": "We have one last part of the story to tell." + "value": "Back to the overall average. We have one last part of the story to tell." }, { "type": "markdown", - "value": "No adverse childhood experiences. This represents most people." + "value": "Let's explore how adverse childhood experiences (ACE scores) affect trust. Starting with an ACE score of 0.0—no adverse experiences. Notice how relatives are highly trusted for sharing data." }, { "type": "markdown", - "value": "Adverse Childhood Experiences (ACE) composite score: here we look at an ACE score of 8." + "value": "At an ACE score of 1.25, we begin to see subtle shifts in trust patterns." }, { "type": "markdown", - "value": "At an ACE score of 9, the circle of trust around sharing data with others is now completely inverted. Relatives score lower than employers or researchers." + "value": "By an ACE score of 2.25, the changes become more pronounced. The circle of trust is starting to reshape." }, { "type": "markdown", - "value": "This is not just about relatives now ranking lower—acquaintances are even less trusted." + "value": "At an ACE score of 4.25, trust in relatives has notably declined compared to the baseline." }, { "type": "markdown", - "value": "Interestingly, non-profits seem to be vital for people who have experienced many adverse childhood experiences." + "value": "At the highest ACE scores (5.25+), the circle of trust has significantly shifted. Relatives become one of the least trusted groups for sharing data." }, { "type": "markdown", @@ -193,3 +120,5 @@ } ] } + + diff --git a/frontend/src/lib/stories/dark-data-survey/data/penguins.csv b/frontend/src/lib/stories/dark-data-survey/data/penguins.csv new file mode 100644 index 00000000..e1b75147 --- /dev/null +++ b/frontend/src/lib/stories/dark-data-survey/data/penguins.csv @@ -0,0 +1,345 @@ +species,island,culmen_length_mm,culmen_depth_mm,flipper_length_mm,body_mass_g,sex +Adelie,Torgersen,39.1,18.7,181,3750,MALE +Adelie,Torgersen,39.5,17.4,186,3800,FEMALE +Adelie,Torgersen,40.3,18,195,3250,FEMALE +Adelie,Torgersen,NaN,NaN,NaN,NaN, +Adelie,Torgersen,36.7,19.3,193,3450,FEMALE +Adelie,Torgersen,39.3,20.6,190,3650,MALE +Adelie,Torgersen,38.9,17.8,181,3625,FEMALE +Adelie,Torgersen,39.2,19.6,195,4675,MALE +Adelie,Torgersen,34.1,18.1,193,3475, +Adelie,Torgersen,42,20.2,190,4250, +Adelie,Torgersen,37.8,17.1,186,3300, +Adelie,Torgersen,37.8,17.3,180,3700, +Adelie,Torgersen,41.1,17.6,182,3200,FEMALE +Adelie,Torgersen,38.6,21.2,191,3800,MALE +Adelie,Torgersen,34.6,21.1,198,4400,MALE +Adelie,Torgersen,36.6,17.8,185,3700,FEMALE +Adelie,Torgersen,38.7,19,195,3450,FEMALE +Adelie,Torgersen,42.5,20.7,197,4500,MALE +Adelie,Torgersen,34.4,18.4,184,3325,FEMALE +Adelie,Torgersen,46,21.5,194,4200,MALE +Adelie,Biscoe,37.8,18.3,174,3400,FEMALE +Adelie,Biscoe,37.7,18.7,180,3600,MALE +Adelie,Biscoe,35.9,19.2,189,3800,FEMALE +Adelie,Biscoe,38.2,18.1,185,3950,MALE +Adelie,Biscoe,38.8,17.2,180,3800,MALE +Adelie,Biscoe,35.3,18.9,187,3800,FEMALE +Adelie,Biscoe,40.6,18.6,183,3550,MALE +Adelie,Biscoe,40.5,17.9,187,3200,FEMALE +Adelie,Biscoe,37.9,18.6,172,3150,FEMALE +Adelie,Biscoe,40.5,18.9,180,3950,MALE +Adelie,Dream,39.5,16.7,178,3250,FEMALE +Adelie,Dream,37.2,18.1,178,3900,MALE +Adelie,Dream,39.5,17.8,188,3300,FEMALE +Adelie,Dream,40.9,18.9,184,3900,MALE +Adelie,Dream,36.4,17,195,3325,FEMALE +Adelie,Dream,39.2,21.1,196,4150,MALE +Adelie,Dream,38.8,20,190,3950,MALE +Adelie,Dream,42.2,18.5,180,3550,FEMALE +Adelie,Dream,37.6,19.3,181,3300,FEMALE +Adelie,Dream,39.8,19.1,184,4650,MALE +Adelie,Dream,36.5,18,182,3150,FEMALE +Adelie,Dream,40.8,18.4,195,3900,MALE +Adelie,Dream,36,18.5,186,3100,FEMALE +Adelie,Dream,44.1,19.7,196,4400,MALE +Adelie,Dream,37,16.9,185,3000,FEMALE +Adelie,Dream,39.6,18.8,190,4600,MALE +Adelie,Dream,41.1,19,182,3425,MALE +Adelie,Dream,37.5,18.9,179,2975, +Adelie,Dream,36,17.9,190,3450,FEMALE +Adelie,Dream,42.3,21.2,191,4150,MALE +Adelie,Biscoe,39.6,17.7,186,3500,FEMALE +Adelie,Biscoe,40.1,18.9,188,4300,MALE +Adelie,Biscoe,35,17.9,190,3450,FEMALE +Adelie,Biscoe,42,19.5,200,4050,MALE +Adelie,Biscoe,34.5,18.1,187,2900,FEMALE +Adelie,Biscoe,41.4,18.6,191,3700,MALE +Adelie,Biscoe,39,17.5,186,3550,FEMALE +Adelie,Biscoe,40.6,18.8,193,3800,MALE +Adelie,Biscoe,36.5,16.6,181,2850,FEMALE +Adelie,Biscoe,37.6,19.1,194,3750,MALE +Adelie,Biscoe,35.7,16.9,185,3150,FEMALE +Adelie,Biscoe,41.3,21.1,195,4400,MALE +Adelie,Biscoe,37.6,17,185,3600,FEMALE +Adelie,Biscoe,41.1,18.2,192,4050,MALE +Adelie,Biscoe,36.4,17.1,184,2850,FEMALE +Adelie,Biscoe,41.6,18,192,3950,MALE +Adelie,Biscoe,35.5,16.2,195,3350,FEMALE +Adelie,Biscoe,41.1,19.1,188,4100,MALE +Adelie,Torgersen,35.9,16.6,190,3050,FEMALE +Adelie,Torgersen,41.8,19.4,198,4450,MALE +Adelie,Torgersen,33.5,19,190,3600,FEMALE +Adelie,Torgersen,39.7,18.4,190,3900,MALE +Adelie,Torgersen,39.6,17.2,196,3550,FEMALE +Adelie,Torgersen,45.8,18.9,197,4150,MALE +Adelie,Torgersen,35.5,17.5,190,3700,FEMALE +Adelie,Torgersen,42.8,18.5,195,4250,MALE +Adelie,Torgersen,40.9,16.8,191,3700,FEMALE +Adelie,Torgersen,37.2,19.4,184,3900,MALE +Adelie,Torgersen,36.2,16.1,187,3550,FEMALE +Adelie,Torgersen,42.1,19.1,195,4000,MALE +Adelie,Torgersen,34.6,17.2,189,3200,FEMALE +Adelie,Torgersen,42.9,17.6,196,4700,MALE +Adelie,Torgersen,36.7,18.8,187,3800,FEMALE +Adelie,Torgersen,35.1,19.4,193,4200,MALE +Adelie,Dream,37.3,17.8,191,3350,FEMALE +Adelie,Dream,41.3,20.3,194,3550,MALE +Adelie,Dream,36.3,19.5,190,3800,MALE +Adelie,Dream,36.9,18.6,189,3500,FEMALE +Adelie,Dream,38.3,19.2,189,3950,MALE +Adelie,Dream,38.9,18.8,190,3600,FEMALE +Adelie,Dream,35.7,18,202,3550,FEMALE +Adelie,Dream,41.1,18.1,205,4300,MALE +Adelie,Dream,34,17.1,185,3400,FEMALE +Adelie,Dream,39.6,18.1,186,4450,MALE +Adelie,Dream,36.2,17.3,187,3300,FEMALE +Adelie,Dream,40.8,18.9,208,4300,MALE +Adelie,Dream,38.1,18.6,190,3700,FEMALE +Adelie,Dream,40.3,18.5,196,4350,MALE +Adelie,Dream,33.1,16.1,178,2900,FEMALE +Adelie,Dream,43.2,18.5,192,4100,MALE +Adelie,Biscoe,35,17.9,192,3725,FEMALE +Adelie,Biscoe,41,20,203,4725,MALE +Adelie,Biscoe,37.7,16,183,3075,FEMALE +Adelie,Biscoe,37.8,20,190,4250,MALE +Adelie,Biscoe,37.9,18.6,193,2925,FEMALE +Adelie,Biscoe,39.7,18.9,184,3550,MALE +Adelie,Biscoe,38.6,17.2,199,3750,FEMALE +Adelie,Biscoe,38.2,20,190,3900,MALE +Adelie,Biscoe,38.1,17,181,3175,FEMALE +Adelie,Biscoe,43.2,19,197,4775,MALE +Adelie,Biscoe,38.1,16.5,198,3825,FEMALE +Adelie,Biscoe,45.6,20.3,191,4600,MALE +Adelie,Biscoe,39.7,17.7,193,3200,FEMALE +Adelie,Biscoe,42.2,19.5,197,4275,MALE +Adelie,Biscoe,39.6,20.7,191,3900,FEMALE +Adelie,Biscoe,42.7,18.3,196,4075,MALE +Adelie,Torgersen,38.6,17,188,2900,FEMALE +Adelie,Torgersen,37.3,20.5,199,3775,MALE +Adelie,Torgersen,35.7,17,189,3350,FEMALE +Adelie,Torgersen,41.1,18.6,189,3325,MALE +Adelie,Torgersen,36.2,17.2,187,3150,FEMALE +Adelie,Torgersen,37.7,19.8,198,3500,MALE +Adelie,Torgersen,40.2,17,176,3450,FEMALE +Adelie,Torgersen,41.4,18.5,202,3875,MALE +Adelie,Torgersen,35.2,15.9,186,3050,FEMALE +Adelie,Torgersen,40.6,19,199,4000,MALE +Adelie,Torgersen,38.8,17.6,191,3275,FEMALE +Adelie,Torgersen,41.5,18.3,195,4300,MALE +Adelie,Torgersen,39,17.1,191,3050,FEMALE +Adelie,Torgersen,44.1,18,210,4000,MALE +Adelie,Torgersen,38.5,17.9,190,3325,FEMALE +Adelie,Torgersen,43.1,19.2,197,3500,MALE +Adelie,Dream,36.8,18.5,193,3500,FEMALE +Adelie,Dream,37.5,18.5,199,4475,MALE +Adelie,Dream,38.1,17.6,187,3425,FEMALE +Adelie,Dream,41.1,17.5,190,3900,MALE +Adelie,Dream,35.6,17.5,191,3175,FEMALE +Adelie,Dream,40.2,20.1,200,3975,MALE +Adelie,Dream,37,16.5,185,3400,FEMALE +Adelie,Dream,39.7,17.9,193,4250,MALE +Adelie,Dream,40.2,17.1,193,3400,FEMALE +Adelie,Dream,40.6,17.2,187,3475,MALE +Adelie,Dream,32.1,15.5,188,3050,FEMALE +Adelie,Dream,40.7,17,190,3725,MALE +Adelie,Dream,37.3,16.8,192,3000,FEMALE +Adelie,Dream,39,18.7,185,3650,MALE +Adelie,Dream,39.2,18.6,190,4250,MALE +Adelie,Dream,36.6,18.4,184,3475,FEMALE +Adelie,Dream,36,17.8,195,3450,FEMALE +Adelie,Dream,37.8,18.1,193,3750,MALE +Adelie,Dream,36,17.1,187,3700,FEMALE +Adelie,Dream,41.5,18.5,201,4000,MALE +Chinstrap,Dream,46.5,17.9,192,3500,FEMALE +Chinstrap,Dream,50,19.5,196,3900,MALE +Chinstrap,Dream,51.3,19.2,193,3650,MALE +Chinstrap,Dream,45.4,18.7,188,3525,FEMALE +Chinstrap,Dream,52.7,19.8,197,3725,MALE +Chinstrap,Dream,45.2,17.8,198,3950,FEMALE +Chinstrap,Dream,46.1,18.2,178,3250,FEMALE +Chinstrap,Dream,51.3,18.2,197,3750,MALE +Chinstrap,Dream,46,18.9,195,4150,FEMALE +Chinstrap,Dream,51.3,19.9,198,3700,MALE +Chinstrap,Dream,46.6,17.8,193,3800,FEMALE +Chinstrap,Dream,51.7,20.3,194,3775,MALE +Chinstrap,Dream,47,17.3,185,3700,FEMALE +Chinstrap,Dream,52,18.1,201,4050,MALE +Chinstrap,Dream,45.9,17.1,190,3575,FEMALE +Chinstrap,Dream,50.5,19.6,201,4050,MALE +Chinstrap,Dream,50.3,20,197,3300,MALE +Chinstrap,Dream,58,17.8,181,3700,FEMALE +Chinstrap,Dream,46.4,18.6,190,3450,FEMALE +Chinstrap,Dream,49.2,18.2,195,4400,MALE +Chinstrap,Dream,42.4,17.3,181,3600,FEMALE +Chinstrap,Dream,48.5,17.5,191,3400,MALE +Chinstrap,Dream,43.2,16.6,187,2900,FEMALE +Chinstrap,Dream,50.6,19.4,193,3800,MALE +Chinstrap,Dream,46.7,17.9,195,3300,FEMALE +Chinstrap,Dream,52,19,197,4150,MALE +Chinstrap,Dream,50.5,18.4,200,3400,FEMALE +Chinstrap,Dream,49.5,19,200,3800,MALE +Chinstrap,Dream,46.4,17.8,191,3700,FEMALE +Chinstrap,Dream,52.8,20,205,4550,MALE +Chinstrap,Dream,40.9,16.6,187,3200,FEMALE +Chinstrap,Dream,54.2,20.8,201,4300,MALE +Chinstrap,Dream,42.5,16.7,187,3350,FEMALE +Chinstrap,Dream,51,18.8,203,4100,MALE +Chinstrap,Dream,49.7,18.6,195,3600,MALE +Chinstrap,Dream,47.5,16.8,199,3900,FEMALE +Chinstrap,Dream,47.6,18.3,195,3850,FEMALE +Chinstrap,Dream,52,20.7,210,4800,MALE +Chinstrap,Dream,46.9,16.6,192,2700,FEMALE +Chinstrap,Dream,53.5,19.9,205,4500,MALE +Chinstrap,Dream,49,19.5,210,3950,MALE +Chinstrap,Dream,46.2,17.5,187,3650,FEMALE +Chinstrap,Dream,50.9,19.1,196,3550,MALE +Chinstrap,Dream,45.5,17,196,3500,FEMALE +Chinstrap,Dream,50.9,17.9,196,3675,FEMALE +Chinstrap,Dream,50.8,18.5,201,4450,MALE +Chinstrap,Dream,50.1,17.9,190,3400,FEMALE +Chinstrap,Dream,49,19.6,212,4300,MALE +Chinstrap,Dream,51.5,18.7,187,3250,MALE +Chinstrap,Dream,49.8,17.3,198,3675,FEMALE +Chinstrap,Dream,48.1,16.4,199,3325,FEMALE +Chinstrap,Dream,51.4,19,201,3950,MALE +Chinstrap,Dream,45.7,17.3,193,3600,FEMALE +Chinstrap,Dream,50.7,19.7,203,4050,MALE +Chinstrap,Dream,42.5,17.3,187,3350,FEMALE +Chinstrap,Dream,52.2,18.8,197,3450,MALE +Chinstrap,Dream,45.2,16.6,191,3250,FEMALE +Chinstrap,Dream,49.3,19.9,203,4050,MALE +Chinstrap,Dream,50.2,18.8,202,3800,MALE +Chinstrap,Dream,45.6,19.4,194,3525,FEMALE +Chinstrap,Dream,51.9,19.5,206,3950,MALE +Chinstrap,Dream,46.8,16.5,189,3650,FEMALE +Chinstrap,Dream,45.7,17,195,3650,FEMALE +Chinstrap,Dream,55.8,19.8,207,4000,MALE +Chinstrap,Dream,43.5,18.1,202,3400,FEMALE +Chinstrap,Dream,49.6,18.2,193,3775,MALE +Chinstrap,Dream,50.8,19,210,4100,MALE +Chinstrap,Dream,50.2,18.7,198,3775,FEMALE +Gentoo,Biscoe,46.1,13.2,211,4500,FEMALE +Gentoo,Biscoe,50,16.3,230,5700,MALE +Gentoo,Biscoe,48.7,14.1,210,4450,FEMALE +Gentoo,Biscoe,50,15.2,218,5700,MALE +Gentoo,Biscoe,47.6,14.5,215,5400,MALE +Gentoo,Biscoe,46.5,13.5,210,4550,FEMALE +Gentoo,Biscoe,45.4,14.6,211,4800,FEMALE +Gentoo,Biscoe,46.7,15.3,219,5200,MALE +Gentoo,Biscoe,43.3,13.4,209,4400,FEMALE +Gentoo,Biscoe,46.8,15.4,215,5150,MALE +Gentoo,Biscoe,40.9,13.7,214,4650,FEMALE +Gentoo,Biscoe,49,16.1,216,5550,MALE +Gentoo,Biscoe,45.5,13.7,214,4650,FEMALE +Gentoo,Biscoe,48.4,14.6,213,5850,MALE +Gentoo,Biscoe,45.8,14.6,210,4200,FEMALE +Gentoo,Biscoe,49.3,15.7,217,5850,MALE +Gentoo,Biscoe,42,13.5,210,4150,FEMALE +Gentoo,Biscoe,49.2,15.2,221,6300,MALE +Gentoo,Biscoe,46.2,14.5,209,4800,FEMALE +Gentoo,Biscoe,48.7,15.1,222,5350,MALE +Gentoo,Biscoe,50.2,14.3,218,5700,MALE +Gentoo,Biscoe,45.1,14.5,215,5000,FEMALE +Gentoo,Biscoe,46.5,14.5,213,4400,FEMALE +Gentoo,Biscoe,46.3,15.8,215,5050,MALE +Gentoo,Biscoe,42.9,13.1,215,5000,FEMALE +Gentoo,Biscoe,46.1,15.1,215,5100,MALE +Gentoo,Biscoe,44.5,14.3,216,4100, +Gentoo,Biscoe,47.8,15,215,5650,MALE +Gentoo,Biscoe,48.2,14.3,210,4600,FEMALE +Gentoo,Biscoe,50,15.3,220,5550,MALE +Gentoo,Biscoe,47.3,15.3,222,5250,MALE +Gentoo,Biscoe,42.8,14.2,209,4700,FEMALE +Gentoo,Biscoe,45.1,14.5,207,5050,FEMALE +Gentoo,Biscoe,59.6,17,230,6050,MALE +Gentoo,Biscoe,49.1,14.8,220,5150,FEMALE +Gentoo,Biscoe,48.4,16.3,220,5400,MALE +Gentoo,Biscoe,42.6,13.7,213,4950,FEMALE +Gentoo,Biscoe,44.4,17.3,219,5250,MALE +Gentoo,Biscoe,44,13.6,208,4350,FEMALE +Gentoo,Biscoe,48.7,15.7,208,5350,MALE +Gentoo,Biscoe,42.7,13.7,208,3950,FEMALE +Gentoo,Biscoe,49.6,16,225,5700,MALE +Gentoo,Biscoe,45.3,13.7,210,4300,FEMALE +Gentoo,Biscoe,49.6,15,216,4750,MALE +Gentoo,Biscoe,50.5,15.9,222,5550,MALE +Gentoo,Biscoe,43.6,13.9,217,4900,FEMALE +Gentoo,Biscoe,45.5,13.9,210,4200,FEMALE +Gentoo,Biscoe,50.5,15.9,225,5400,MALE +Gentoo,Biscoe,44.9,13.3,213,5100,FEMALE +Gentoo,Biscoe,45.2,15.8,215,5300,MALE +Gentoo,Biscoe,46.6,14.2,210,4850,FEMALE +Gentoo,Biscoe,48.5,14.1,220,5300,MALE +Gentoo,Biscoe,45.1,14.4,210,4400,FEMALE +Gentoo,Biscoe,50.1,15,225,5000,MALE +Gentoo,Biscoe,46.5,14.4,217,4900,FEMALE +Gentoo,Biscoe,45,15.4,220,5050,MALE +Gentoo,Biscoe,43.8,13.9,208,4300,FEMALE +Gentoo,Biscoe,45.5,15,220,5000,MALE +Gentoo,Biscoe,43.2,14.5,208,4450,FEMALE +Gentoo,Biscoe,50.4,15.3,224,5550,MALE +Gentoo,Biscoe,45.3,13.8,208,4200,FEMALE +Gentoo,Biscoe,46.2,14.9,221,5300,MALE +Gentoo,Biscoe,45.7,13.9,214,4400,FEMALE +Gentoo,Biscoe,54.3,15.7,231,5650,MALE +Gentoo,Biscoe,45.8,14.2,219,4700,FEMALE +Gentoo,Biscoe,49.8,16.8,230,5700,MALE +Gentoo,Biscoe,46.2,14.4,214,4650, +Gentoo,Biscoe,49.5,16.2,229,5800,MALE +Gentoo,Biscoe,43.5,14.2,220,4700,FEMALE +Gentoo,Biscoe,50.7,15,223,5550,MALE +Gentoo,Biscoe,47.7,15,216,4750,FEMALE +Gentoo,Biscoe,46.4,15.6,221,5000,MALE +Gentoo,Biscoe,48.2,15.6,221,5100,MALE +Gentoo,Biscoe,46.5,14.8,217,5200,FEMALE +Gentoo,Biscoe,46.4,15,216,4700,FEMALE +Gentoo,Biscoe,48.6,16,230,5800,MALE +Gentoo,Biscoe,47.5,14.2,209,4600,FEMALE +Gentoo,Biscoe,51.1,16.3,220,6000,MALE +Gentoo,Biscoe,45.2,13.8,215,4750,FEMALE +Gentoo,Biscoe,45.2,16.4,223,5950,MALE +Gentoo,Biscoe,49.1,14.5,212,4625,FEMALE +Gentoo,Biscoe,52.5,15.6,221,5450,MALE +Gentoo,Biscoe,47.4,14.6,212,4725,FEMALE +Gentoo,Biscoe,50,15.9,224,5350,MALE +Gentoo,Biscoe,44.9,13.8,212,4750,FEMALE +Gentoo,Biscoe,50.8,17.3,228,5600,MALE +Gentoo,Biscoe,43.4,14.4,218,4600,FEMALE +Gentoo,Biscoe,51.3,14.2,218,5300,MALE +Gentoo,Biscoe,47.5,14,212,4875,FEMALE +Gentoo,Biscoe,52.1,17,230,5550,MALE +Gentoo,Biscoe,47.5,15,218,4950,FEMALE +Gentoo,Biscoe,52.2,17.1,228,5400,MALE +Gentoo,Biscoe,45.5,14.5,212,4750,FEMALE +Gentoo,Biscoe,49.5,16.1,224,5650,MALE +Gentoo,Biscoe,44.5,14.7,214,4850,FEMALE +Gentoo,Biscoe,50.8,15.7,226,5200,MALE +Gentoo,Biscoe,49.4,15.8,216,4925,MALE +Gentoo,Biscoe,46.9,14.6,222,4875,FEMALE +Gentoo,Biscoe,48.4,14.4,203,4625,FEMALE +Gentoo,Biscoe,51.1,16.5,225,5250,MALE +Gentoo,Biscoe,48.5,15,219,4850,FEMALE +Gentoo,Biscoe,55.9,17,228,5600,MALE +Gentoo,Biscoe,47.2,15.5,215,4975,FEMALE +Gentoo,Biscoe,49.1,15,228,5500,MALE +Gentoo,Biscoe,47.3,13.8,216,4725, +Gentoo,Biscoe,46.8,16.1,215,5500,MALE +Gentoo,Biscoe,41.7,14.7,210,4700,FEMALE +Gentoo,Biscoe,53.4,15.8,219,5500,MALE +Gentoo,Biscoe,43.3,14,208,4575,FEMALE +Gentoo,Biscoe,48.1,15.1,209,5500,MALE +Gentoo,Biscoe,50.5,15.2,216,5000,FEMALE +Gentoo,Biscoe,49.8,15.9,229,5950,MALE +Gentoo,Biscoe,43.5,15.2,213,4650,FEMALE +Gentoo,Biscoe,51.5,16.3,230,5500,MALE +Gentoo,Biscoe,46.2,14.1,217,4375,FEMALE +Gentoo,Biscoe,55.1,16,230,5850,MALE +Gentoo,Biscoe,44.5,15.7,217,4875, +Gentoo,Biscoe,48.8,16.2,222,6000,MALE +Gentoo,Biscoe,47.2,13.7,214,4925,FEMALE +Gentoo,Biscoe,NaN,NaN,NaN,NaN, +Gentoo,Biscoe,46.8,14.3,215,4850,FEMALE +Gentoo,Biscoe,50.4,15.7,222,5750,MALE +Gentoo,Biscoe,45.2,14.8,212,5200,FEMALE +Gentoo,Biscoe,49.9,16.1,213,5400,MALE \ No newline at end of file diff --git a/frontend/src/lib/stories/dark-data-survey/data/process_data.py b/frontend/src/lib/stories/dark-data-survey/data/process_data.py deleted file mode 100644 index 2fd318b6..00000000 --- a/frontend/src/lib/stories/dark-data-survey/data/process_data.py +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/env python3 -""" -Script to process dfall.csv into trust_circles.csv format -Using pandas for cleaner, more readable code -""" - -import pandas as pd - -def process_dfall_to_trust_circles(input_file="dfall.csv", output_file="trust_circles.csv"): - """ - Process the raw survey data into trust circles format using pandas, - grouped by Timepoint as well as demographics. - """ - # Read - df = pd.read_csv(input_file) - print(f"Loaded {len(df)} rows from {input_file}") - - # Multi-platform ordinal: sum of all TP_Platforms_* columns (0-5) - platform_cols = ['TP_Platforms_twitter', 'TP_Platforms_instagram', 'TP_Platforms_facebook', - 'TP_Platforms_tiktok', 'TP_Platforms_other'] - if all(col in df.columns for col in platform_cols): - df['multi_platform_ord'] = df[platform_cols].sum(axis=1) - # Drop the individual platform columns after creating the ordinal - df = df.drop(columns=platform_cols) - - # Institution columns - exclude unwanted patterns - exclude_patterns = ['TP_Month', 'TP_Which_Platforms', 'TP_Measure', 'TP_Social'] - institution_columns = [ - col for col in df.columns - if col.startswith('TP_') and not any(pattern in col for pattern in exclude_patterns) - ] - print(f"Found institution columns: {institution_columns}") - - # Create ordinal demographic categories - race_cols = ['Dem_Race_White', 'Dem_Race_Mixed', 'Dem_Race_POC'] - if all(col in df.columns for col in race_cols): - df['race_ord'] = (df[race_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Race_White': 0, - 'Dem_Race_Mixed': 1, - 'Dem_Race_POC': 2 - }).fillna(0) - - orientation_cols = [ - 'Dem_Sexual_Orientation_straight', - 'Dem_Sexual_Orientation_Bisexual', - 'Dem_Sexual_Orientation_Gay', - 'Dem_Sexual_Orientation_other' - ] - if all(col in df.columns for col in orientation_cols): - df['orientation_ord'] = (df[orientation_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Sexual_Orientation_straight': 0, - 'Dem_Sexual_Orientation_Bisexual': 1, - 'Dem_Sexual_Orientation_Gay': 2, - 'Dem_Sexual_Orientation_other': 3 - }).fillna(0) - - gender_cols = ['Dem_Gender_Woman', 'Dem_Gender_Man', 'Dem_Gender_Other'] - if all(col in df.columns for col in gender_cols): - df['gender_ord'] = (df[gender_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Gender_Woman': 0, - 'Dem_Gender_Man': 1, - 'Dem_Gender_Other': 2 - }).fillna(0) - - demographic_columns = ['gender_ord', 'Dem_Relationship_Status_Single', 'orientation_ord', 'race_ord', 'multi_platform_ord', 'ACES_Compound'] - print(f"Created ordinal demographic columns: {demographic_columns}") - - results = [] - - # 1. Overall average for all institutions, grouped by Timepoint - if "Timepoint" in df.columns: - grouped_time = df.groupby("Timepoint")[institution_columns].mean() - for timepoint, row in grouped_time.iterrows(): - for institution in institution_columns: - avg_distance = row[institution] - if pd.notna(avg_distance): - results.append({ - 'Timepoint': timepoint, - 'institution': institution, - 'distance': avg_distance, - 'category': 'overall_average', - 'value': 1.0 - }) - - # 2. Process each demographic category within each Timepoint - for demo_col in demographic_columns: - if demo_col in df.columns and "Timepoint" in df.columns: - grouped = df.groupby(["Timepoint", demo_col])[institution_columns].mean() - for (timepoint, demo_value), row in grouped.iterrows(): - for institution in institution_columns: - avg_distance = row[institution] - if pd.notna(avg_distance): - results.append({ - 'Timepoint': timepoint, - 'institution': institution, - 'distance': avg_distance, - 'category': demo_col, - 'value': float(demo_value) - }) - - # Convert to DataFrame and sort - results_df = pd.DataFrame(results) - results_df = results_df.sort_values(['Timepoint', 'category', 'value', 'institution']) - - # Save to CSV - results_df.to_csv(output_file, index=False) - print(f"Saved {len(results_df)} rows to {output_file}") - - return results_df.to_dict('records') - -def process_individual_level_data(input_file="dfall.csv", output_file="trust_circles_individual.csv", balanced=True): - """ - Process the raw survey data to individual-level format (not aggregated) - Each row represents one person's trust rating for one institution - """ - - # Read and filter data - df = pd.read_csv(input_file) - - # Multi-platform ordinal: sum of all TP_Platforms_* columns (0-5) - platform_cols = ['TP_Platforms_twitter', 'TP_Platforms_instagram', 'TP_Platforms_facebook', - 'TP_Platforms_tiktok', 'TP_Platforms_other'] - if all(col in df.columns for col in platform_cols): - df['multi_platform_ord'] = df[platform_cols].sum(axis=1) - # Drop the individual platform columns after creating the ordinal - df = df.drop(columns=platform_cols) - - # Institution columns - exclude unwanted patterns - exclude_patterns = ['TP_Month', 'TP_Which_Platforms', 'TP_Measure', 'TP_Social'] - institution_columns = [col for col in df.columns - if col.startswith('TP_') - and not any(pattern in col for pattern in exclude_patterns)] - - print(f"Found institution columns: {institution_columns}") - - # Create ordinal demographic categories (same as aggregated version) - # Race ordinal: White=0, Mixed=1, POC=2 - race_cols = ['Dem_Race_White', 'Dem_Race_Mixed', 'Dem_Race_POC'] - if all(col in df.columns for col in race_cols): - df['race_ord'] = (df[race_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Race_White': 0, - 'Dem_Race_Mixed': 1, - 'Dem_Race_POC': 2 - }).fillna(0) - - # Sexual orientation ordinal: straight=0, bisexual=1, gay=2, other=3 - orientation_cols = ['Dem_Sexual_Orientation_straight', 'Dem_Sexual_Orientation_Bisexual', - 'Dem_Sexual_Orientation_Gay', 'Dem_Sexual_Orientation_other'] - if all(col in df.columns for col in orientation_cols): - df['orientation_ord'] = (df[orientation_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Sexual_Orientation_straight': 0, - 'Dem_Sexual_Orientation_Bisexual': 1, - 'Dem_Sexual_Orientation_Gay': 2, - 'Dem_Sexual_Orientation_other': 3 - }).fillna(0) - - # Keep the original Dem_Gender_Man column (Woman=0, Man=1) - # Gender ordinal: Woman=0, Man=1, Other=2 - gender_cols = ['Dem_Gender_Woman', 'Dem_Gender_Man', 'Dem_Gender_Other'] - if all(col in df.columns for col in gender_cols): - df['gender_ord'] = (df[gender_cols] == 1.0).idxmax(axis=1).map({ - 'Dem_Gender_Woman': 0, - 'Dem_Gender_Man': 1, - 'Dem_Gender_Other': 2 - }).fillna(0) - - # Add respondent ID for tracking individuals - df['respondent_id'] = range(len(df)) - - # Melt the dataframe to have one row per person-institution combination - id_vars = ['respondent_id', 'gender_ord', 'Dem_Relationship_Status_Single', 'orientation_ord', 'race_ord', 'multi_platform_ord', 'ACES_Compound', 'Timepoint'] - - # Only include id_vars that exist in the dataframe - id_vars = [col for col in id_vars if col in df.columns] - - melted_df = pd.melt(df, - id_vars=id_vars, - value_vars=institution_columns, - var_name='institution', - value_name='distance') - - # Remove rows with missing trust ratings - melted_df = melted_df.dropna(subset=['distance']) - - # Convert distance to numeric - melted_df['distance'] = pd.to_numeric(melted_df['distance'], errors='coerce') - melted_df = melted_df.dropna(subset=['distance']) - - if balanced == True: - groups = melted_df.groupby(["Timepoint", "institution", "race_ord"]) - min_size = groups.size().min() - - melted_df = groups.apply( - lambda g: g.sample(n=min_size, random_state=42, replace=False) - ).reset_index(drop=True) - - # Save to CSV - melted_df.to_csv("trust_circles_individual.csv", index=False) - print(f"Saved {len(melted_df)} individual responses to {output_file}") - - return melted_df - -def main(): - """Main function""" - print("Processing dfall.csv to trust_circles.csv...") - - # Process aggregated data - aggregated_result = process_dfall_to_trust_circles() - - if aggregated_result is not None: - print("\\nFirst few rows of aggregated output:") - for i, row in enumerate(aggregated_result[:10]): - print(f"{i+1}: {row}") - - categories = sorted(set(row['category'] for row in aggregated_result)) - institutions = sorted(set(row['institution'] for row in aggregated_result)) - - print(f"\\nCategories found: {categories}") - print(f"Institutions found: {institutions}") - - print("\\n" + "="*50) - print("Processing individual-level data...") - - # Process individual-level data - individual_result = process_individual_level_data(balanced=False) - - if individual_result is not None: - print(f"\nIndividual data shape: {individual_result.shape}") - print("\nFirst few rows of individual data:") - print(individual_result.head()) - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/cello-a3.wav b/frontend/src/lib/stories/dark-data-survey/data/sounds/cello-a3.wav new file mode 100644 index 00000000..aa790d8f Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/cello-a3.wav differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/flute-f5.wav b/frontend/src/lib/stories/dark-data-survey/data/sounds/flute-f5.wav new file mode 100644 index 00000000..c0c45e6c Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/flute-f5.wav differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav b/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav new file mode 100644 index 00000000..5cb859e2 Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav.asd b/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav.asd new file mode 100644 index 00000000..5d7480d7 Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/soft-piano.wav.asd differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/trumpet-a5.wav b/frontend/src/lib/stories/dark-data-survey/data/sounds/trumpet-a5.wav new file mode 100644 index 00000000..69f8195a Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/trumpet-a5.wav differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/sounds/violin-vib-c4.aiff b/frontend/src/lib/stories/dark-data-survey/data/sounds/violin-vib-c4.aiff new file mode 100644 index 00000000..4b8ff869 Binary files /dev/null and b/frontend/src/lib/stories/dark-data-survey/data/sounds/violin-vib-c4.aiff differ diff --git a/frontend/src/lib/stories/dark-data-survey/data/taste_for_privacy_aggregated.csv b/frontend/src/lib/stories/dark-data-survey/data/taste_for_privacy_aggregated.csv new file mode 100644 index 00000000..821dfc7c --- /dev/null +++ b/frontend/src/lib/stories/dark-data-survey/data/taste_for_privacy_aggregated.csv @@ -0,0 +1,494 @@ +Demographic,Trust_Category,Average_Trust +Dem_Gender_Woman,TP_Gov,4.298013245033113 +Dem_Gender_Man,TP_Gov,4.354978354978355 +Dem_Gender_Other,TP_Gov,4.866071428571429 +ACES_Compound,TP_Gov,4.49468085106383 +ACES_No,TP_Gov,4.219135802469136 +ACES_Yes,TP_Gov,4.472742066720912 +ACES_0.0,TP_Gov,4.202952029520295 +ACES_0.25,TP_Gov,4.404255319148936 +ACES_0.5,TP_Gov,4.226600985221675 +ACES_0.75,TP_Gov,4.181818181818182 +ACES_1.0,TP_Gov,4.49468085106383 +ACES_1.25,TP_Gov,4.703703703703703 +ACES_1.5,TP_Gov,4.511627906976744 +ACES_1.75,TP_Gov,4.979591836734694 +ACES_2.0,TP_Gov,4.1 +ACES_2.25,TP_Gov,4.456140350877193 +ACES_2.5,TP_Gov,4.468354430379747 +ACES_2.75,TP_Gov,4.666666666666667 +ACES_3.0,TP_Gov,4.34375 +ACES_3.25,TP_Gov,4.571428571428571 +ACES_3.5,TP_Gov,4.788461538461538 +ACES_3.75,TP_Gov,4.24 +ACES_4.0,TP_Gov,4.787878787878788 +ACES_4.25,TP_Gov,4.769230769230769 +ACES_4.5,TP_Gov,4.75 +ACES_4.75,TP_Gov,4.5 +ACES_5.0,TP_Gov,4.461538461538462 +ACES_5.25+,TP_Gov,4.588235294117647 +ACES_5.5,TP_Gov,4.888888888888889 +Dem_Gender_Woman,TP_Police,4.3993344425956735 +Dem_Gender_Man,TP_Police,4.273913043478261 +Dem_Gender_Other,TP_Police,5.294642857142857 +ACES_Compound,TP_Police,4.441489361702128 +ACES_No,TP_Police,4.198142414860681 +ACES_Yes,TP_Police,4.616639477977161 +ACES_0.0,TP_Police,4.12962962962963 +ACES_0.25,TP_Police,4.5 +ACES_0.5,TP_Police,4.257425742574258 +ACES_0.75,TP_Police,4.606060606060606 +ACES_1.0,TP_Police,4.441489361702128 +ACES_1.25,TP_Police,4.9245283018867925 +ACES_1.5,TP_Police,4.852713178294573 +ACES_1.75,TP_Police,4.854166666666667 +ACES_2.0,TP_Police,4.53 +ACES_2.25,TP_Police,4.719298245614035 +ACES_2.5,TP_Police,4.65 +ACES_2.75,TP_Police,4.733333333333333 +ACES_3.0,TP_Police,4.578125 +ACES_3.25,TP_Police,4.928571428571429 +ACES_3.5,TP_Police,4.903846153846154 +ACES_3.75,TP_Police,4.64 +ACES_4.0,TP_Police,4.606060606060606 +ACES_4.25,TP_Police,5.153846153846154 +ACES_4.5,TP_Police,4.775 +ACES_4.75,TP_Police,4.6 +ACES_5.0,TP_Police,4.769230769230769 +ACES_5.25+,TP_Police,4.9411764705882355 +ACES_5.5,TP_Police,4.833333333333333 +Dem_Gender_Woman,TP_Friend,2.2880794701986753 +Dem_Gender_Man,TP_Friend,2.1471861471861473 +Dem_Gender_Other,TP_Friend,2.142857142857143 +ACES_Compound,TP_Friend,2.228723404255319 +ACES_No,TP_Friend,2.2808641975308643 +ACES_Yes,TP_Friend,2.2504065040650407 +ACES_0.0,TP_Friend,2.2804428044280445 +ACES_0.25,TP_Friend,2.3617021276595747 +ACES_0.5,TP_Friend,2.2216748768472905 +ACES_0.75,TP_Friend,2.8484848484848486 +ACES_1.0,TP_Friend,2.228723404255319 +ACES_1.25,TP_Friend,2.3518518518518516 +ACES_1.5,TP_Friend,2.2635658914728682 +ACES_1.75,TP_Friend,2.5918367346938775 +ACES_2.0,TP_Friend,2.17 +ACES_2.25,TP_Friend,2.43859649122807 +ACES_2.5,TP_Friend,2.0125 +ACES_2.75,TP_Friend,2.1666666666666665 +ACES_3.0,TP_Friend,2.28125 +ACES_3.25,TP_Friend,2.75 +ACES_3.5,TP_Friend,2.0961538461538463 +ACES_3.75,TP_Friend,2.04 +ACES_4.0,TP_Friend,2.0303030303030303 +ACES_4.25,TP_Friend,1.8461538461538463 +ACES_4.5,TP_Friend,2.125 +ACES_4.75,TP_Friend,1.7 +ACES_5.0,TP_Friend,2.5384615384615383 +ACES_5.25+,TP_Friend,1.8235294117647058 +ACES_5.5,TP_Friend,2.5555555555555554 +Dem_Gender_Woman,TP_Relative,2.5514950166112955 +Dem_Gender_Man,TP_Relative,2.272727272727273 +Dem_Gender_Other,TP_Relative,3.205357142857143 +ACES_Compound,TP_Relative,2.4680851063829787 +ACES_No,TP_Relative,2.4024767801857587 +ACES_Yes,TP_Relative,2.6802278275020344 +ACES_0.0,TP_Relative,2.303703703703704 +ACES_0.25,TP_Relative,2.872340425531915 +ACES_0.5,TP_Relative,2.4532019704433496 +ACES_0.75,TP_Relative,2.8484848484848486 +ACES_1.0,TP_Relative,2.4680851063829787 +ACES_1.25,TP_Relative,3.0 +ACES_1.5,TP_Relative,2.62015503875969 +ACES_1.75,TP_Relative,2.8333333333333335 +ACES_2.0,TP_Relative,2.53 +ACES_2.25,TP_Relative,3.192982456140351 +ACES_2.5,TP_Relative,2.525 +ACES_2.75,TP_Relative,2.9 +ACES_3.0,TP_Relative,2.59375 +ACES_3.25,TP_Relative,3.0714285714285716 +ACES_3.5,TP_Relative,3.0384615384615383 +ACES_3.75,TP_Relative,2.32 +ACES_4.0,TP_Relative,2.4242424242424243 +ACES_4.25,TP_Relative,3.230769230769231 +ACES_4.5,TP_Relative,2.625 +ACES_4.75,TP_Relative,3.1 +ACES_5.0,TP_Relative,3.230769230769231 +ACES_5.25+,TP_Relative,3.7058823529411766 +ACES_5.5,TP_Relative,3.6666666666666665 +Dem_Gender_Woman,TP_Employer,3.6043046357615895 +Dem_Gender_Man,TP_Employer,3.3956521739130436 +Dem_Gender_Other,TP_Employer,4.0 +ACES_Compound,TP_Employer,3.595744680851064 +ACES_No,TP_Employer,3.4472049689440993 +ACES_Yes,TP_Employer,3.6745321399511797 +ACES_0.0,TP_Employer,3.3814814814814813 +ACES_0.25,TP_Employer,3.6382978723404253 +ACES_0.5,TP_Employer,3.4207920792079207 +ACES_0.75,TP_Employer,3.606060606060606 +ACES_1.0,TP_Employer,3.595744680851064 +ACES_1.25,TP_Employer,3.9814814814814814 +ACES_1.5,TP_Employer,3.8217054263565893 +ACES_1.75,TP_Employer,3.938775510204082 +ACES_2.0,TP_Employer,3.54 +ACES_2.25,TP_Employer,3.807017543859649 +ACES_2.5,TP_Employer,3.775 +ACES_2.75,TP_Employer,3.7241379310344827 +ACES_3.0,TP_Employer,3.5 +ACES_3.25,TP_Employer,4.285714285714286 +ACES_3.5,TP_Employer,3.5576923076923075 +ACES_3.75,TP_Employer,3.4 +ACES_4.0,TP_Employer,4.0606060606060606 +ACES_4.25,TP_Employer,3.8461538461538463 +ACES_4.5,TP_Employer,3.875 +ACES_4.75,TP_Employer,3.7 +ACES_5.0,TP_Employer,4.230769230769231 +ACES_5.25+,TP_Employer,3.2941176470588234 +ACES_5.5,TP_Employer,4.055555555555555 +Dem_Gender_Woman,TP_Medical,2.5463576158940397 +Dem_Gender_Man,TP_Medical,2.134199134199134 +Dem_Gender_Other,TP_Medical,2.810810810810811 +ACES_Compound,TP_Medical,2.443850267379679 +ACES_No,TP_Medical,2.4166666666666665 +ACES_Yes,TP_Medical,2.614320585842148 +ACES_0.0,TP_Medical,2.3284132841328415 +ACES_0.25,TP_Medical,2.9148936170212765 +ACES_0.5,TP_Medical,2.4433497536945814 +ACES_0.75,TP_Medical,2.484848484848485 +ACES_1.0,TP_Medical,2.443850267379679 +ACES_1.25,TP_Medical,2.7777777777777777 +ACES_1.5,TP_Medical,2.612403100775194 +ACES_1.75,TP_Medical,3.0 +ACES_2.0,TP_Medical,2.53 +ACES_2.25,TP_Medical,2.56140350877193 +ACES_2.5,TP_Medical,2.6875 +ACES_2.75,TP_Medical,2.7666666666666666 +ACES_3.0,TP_Medical,2.734375 +ACES_3.25,TP_Medical,3.0 +ACES_3.5,TP_Medical,2.673076923076923 +ACES_3.75,TP_Medical,2.24 +ACES_4.0,TP_Medical,2.787878787878788 +ACES_4.25,TP_Medical,3.1538461538461537 +ACES_4.5,TP_Medical,3.0 +ACES_4.75,TP_Medical,1.9 +ACES_5.0,TP_Medical,3.076923076923077 +ACES_5.25+,TP_Medical,2.7058823529411766 +ACES_5.5,TP_Medical,2.7777777777777777 +Dem_Gender_Woman,TP_Financial,3.7425249169435215 +Dem_Gender_Man,TP_Financial,3.41991341991342 +Dem_Gender_Other,TP_Financial,4.196428571428571 +ACES_Compound,TP_Financial,3.7925531914893615 +ACES_No,TP_Financial,3.5325077399380804 +ACES_Yes,TP_Financial,3.8665581773799835 +ACES_0.0,TP_Financial,3.477777777777778 +ACES_0.25,TP_Financial,3.8085106382978724 +ACES_0.5,TP_Financial,3.5123152709359604 +ACES_0.75,TP_Financial,3.5454545454545454 +ACES_1.0,TP_Financial,3.7925531914893615 +ACES_1.25,TP_Financial,4.0 +ACES_1.5,TP_Financial,4.054263565891473 +ACES_1.75,TP_Financial,3.875 +ACES_2.0,TP_Financial,3.81 +ACES_2.25,TP_Financial,4.157894736842105 +ACES_2.5,TP_Financial,4.2 +ACES_2.75,TP_Financial,3.933333333333333 +ACES_3.0,TP_Financial,3.578125 +ACES_3.25,TP_Financial,4.071428571428571 +ACES_3.5,TP_Financial,3.9423076923076925 +ACES_3.75,TP_Financial,3.6 +ACES_4.0,TP_Financial,4.03030303030303 +ACES_4.25,TP_Financial,4.0 +ACES_4.5,TP_Financial,4.175 +ACES_4.75,TP_Financial,4.0 +ACES_5.0,TP_Financial,4.3076923076923075 +ACES_5.25+,TP_Financial,3.823529411764706 +ACES_5.5,TP_Financial,4.666666666666667 +Dem_Gender_Woman,TP_Neighbor,4.3907284768211925 +Dem_Gender_Man,TP_Neighbor,4.0562770562770565 +Dem_Gender_Other,TP_Neighbor,4.803571428571429 +ACES_Compound,TP_Neighbor,4.351063829787234 +ACES_No,TP_Neighbor,4.268518518518518 +ACES_Yes,TP_Neighbor,4.336585365853659 +ACES_0.0,TP_Neighbor,4.273062730627307 +ACES_0.25,TP_Neighbor,4.23404255319149 +ACES_0.5,TP_Neighbor,4.004926108374384 +ACES_0.75,TP_Neighbor,4.515151515151516 +ACES_1.0,TP_Neighbor,4.351063829787234 +ACES_1.25,TP_Neighbor,4.574074074074074 +ACES_1.5,TP_Neighbor,4.410852713178294 +ACES_1.75,TP_Neighbor,4.428571428571429 +ACES_2.0,TP_Neighbor,4.3 +ACES_2.25,TP_Neighbor,4.543859649122807 +ACES_2.5,TP_Neighbor,4.4125 +ACES_2.75,TP_Neighbor,4.2 +ACES_3.0,TP_Neighbor,4.25 +ACES_3.25,TP_Neighbor,4.571428571428571 +ACES_3.5,TP_Neighbor,4.096153846153846 +ACES_3.75,TP_Neighbor,4.84 +ACES_4.0,TP_Neighbor,4.636363636363637 +ACES_4.25,TP_Neighbor,4.230769230769231 +ACES_4.5,TP_Neighbor,4.325 +ACES_4.75,TP_Neighbor,4.8 +ACES_5.0,TP_Neighbor,4.230769230769231 +ACES_5.25+,TP_Neighbor,4.470588235294118 +ACES_5.5,TP_Neighbor,4.722222222222222 +Dem_Gender_Woman,TP_Acquaintance,4.478476821192053 +Dem_Gender_Man,TP_Acquaintance,4.0 +Dem_Gender_Other,TP_Acquaintance,4.446428571428571 +ACES_Compound,TP_Acquaintance,4.473404255319149 +ACES_No,TP_Acquaintance,4.404320987654321 +ACES_Yes,TP_Acquaintance,4.4117168429617575 +ACES_0.0,TP_Acquaintance,4.498154981549815 +ACES_0.25,TP_Acquaintance,4.0638297872340425 +ACES_0.5,TP_Acquaintance,4.014778325123153 +ACES_0.75,TP_Acquaintance,4.757575757575758 +ACES_1.0,TP_Acquaintance,4.473404255319149 +ACES_1.25,TP_Acquaintance,4.5 +ACES_1.5,TP_Acquaintance,4.449612403100775 +ACES_1.75,TP_Acquaintance,4.775510204081633 +ACES_2.0,TP_Acquaintance,4.42 +ACES_2.25,TP_Acquaintance,4.43859649122807 +ACES_2.5,TP_Acquaintance,4.5 +ACES_2.75,TP_Acquaintance,4.233333333333333 +ACES_3.0,TP_Acquaintance,4.46875 +ACES_3.25,TP_Acquaintance,4.821428571428571 +ACES_3.5,TP_Acquaintance,4.235294117647059 +ACES_3.75,TP_Acquaintance,4.72 +ACES_4.0,TP_Acquaintance,4.303030303030303 +ACES_4.25,TP_Acquaintance,4.615384615384615 +ACES_4.5,TP_Acquaintance,4.425 +ACES_4.75,TP_Acquaintance,4.8 +ACES_5.0,TP_Acquaintance,4.230769230769231 +ACES_5.25+,TP_Acquaintance,4.647058823529412 +ACES_5.5,TP_Acquaintance,4.277777777777778 +Dem_Gender_Woman,TP_Co_worker,4.274834437086093 +Dem_Gender_Man,TP_Co_worker,3.9047619047619047 +Dem_Gender_Other,TP_Co_worker,4.071428571428571 +ACES_Compound,TP_Co_worker,4.281914893617022 +ACES_No,TP_Co_worker,4.179012345679013 +ACES_Yes,TP_Co_worker,4.206672091131001 +ACES_0.0,TP_Co_worker,4.265682656826568 +ACES_0.25,TP_Co_worker,3.851063829787234 +ACES_0.5,TP_Co_worker,3.9310344827586206 +ACES_0.75,TP_Co_worker,4.575757575757576 +ACES_1.0,TP_Co_worker,4.281914893617022 +ACES_1.25,TP_Co_worker,4.2592592592592595 +ACES_1.5,TP_Co_worker,4.232558139534884 +ACES_1.75,TP_Co_worker,4.530612244897959 +ACES_2.0,TP_Co_worker,4.27 +ACES_2.25,TP_Co_worker,4.25 +ACES_2.5,TP_Co_worker,4.2 +ACES_2.75,TP_Co_worker,3.933333333333333 +ACES_3.0,TP_Co_worker,4.375 +ACES_3.25,TP_Co_worker,4.607142857142857 +ACES_3.5,TP_Co_worker,3.769230769230769 +ACES_3.75,TP_Co_worker,4.84 +ACES_4.0,TP_Co_worker,4.151515151515151 +ACES_4.25,TP_Co_worker,4.0 +ACES_4.5,TP_Co_worker,4.075 +ACES_4.75,TP_Co_worker,3.8 +ACES_5.0,TP_Co_worker,4.153846153846154 +ACES_5.25+,TP_Co_worker,4.0588235294117645 +ACES_5.5,TP_Co_worker,4.277777777777778 +Dem_Gender_Woman,TP_School,3.728476821192053 +Dem_Gender_Man,TP_School,3.5108225108225106 +Dem_Gender_Other,TP_School,4.080357142857143 +ACES_Compound,TP_School,3.904255319148936 +ACES_No,TP_School,3.6080246913580245 +ACES_Yes,TP_School,3.8585365853658535 +ACES_0.0,TP_School,3.5977859778597785 +ACES_0.25,TP_School,3.6595744680851063 +ACES_0.5,TP_School,3.6206896551724137 +ACES_0.75,TP_School,4.181818181818182 +ACES_1.0,TP_School,3.904255319148936 +ACES_1.25,TP_School,4.148148148148148 +ACES_1.5,TP_School,3.9844961240310077 +ACES_1.75,TP_School,4.224489795918367 +ACES_2.0,TP_School,3.64 +ACES_2.25,TP_School,3.807017543859649 +ACES_2.5,TP_School,3.9 +ACES_2.75,TP_School,3.9 +ACES_3.0,TP_School,3.71875 +ACES_3.25,TP_School,4.321428571428571 +ACES_3.5,TP_School,3.75 +ACES_3.75,TP_School,3.72 +ACES_4.0,TP_School,3.6666666666666665 +ACES_4.25,TP_School,4.0 +ACES_4.5,TP_School,4.0 +ACES_4.75,TP_School,3.4 +ACES_5.0,TP_School,4.153846153846154 +ACES_5.25+,TP_School,4.0588235294117645 +ACES_5.5,TP_School,3.8333333333333335 +Dem_Gender_Woman,TP_Researcher,3.2918739635157546 +Dem_Gender_Man,TP_Researcher,2.935064935064935 +Dem_Gender_Other,TP_Researcher,3.1607142857142856 +ACES_Compound,TP_Researcher,3.398936170212766 +ACES_No,TP_Researcher,3.234567901234568 +ACES_Yes,TP_Researcher,3.3526058631921822 +ACES_0.0,TP_Researcher,3.236162361623616 +ACES_0.25,TP_Researcher,3.1914893617021276 +ACES_0.5,TP_Researcher,3.2610837438423643 +ACES_0.75,TP_Researcher,3.4545454545454546 +ACES_1.0,TP_Researcher,3.398936170212766 +ACES_1.25,TP_Researcher,3.2037037037037037 +ACES_1.5,TP_Researcher,3.511627906976744 +ACES_1.75,TP_Researcher,3.7142857142857144 +ACES_2.0,TP_Researcher,3.31 +ACES_2.25,TP_Researcher,3.267857142857143 +ACES_2.5,TP_Researcher,3.575 +ACES_2.75,TP_Researcher,3.466666666666667 +ACES_3.0,TP_Researcher,3.5238095238095237 +ACES_3.25,TP_Researcher,3.642857142857143 +ACES_3.5,TP_Researcher,3.3076923076923075 +ACES_3.75,TP_Researcher,2.96 +ACES_4.0,TP_Researcher,2.8484848484848486 +ACES_4.25,TP_Researcher,2.6153846153846154 +ACES_4.5,TP_Researcher,3.275 +ACES_4.75,TP_Researcher,2.7 +ACES_5.0,TP_Researcher,3.923076923076923 +ACES_5.25+,TP_Researcher,2.764705882352941 +ACES_5.5,TP_Researcher,3.1666666666666665 +Dem_Gender_Woman,TP_Platform,4.774834437086093 +Dem_Gender_Man,TP_Platform,4.632034632034632 +Dem_Gender_Other,TP_Platform,4.783783783783784 +ACES_Compound,TP_Platform,4.835106382978723 +ACES_No,TP_Platform,4.691358024691358 +ACES_Yes,TP_Platform,4.778681855166802 +ACES_0.0,TP_Platform,4.7380073800738005 +ACES_0.25,TP_Platform,4.531914893617022 +ACES_0.5,TP_Platform,4.502463054187192 +ACES_0.75,TP_Platform,4.818181818181818 +ACES_1.0,TP_Platform,4.835106382978723 +ACES_1.25,TP_Platform,4.907407407407407 +ACES_1.5,TP_Platform,4.930232558139535 +ACES_1.75,TP_Platform,5.142857142857143 +ACES_2.0,TP_Platform,4.94 +ACES_2.25,TP_Platform,4.824561403508772 +ACES_2.5,TP_Platform,4.7594936708860756 +ACES_2.75,TP_Platform,4.7 +ACES_3.0,TP_Platform,4.671875 +ACES_3.25,TP_Platform,4.928571428571429 +ACES_3.5,TP_Platform,4.519230769230769 +ACES_3.75,TP_Platform,4.68 +ACES_4.0,TP_Platform,4.7272727272727275 +ACES_4.25,TP_Platform,4.769230769230769 +ACES_4.5,TP_Platform,4.775 +ACES_4.75,TP_Platform,4.9 +ACES_5.0,TP_Platform,4.769230769230769 +ACES_5.25+,TP_Platform,4.470588235294118 +ACES_5.5,TP_Platform,5.0 +Dem_Gender_Woman,TP_NonProf,4.076158940397351 +Dem_Gender_Man,TP_NonProf,3.787878787878788 +Dem_Gender_Other,TP_NonProf,4.0625 +ACES_Compound,TP_NonProf,4.23404255319149 +ACES_No,TP_NonProf,3.941358024691358 +ACES_Yes,TP_NonProf,4.113100081366965 +ACES_0.0,TP_NonProf,3.974169741697417 +ACES_0.25,TP_NonProf,3.765957446808511 +ACES_0.5,TP_NonProf,3.9064039408866993 +ACES_0.75,TP_NonProf,4.090909090909091 +ACES_1.0,TP_NonProf,4.23404255319149 +ACES_1.25,TP_NonProf,4.037037037037037 +ACES_1.5,TP_NonProf,4.224806201550388 +ACES_1.75,TP_NonProf,4.387755102040816 +ACES_2.0,TP_NonProf,4.29 +ACES_2.25,TP_NonProf,4.107142857142857 +ACES_2.5,TP_NonProf,4.2125 +ACES_2.75,TP_NonProf,3.9 +ACES_3.0,TP_NonProf,3.921875 +ACES_3.25,TP_NonProf,4.428571428571429 +ACES_3.5,TP_NonProf,4.0 +ACES_3.75,TP_NonProf,3.92 +ACES_4.0,TP_NonProf,4.151515151515151 +ACES_4.25,TP_NonProf,3.6923076923076925 +ACES_4.5,TP_NonProf,4.075 +ACES_4.75,TP_NonProf,3.4 +ACES_5.0,TP_NonProf,4.384615384615385 +ACES_5.25+,TP_NonProf,3.8823529411764706 +ACES_5.5,TP_NonProf,4.277777777777778 +Dem_Gender_Woman,TP_Company_cust,4.736318407960199 +Dem_Gender_Man,TP_Company_cust,4.445887445887446 +Dem_Gender_Other,TP_Company_cust,4.919642857142857 +ACES_Compound,TP_Company_cust,4.828877005347594 +ACES_No,TP_Company_cust,4.58641975308642 +ACES_Yes,TP_Company_cust,4.695687550854353 +ACES_0.0,TP_Company_cust,4.612546125461255 +ACES_0.25,TP_Company_cust,4.638297872340425 +ACES_0.5,TP_Company_cust,4.4926108374384235 +ACES_0.75,TP_Company_cust,4.878787878787879 +ACES_1.0,TP_Company_cust,4.828877005347594 +ACES_1.25,TP_Company_cust,4.814814814814815 +ACES_1.5,TP_Company_cust,4.75968992248062 +ACES_1.75,TP_Company_cust,4.795918367346939 +ACES_2.0,TP_Company_cust,4.74 +ACES_2.25,TP_Company_cust,4.649122807017544 +ACES_2.5,TP_Company_cust,4.6625 +ACES_2.75,TP_Company_cust,4.633333333333334 +ACES_3.0,TP_Company_cust,4.625 +ACES_3.25,TP_Company_cust,4.642857142857143 +ACES_3.5,TP_Company_cust,4.6923076923076925 +ACES_3.75,TP_Company_cust,4.84 +ACES_4.0,TP_Company_cust,4.7272727272727275 +ACES_4.25,TP_Company_cust,4.538461538461538 +ACES_4.5,TP_Company_cust,4.425 +ACES_4.75,TP_Company_cust,4.8 +ACES_5.0,TP_Company_cust,4.615384615384615 +ACES_5.25+,TP_Company_cust,4.411764705882353 +ACES_5.5,TP_Company_cust,4.833333333333333 +Dem_Gender_Woman,TP_Company_notcust,5.48172757475083 +Dem_Gender_Man,TP_Company_notcust,5.298701298701299 +Dem_Gender_Other,TP_Company_notcust,5.580357142857143 +ACES_Compound,TP_Company_notcust,5.572192513368984 +ACES_No,TP_Company_notcust,5.4753086419753085 +ACES_Yes,TP_Company_notcust,5.438925081433225 +ACES_0.0,TP_Company_notcust,5.520295202952029 +ACES_0.25,TP_Company_notcust,5.382978723404255 +ACES_0.5,TP_Company_notcust,5.187192118226601 +ACES_0.75,TP_Company_notcust,5.545454545454546 +ACES_1.0,TP_Company_notcust,5.572192513368984 +ACES_1.25,TP_Company_notcust,5.537037037037037 +ACES_1.5,TP_Company_notcust,5.40625 +ACES_1.75,TP_Company_notcust,5.816326530612245 +ACES_2.0,TP_Company_notcust,5.53 +ACES_2.25,TP_Company_notcust,5.508771929824562 +ACES_2.5,TP_Company_notcust,5.35 +ACES_2.75,TP_Company_notcust,5.266666666666667 +ACES_3.0,TP_Company_notcust,5.53125 +ACES_3.25,TP_Company_notcust,5.785714285714286 +ACES_3.5,TP_Company_notcust,5.288461538461538 +ACES_3.75,TP_Company_notcust,5.8 +ACES_4.0,TP_Company_notcust,5.333333333333333 +ACES_4.25,TP_Company_notcust,5.0 +ACES_4.5,TP_Company_notcust,5.15 +ACES_4.75,TP_Company_notcust,6.1 +ACES_5.0,TP_Company_notcust,5.153846153846154 +ACES_5.25+,TP_Company_notcust,5.0 +ACES_5.5,TP_Company_notcust,5.611111111111111 +Dem_Gender_Woman,TP_Stranger,6.029900332225914 +Dem_Gender_Man,TP_Stranger,5.67965367965368 +Dem_Gender_Other,TP_Stranger,5.928571428571429 +ACES_Compound,TP_Stranger,6.074866310160428 +ACES_No,TP_Stranger,5.96594427244582 +ACES_Yes,TP_Stranger,5.9015459723352315 +ACES_0.0,TP_Stranger,6.025925925925926 +ACES_0.25,TP_Stranger,5.723404255319149 +ACES_0.5,TP_Stranger,5.586206896551724 +ACES_0.75,TP_Stranger,6.181818181818182 +ACES_1.0,TP_Stranger,6.074866310160428 +ACES_1.25,TP_Stranger,5.888888888888889 +ACES_1.5,TP_Stranger,5.906976744186046 +ACES_1.75,TP_Stranger,5.938775510204081 +ACES_2.0,TP_Stranger,5.92 +ACES_2.25,TP_Stranger,6.280701754385965 +ACES_2.5,TP_Stranger,5.9625 +ACES_2.75,TP_Stranger,5.566666666666666 +ACES_3.0,TP_Stranger,6.0 +ACES_3.25,TP_Stranger,6.035714285714286 +ACES_3.5,TP_Stranger,5.923076923076923 +ACES_3.75,TP_Stranger,6.6 +ACES_4.0,TP_Stranger,5.696969696969697 +ACES_4.25,TP_Stranger,5.769230769230769 +ACES_4.5,TP_Stranger,5.475 +ACES_4.75,TP_Stranger,6.3 +ACES_5.0,TP_Stranger,5.923076923076923 +ACES_5.25+,TP_Stranger,5.411764705882353 +ACES_5.5,TP_Stranger,5.833333333333333 \ No newline at end of file diff --git a/frontend/src/lib/stories/dark-data-survey/utils/institutionColors.js b/frontend/src/lib/stories/dark-data-survey/utils/institutionColors.js index 6ca513fa..d087cc71 100644 --- a/frontend/src/lib/stories/dark-data-survey/utils/institutionColors.js +++ b/frontend/src/lib/stories/dark-data-survey/utils/institutionColors.js @@ -35,11 +35,7 @@ export const institutionColorMap = { 'TP_Stranger': '#6b7280' }; -/** - * Get color for an institution - * @param {string} institution - Institution name (e.g., 'TP_Friend') - * @returns {string} Hex color code - */ + export function getInstitutionColor(institution) { return institutionColorMap[institution] || '#6b7280'; // Default to gray } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..ce10a201 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "complex-stories", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}