Load csv file

28 views
Skip to first unread message

Mohammadreza Shahsahebi

unread,
May 20, 2022, 5:21:51 PMMay 20
to oTree help & discussion
I want to load a csv file in my experiment in __init__.py file and generate an output based on user selection and generate a graph and show them.

Where should I put my csv file to read it in init file and where should I store the graph generated in init file to show it in the template?

Thanks, 

Chris @ oTree

unread,
May 20, 2022, 5:29:31 PMMay 20
to Mohammadreza Shahsahebi, oTree help & discussion
See “treatments_from_spreadsheet” in otree-snippets: https://www.otreehub.com/projects/otree-snippets/

I recommend generating the graph in the browser, using Highcharts or similar JavaScript library. That is more straightforward than generating it in python code. 

Sent from my phone

On May 21, 2022, at 5:21 AM, Mohammadreza Shahsahebi <mr.sha...@gmail.com> wrote:

I want to load a csv file in my experiment in __init__.py file and generate an output based on user selection and generate a graph and show them.

Where should I put my csv file to read it in init file and where should I store the graph generated in init file to show it in the template?

Thanks, 

--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/f09cfd23-7ae3-4ac4-9fbf-3c2bf45cac61n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages