gentzkow / GentzkowLabTemplate

MIT License
1 stars 3 forks source link

Add `save_data` command #33

Open Xingtong-Jiang opened 2 weeks ago

Xingtong-Jiang commented 2 weeks ago

I'm opening this issue to incorporate the save_data command (in R / Stata / Python) into our template, per conversation here:

Xingtong: We currently don't have the save_data command in our new shell-based template, nor is it on the list of our next steps for improving the template. While it might not be a top priority, I guess this type of command can be very useful, at least in lab work. Do you think we should add the development of this kind of tool to our to-do list?

MG: Yes! We definitely want to keep using save_data. The actual command is written in R / Stata / Python so it shouldn't require any new work, right? We'll just need to bundle the commands into the template so users have them handy? I think it would be natural to include them in /examples/stata/, /examples/R/, etc. and direct the user to move them to /lib/stata/, /lib/R/, etc.

The following needs to be done:

I'm assigning myself to work on this.

cc: @ShiqiYang2022 @lucamlouzada

lucamlouzada commented 6 days ago

Per offline discussion with @Xingtong-Jiang, I'll work on this issue

lucamlouzada commented 5 days ago

I have just copied the commands in 655ed1d. They are basically the original scripts from gslab, with an added description in the beginning. While testing, I found a possible error in SaveData.R and have opened an issue in gslab-econ/gslab_r. I will open a PR here with suggestions for testing after that issue is closed, to avoid having to edit SaveData.R multiple times.

lucamlouzada commented 5 days ago

I have updated the local copy of SaveData.R following the fix implemented in https://github.com/gslab-econ/gslab_r/pull/40.

zhizhongpu commented 4 days ago

just a quick note that we at JMS lab have moved development on SaveData python to here: https://github.com/JMSLab/Template/blob/main/source/lib/SaveData.py, which is currently a few versions ahead of the version in gslab_python