Skip to content

Commit

Permalink
setup for s3 rerun
Browse files Browse the repository at this point in the history
  • Loading branch information
mlisnic committed Dec 3, 2024
1 parent 8f22135 commit f358640
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 58 deletions.
98 changes: 48 additions & 50 deletions public/sandbox/config-sandbox.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
{
"$schema": "https://raw.githubusercontent.com/visdesignlab/viz-guardrails-study/main/src/parser/StudyConfigSchema.json",
"studyMetadata": {
"title": "Guardrail Sandbox",
"version": "pilot",
"authors": ["VDL"],
"date": "2024-01-11",
"description": "A sandbox interface to explore guardrails.",
"organizations": ["University of Utah"]
},
"uiConfig": {
"contactEmail": "maxim.lisnic@utah.edu",
"logoPath": "assets/revisitLogoSquare.svg",
"withProgressBar": true,
"autoDownloadStudy": false,
"sidebar": false,
"urlParticipantIdParam": "PROLIFIC_PID",
"studyEndMsg": "**Thank you for completing the study. You may click this link and return to Prolific**: [https://app.prolific.com/submissions/complete?cc=C2GIQBF6](https://app.prolific.com/submissions/complete?cc=C2GIQBF6)"
},
"components": {
"interface" : {
"instruction": "",
"instructionLocation": "aboveStimulus",
"type": "react-component",
"path": "viz-guardrails/DataExplorer.tsx",
"parameters": {
"dataset": "clean_data",
"start_date": "2023-01-03",
"end_date": "2023-12-31",
"initial_selection": [],
"allow_time_slider": true,
"allow_guardrail_selector": true,
"allow_selection": true,
"allow_help": false,
"guardrail": "none",
"caption": "",
"x_var": "date",
"y_var": "value",
"cat_var": "name",
"group_var": "region"
},
"nextButtonLocation": "sidebar",
"response": []
}
},
"sequence": {
"order": "fixed",
"components": [
"interface"
]
"$schema": "https://raw.githubusercontent.com/visdesignlab/viz-guardrails-study/main/src/parser/StudyConfigSchema.json",
"studyMetadata": {
"title": "Guardrail Sandbox",
"version": "pilot",
"authors": ["VDL"],
"date": "2024-01-11",
"description": "A sandbox interface to explore guardrails.",
"organizations": ["University of Utah"]
},
"uiConfig": {
"contactEmail": "maxim.lisnic@utah.edu",
"logoPath": "assets/revisitLogoSquare.svg",
"withProgressBar": true,
"autoDownloadStudy": false,
"sidebar": false,
"urlParticipantIdParam": "PROLIFIC_PID",
"studyEndMsg": "**Thank you for completing the study. You may click this link and return to Prolific**: [https://app.prolific.com/submissions/complete?cc=C2GIQBF6](https://app.prolific.com/submissions/complete?cc=C2GIQBF6)"
},
"components": {
"interface": {
"instruction": "",
"instructionLocation": "aboveStimulus",
"type": "react-component",
"path": "viz-guardrails/DataExplorer.tsx",
"parameters": {
"dataset": "clean_data",
"start_date": "2023-01-03",
"end_date": "2023-12-31",
"initial_selection": [],
"allow_time_slider": true,
"allow_guardrail_selector": true,
"allow_selection": true,
"allow_help": false,
"guardrail": "none",
"caption": "",
"x_var": "date",
"y_var": "value",
"cat_var": "location",
"group_var": "region"
},
"nextButtonLocation": "sidebar",
"response": []
}
}
},
"sequence": {
"order": "fixed",
"components": ["interface"]
}
}
16 changes: 14 additions & 2 deletions public/stage-3/config-stage-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,21 @@
"order": "latinSquare",
"numSamples": 1,
"components": [
"stock-simple-c-ss",
"stock-simple-a-sd",
"stock-simple-a-ss",
"stock-simple-e-ss"
"stock-simple-a-jd",
"stock-simple-a-js",
"stock-simple-a-n",
"stock-simple-e-sd",
"stock-simple-e-ss",
"stock-simple-e-jd",
"stock-simple-e-js",
"stock-simple-e-n",
"stock-simple-c-sd",
"stock-simple-c-ss",
"stock-simple-c-jd",
"stock-simple-c-js",
"stock-simple-c-n"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion public/stage-3/consent_stage3.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The data collected in this study is only being used for the present study and no

#### Cost/Payment

You will be compensated $1 for participating via Prolific.
You will be compensated $0.75 for participating via Prolific.

#### Contact

Expand Down
4 changes: 2 additions & 2 deletions src/public/viz-guardrails/DataExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ export function DataExplorer({ parameters, setAnswer }: StimulusParams<ChartPara
<Text fw={500}>
{dataname === 'clean_stocks' ? 'Percent change in stock price' : 'Infections per million people'}
</Text>
{guardrail === 'super_summDELETE' ? (
{guardrail === 'super_summ' ? (
<Text fz="xs" c="dimmed">Shaded area contains the industry average and shows the middle 50% of all values in the industry.</Text>
) : null}
{guardrail === 'juxt_summ' ? (
<Text fz="xs" c="dimmed">Bar on the left highlights the range of selection among all data.</Text>
<Text fz="xs" c="dimmed">Bar on the left highlights the range of selected stocks among all stocks in the industry.</Text>
) : null}
</Stack>
{parameters.allow_help ? <Help parameters={parameters} /> : null}
Expand Down
8 changes: 5 additions & 3 deletions src/public/viz-guardrails/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export function LineChart({

const averageLabel = useMemo(() => (dataname === 'clean_stocks' ? 'Industry Average' : 'Average'), [dataname]);

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getPolicyLabel = (country: string) => {
if (country === 'Eldoril North') {
return 'Policy A';
Expand Down Expand Up @@ -229,7 +230,8 @@ export function LineChart({

const pos = labels?.map((x) => ({
country: x as string,
country_policy: (dataname === 'clean_data' ? (`${x} (${getPolicyLabel(x)})`) : x) as string,
// eslint-disable-next-line spaced-comment
country_policy: x as string, //(dataname === 'clean_data' ? (`${x} (${getPolicyLabel(x)})`) : x) as string,
label_pos: (x === averageLabel
? (superimposeSummary?.data.slice(-1).map((val) => yScale(val.mean))[0]) as number
: (data.filter((val) => val[parameters.cat_var] === x).slice(-1).map((val) => yScale(val[parameters.y_var]))[0]) as number),
Expand Down Expand Up @@ -301,14 +303,14 @@ export function LineChart({
<svg key="control_bands" style={{ width: `${width}` }}>
{superimposeSummary ? (
<g key="summary_g">
{/* <path
<path
id="confidenceBands"
key="confidenceBands_key"
fill="lightgray"
opacity={0.25}
stroke="none"
d={superimposeSummary.confidenceBands}
/> */}
/>
<path
id="meanLine"
key="meanLine_key"
Expand Down

0 comments on commit f358640

Please sign in to comment.