Is the data you need already on FASSE? Check out the catalog here: https://nsaph.info/analytic.html#analytic-data
If it is not, see step 2.
The format of the form goes like this:
Is the data you need already on FASSE? Check out the catalog here: https://nsaph.info/analytic.html#analytic-data
If it is not, see step 2.
The format of the form goes like this:
|-hospital
| |-zip.rds
| |-zip2.rds
| |-SA_COPD2.Rmd
| |-review.R
| |-SA_MI-New.Rmd
| |-SA_CHF2.Rmd
| |-SA_LungCancer2.Rmd
| |-SA_LungCancer-New.Rmd
import pandas as pd | |
import numpy as np | |
import json | |
from simplejson import loads | |
def get_outcomes(): | |
""" Get and return ICD codes """"" | |
f = open('icd_codes.json') | |
outcomes_ = json.load(f) |
{ | |
"aki": { | |
"icd10": [ | |
"N17" | |
], | |
"icd9": [ | |
"584" | |
] | |
}, | |
"all_kidney": { |
# Before running, activate env: | |
# export CONDA_ENVS_PATH=/nfs/projects/n/nsaph_common/conda/envs/ | |
# export CONDA_PKGS_PATH=/nfs/projects/n/nsaph_common/conda/pkgs/ | |
# source activate nsaph | |
## Code to ID hospitalizations | |
library(data.table) |
To get the data sample, we take first 25k rows and last 25k rows from the sample of 59mil rows in bash:
>> tail -n25000 /2016/mbsf_abcd_summary_res000017155_req008183_2016.dat \
> sample_mbsf_abcd_summary_res000017155_req008183_2016.dat
>> head -n25000 /2016/mbsf_abcd_summary_res000017155_req008183_2016.dat \
>> sample_mbsf_abcd_summary_res000017155_req008183_2016.dat
# word count:
from flask import Flask, redirect, url_for | |
from celery import Celery | |
from celery import Task | |
from subprocess import PIPE, Popen | |
import logging, os | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger(__name__) | |
# Running locally: |
# run this as "python clean_code.py $PWD" | |
import os | |
import re | |
import sys | |
import glob | |
import codecs | |
import chardet | |
import fileinput | |
list_of_r_files = glob.glob("*.R") |