Code & installation
Browser app
Upload a CSV, bind its observed columns to your graph, and run the published CausalScience SDK on your device. No local Python installation is needed for the app.
The worker uses Pyodide 0.27.7 and the unmodified CausalScience 0.1.0a13 wheel in memory. Its first run downloads the runtime, SDK and dependencies. Your CSV and numerical calculation stay in your browser.
Install the public Python package
Use Python 3.11 or later in your project environment. The PyPI distribution is CausalScience; the Python import is causalscience.
python -m pip install "CausalScience==0.1.0a13"
python -c "import causalscience as cs; print(cs.__version__)"
python -m causalscience.demo
Use the official installation guide for environment setup and platform-specific instructions. The source checkout's causalengine namespace is a separate development route.
Replay an app result
- Open a result's Details → Calculation code.
- Select Download data and save
causalengine-estimate.csv. - Select Download .py and keep both files in one folder.
- With the public package installed, run
python reproduce_estimate.py.
The code calls the same public API with the original graph, complete ordered outcome list, ordered columns, bindings, actions, seed, backend and search options. A multi-outcome APO is one full-list SDK fit; ATE uses that same full list in two regime fits. Display cards select coordinates without refitting. It records the SDK and dependency versions from the browser run. The replay checks the recorded package/dependency versions and data hash and stops if they differ. Match the versions recorded in the script before comparing results. Native Python and WebAssembly can still use different builds; bitwise equality is not promised.
An unsupported request remains unsupported. A replay does not turn an identification success into a supported numerical estimate, and it does not add a causal confidence interval.
API documentation
The app uses import causalscience as cs. Inspect the actual call and SDK result in Details before reproducing a calculation.