Giter Site home page Giter Site logo

mit-elos's Introduction

SOFA Components' and End-of-Life-Survey

Based on https://github.com/yugangjia/ELOS-MIMICIV.git

How to run this project?

1. Get the Data!

Both MIMIC and eICU data can be found in PhysioNet, a repository of freely-available medical research data, managed by the MIT Laboratory for Computational Physiology. Due to its sensitive nature, credentialing is required to access both datasets.

Documentation for MIMIC-IV's can be found here and for eICU here.

Integration with Google Cloud Platform (GCP)

In this section, we explain how to set up GCP and your environment in order to run SQL queries through GCP right from your local Python setting. Follow these steps:

  1. Create a Google account if you don't have one and go to Google Cloud Platform
  2. Enable the BigQuery API
  3. Create a Service Account, where you can download your JSON keys
  4. Place your JSON keys in the parent folder (for example) of your project
  5. Create a .env file with the command cp env.example env
  6. Update your .env file with your JSON keys path and the id of your project in BigQuery

MIMIC-IV

After getting credentialing at PhysioNet, you must sign the data use agreement and connect the database with GCP, either asking for permission or uploading the data to your project. Please note that only MIMIC v2.0 is available at GCP.

Having all the necessary tables for the cohort generation query in your project, run the following command to fetch the data as a dataframe that will be saved as CSV in your local project. Make sure you have all required files and folders.

python3 src/py/get_data.py --dataset "MIMIC"

This will create the file data/MIMIC_data.csv

With the following command, you can get the same cohort we used for the study:

source("src/r/cohort_MIMIC.R")

This will create the files data/cohorts/MIMIC_cohort.csv.

eICU-CRD

The rationale for eICU-CRD is similar. Run the following commands:

python3 src/py/get_data.py --dataset "eICU"

This creates the file data/eICU_data.csv

source("src/r/cohort_eICU.R")

This creates the files data/cohorts/eICU_cohort.csv.

2. Run the Statistical Models/Regressions

We made it really easy for you in this part. All you have to do is:

source("src/r/model.R")

And you'll get the results here: results/models

How to contribute?

We are actively working on this project. Feel free to raise questions opening an issue, send an email to [email protected] or to fork this project and submit a pull request! This project was done by Yugang Jia.

mit-elos's People

Contributors

mirkompcr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.