havakv / pycox

Survival analysis with PyTorch
BSD 2-Clause "Simplified" License
803 stars 188 forks source link

Having troubles with downloading FLCHAIN dataset #81

Closed MrHuff closed 3 years ago

MrHuff commented 3 years ago

Hi!

Thank you for making this library, it's epic.

Having an issue when trying to download the FLCHAIN dataset, it gives me 404 error.

Thanks for the help!

Best regards, Robert

MrHuff commented 3 years ago

Found the bug, you have to change the url link in

def download_from_rdatasets(package, name): datasets = (pd.read_csv("https://github.com/vincentarelbundock/Rdatasets/blob/master/datasets.csv") .loc[lambda x: x['Package'] == package].set_index('Item')) if not name in datasets.index: raise ValueError(f"Dataset {name} not found.") info = datasets.loc[name] url = info.CSV return pd.read_csv(url), info

to

def download_from_rdatasets(package, name): datasets = (pd.read_csv("https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/datasets.csv") .loc[lambda x: x['Package'] == package].set_index('Item')) if not name in datasets.index: raise ValueError(f"Dataset {name} not found.") info = datasets.loc[name] url = info.CSV return pd.read_csv(url), info

havakv commented 3 years ago

Nice work! Do you want to make an PR for this, or should I just do it?

MrHuff commented 3 years ago

Please do it!