STATA in DataIku
Hi all,
I am aiming at running Jupyter notebooks with STATA interpretation capability. I wonder if there has been any similar efforts so far. It would be great to give me some hints.
Useful links:
https://www.stata.com/python/pystata18/
https://github.com/ticoneva/pystata-kernel
I could install STATA on the DSS VM. However, I could not run the examples of STATA code it in the Jupyter notebook:
%%stata UsageError: Cell magic `%%stata` not found.
How would you consider the installation directory of STATA? And how to resolve Cell magic error, assuming its a IPython kernel issue?
If new environment is needed, how do you recommend creating a new environment? maybe by conda?!
Much appreciate it!
Cheers, Farshad
Operating system used: Azure
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,167 Neuron
Start by creating a new code environment in Dataiku and not using Conda to manage. Basically leave all new code env defaults other than the Python version required for your package.
https://knowledge.dataiku.com/latest/code/work-environment/tutorial-code-environments.html
Then create a new Jupyter notebook using the new code env you created. Or change the kernel on the existing notebook via the Kernel menu option.
Answers
-
Thanks, what I did:
I installed the STATA for Linux on the DSS VM, and create a new environment with the required packages. Jupyter notebooks are enabled to use pystata for SATA