Which patient is going to survive longer? Another guide to using techtonique dot net’s API (with R + Python + the command line) for survival analysis

This article was first published on T. Moudiki's Webpage - Python , and kindly contributed to python-bloggers. (You can report issue about the content on this page here)
Want to share your content on python-bloggers? click here.

In today’s post, we’ll see how to use rush and the probabilistic survival analysis API provided by techtonique.net (along with R and Python) to plot survival curves . Note that the web app also contains a page for plotting these curves, in 1 click. You can also read this post for more Python examples.

First, you’d need to install rush. Here is how I did it:

cd /Users/t/Documents/Python_Packages
git clone https://github.com/jeroenjanssens/rush.git 
export PATH="/Users/t/Documents/Python_Packages/rush/exec:$PATH"
source ~/.zshrc # or source ~/.bashrc
rush --help # check if rush is installed

Now, download and save the following script in your current directory (note that there’s nothing malicious in it). Replace AUTH_TOKEN below by a token that can be found at techtonique.net/token:

Then, at the command line, run:

./2025-05-31-survival.sh

The result plot can be found in your current directory as a PNG file.

image-title-here

To leave a comment for the author, please follow the link and comment on their blog: T. Moudiki's Webpage - Python .

Want to share your content on python-bloggers? click here.