From 82df775082c41094a28a90687d9b3aa770185a5e Mon Sep 17 00:00:00 2001 From: Jan Diehm Date: Fri, 24 May 2024 08:52:58 -0500 Subject: [PATCH] just flagged wines --- src/components/PhotoTest.svelte | 9 +- src/data/false-wines.csv | 211 ++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 src/data/false-wines.csv diff --git a/src/components/PhotoTest.svelte b/src/components/PhotoTest.svelte index cf8a9f75..815144fa 100644 --- a/src/components/PhotoTest.svelte +++ b/src/components/PhotoTest.svelte @@ -6,9 +6,14 @@ import { onMount } from "svelte"; import Select from "$components/helpers/Select.svelte"; import data from "$data/withGPTData.csv"; + import falseWines from "$data/false-wines.csv"; import { select, csvFormat } from "d3"; - const animals = data.filter(d => d.gptAnimal !== "none" && d.gptAnimal !== ""); - const noAnimals = data.filter(d => d.gptAnimal == "none"); + const falseWineList = falseWines.map(item => item.id); + let animals = data.filter(d => d.gptAnimal !== "none" && d.gptAnimal !== ""); + animals = animals.filter(obj => falseWineList.includes(obj.id)); + console.log(animals.length) + let noAnimals = data.filter(d => d.gptAnimal == "none"); + noAnimals = noAnimals.filter(obj => falseWineList.includes(obj.id)); let options = ["animals/humans", "no animals"]; let highlight = false; let csvElement; diff --git a/src/data/false-wines.csv b/src/data/false-wines.csv new file mode 100644 index 00000000..1d904fd5 --- /dev/null +++ b/src/data/false-wines.csv @@ -0,0 +1,211 @@ +id +171031674 +143500437 +1469650 +19637032 +170775092 +166079359 +174418837 +157002393 +167174866 +162349497 +168840924 +169071251 +173571165 +163056477 +164105822 +172529095 +171712610 +167614936 +170855353 +174233758 +163628300 +170152356 +2361157 +171156903 +162883702 +172610593 +170052007 +170461185 +176552022 +156833403 +170391729 +171302941 +165802585 +160300184 +156117872 +23726985 +3029728 +169225567 +16935553 +156101231 +156717735 +163115066 +161847593 +2083316 +169689376 +168053858 +171278776 +159831833 +168437020 +173179331 +174167224 +168747407 +174266494 +174014293 +170262152 +161280413 +174745526 +169502722 +85559438 +141531896 +172443429 +161565134 +156697356 +160175668 +158364347 +147804373 +175378162 +167326259 +170553056 +167036083 +156513116 +174364783 +171638984 +162961174 +175058474 +148189904 +173012714 +159905275 +163091436 +173973011 +172623625 +166373829 +167307004 +166549859 +174050917 +170789857 +170477700 +170776019 +175751744 +169546178 +175727990 +171826041 +173467589 +1504513 +171297627 +167738974 +158131659 +167409968 +173239655 +168982342 +1438824 +170243905 +18480904 +164142933 +170064637 +74781468 +108269435 +160276347 +166298574 +163081929 +149644611 +154902267 +153402387 +142945679 +164124772 +171942717 +158760657 +163248453 +156710555 +159448992 +2480626 +171313180 +169048759 +173384474 +170896542 +169001621 +173444620 +174104123 +173734300 +147537161 +168463457 +165849809 +167406543 +173608476 +171314385 +174697963 +171723558 +150272989 +163171200 +154387897 +172925714 +172621259 +168076764 +170103483 +168265045 +175956703 +164007593 +164171505 +164012069 +171558833 +165132914 +171992143 +168938755 +3417051 +171505516 +173340102 +168052194 +167585512 +174330376 +162108938 +171083489 +164224891 +155662001 +143974257 +170111839 +172261975 +4909655 +171436946 +151922489 +33074212 +170786326 +166472653 +168217116 +172101284 +146648518 +167384238 +7896479 +173988963 +164387233 +163939826 +170715703 +176113705 +168727420 +175850163 +175221843 +172127400 +175659429 +173028401 +170579916 +162906975 +161373490 +167324613 +163515977 +171700149 +157995480 +160448595 +163849186 +170961524 +170883368 +168322511 +168813206 +172168448 +161128063 +170410855 +169484049 +173522794 +168800059 +168321142 +170720712 +171968566 \ No newline at end of file