Assertive Community Treatment Outcomes

JohnSnowLabs

Files Size Format Created Updated License Source
2 257kB csv zip 4 months ago John Snow Labs Standard License John Snow Labs Data City of New York
Download

Data Files

File Description Size Last changed Download
assertive-community-treatment-outcomes-csv 13kB csv (13kB) , json (151kB)
assertive-community-treatment-outcomes_zip Compressed versions of dataset. Includes normalized CSV and JSON data with original data and datapackage.json. 21kB zip (21kB)

assertive-community-treatment-outcomes-csv  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
OMH_Region 1 string Indicates whether the data represents a Region (Central NY, Hudson River, Long Island, New York City, or Western NY) or is Statewide.
Data_Level_Indicator 2 string Data level indicator indicates whether the row represents program, county, region, or statewide level data
County 3 string Name of the county
Team_County_or_Region 4 string Name of the team/program, county, region, or whether it is Statewide
Number_With_Follow_Up_Data 5 integer Number of currently enrolled ACT recipients who have at least one follow-up
Number_Employed_At_Baseline 6 integer Number of ACT recipients who are employed or hold volunteer positions at baseline
Number_Employed_At_Follow_Up 7 integer Number of ACT recipients who are employed or hold volunteer positions at most recent follow-up
Number_Competitively_Employed_At_Baseline 8 integer Number of ACT recipients who hold competitive employment, with or without formal supports, at baseline
Number_Competitively_Employed_At_Follow_Up 9 integer Number of ACT recipients who hold competitive employment, with or without formal supports, at most recent follow-up
Number_in_Educational_Activity_At_Baseline 10 integer Number of ACT recipients who engage in educational activities at baseline
Number_in_Educational_Activity_At_Follow_Up 11 integer Number of ACT recipients who engage in educational activities at most recent followup.
Number_Hospitalized_At_Baseline 12 integer Number of ACT recipients reported to have 2 or more psychiatric hospitalizations 6 months prior to baseline
Number_Hospitalized_At_Follow_Up 13 integer Number of ACT recipients reported to have 2 or more psychiatric hospitalizations 6 months prior to most recent follow-up
Number_Homeless_At_Baseline 14 integer Number of ACT recipients who were homeless or had an episode of homelessness at baseline
Number_Homeless_At_Follow_Up 15 integer Number of ACT recipients who were homeless or had an episode of homelessness at most recent follow-up
Number_With_Psych_ER_At_Baseline 16 integer Number of ACT recipients with two or more psychiatric Emergency Room visits at baseline
Number_With_Psych_ER_At_Follow_Up 17 integer Number of ACT recipients with two or more psychiatric Emergency Room visits at most recent follow-up
Number_With_Risk_Factors_At_Baseline 18 integer Number of currently enrolled ACT recipients with one or more of any of the following 12 risk factors reported at baseline: expressed suicide threat, physically harmed self and/or attempted suicide, taken property without permission, damaged or destroyed property, created a public disturbance, verbally assaulted another person, threatened assault or physical violence, been suspected of sexual abuse of a child and/or adult, physically abused and/or assaulted a child and/or adult, engaged in arson, was a victim of physical or sexual abuse, wandered or ran away
Number_With_Risk_Factors_At_Follow_Up 19 integer Number of currently enrolled ACT recipients with one or more risk factors reported at most recent follow-up
Number_Treatment_Objectives_Met_Last_Year 20 integer Number of previous year's discharges that were Treatment Objectives Met
Number_Found_Alternative_Services_Last_Year 21 integer Number of previous year's discharges that were Found Alternative Services
Number_Disch_To_Long_Term_Health_Care_Last_Year 22 integer Number of previous year's discharges that were Discharged to Long Term Health Care
Number_Not_Engaged_Last_Year 23 integer Number of previous year's discharges that were Not Engaged
Number_No_Longer_Available_For_Services_Last_Year 24 integer Number of previous year's discharges that were No Longer Available For Services
Number_Other_Discharge_Reason_Last_Year 25 integer Number of previous year's discharges that were Other
Number_Treatment_Objectives_Met_Current_Year 26 integer Number of current year's discharges that were Treatment Objectives Met
Number_Found_Alternative_Services_Current_Year 27 integer Number of current year's discharges that were Found Alternative Services
Number_Discharged_To_Long_Term_Health_Care_Current_Year 28 integer Number of current year's discharges that were Discharged to Long Term Health Care
Number_Not_Engaged_Current_Year 29 integer Number of current year's discharges that were Not Engaged
Number_No_Longer_Available_For_Services_Current_Year 30 integer Number of current year's discharges that were No Longer Available For Services
Number_Other_Discharge_Reason_Current_Year 31 integer Number of current year's discharges that were Other

Import into your tool

Data-cli or just data is the program to get and post your data with the datahub.
Download CLI tool and use it with the datahub almost like you use git with the github:

data get https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes
data info JohnSnowLabs/assertive-community-treatment-outcomes
tree JohnSnowLabs/assertive-community-treatment-outcomes
# Get a list of dataset's resources
curl -L -s https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/datapackage.json | grep path

# Get resources

curl -L https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/r/0.csv

curl -L https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/r/1.zip

If you are using R here's how to get the data you want quickly loaded:

install.packages("jsonlite", repos="https://cran.rstudio.com/")
library("jsonlite")

json_file <- 'https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/datapackage.json'
json_data <- fromJSON(paste(readLines(json_file), collapse=""))

# get list of all resources:
print(json_data$resources$name)

# print all tabular data(if exists any)
for(i in 1:length(json_data$resources$datahub$type)){
  if(json_data$resources$datahub$type[i]=='derived/csv'){
    path_to_file = json_data$resources$path[i]
    data <- read.csv(url(path_to_file))
    print(data)
  }
}

Note: You might need to run the script with root permissions if you are running on Linux machine

Install the Frictionless Data data package library and the pandas itself:

pip install datapackage
pip install pandas

Now you can use the datapackage in the Pandas:

import datapackage
import pandas as pd

data_url = 'https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/datapackage.json'

# to load Data Package into storage
package = datapackage.Package(data_url)

# to load only tabular data
resources = package.resources
for resource in resources:
    if resource.tabular:
        data = pd.read_csv(resource.descriptor['path'])
        print (data)

For Python, first install the `datapackage` library (all the datasets on DataHub are Data Packages):

pip install datapackage

To get Data Package into your Python environment, run following code:

from datapackage import Package

package = Package('https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/datapackage.json')

# print list of all resources:
print(package.resource_names)

# print processed tabular data (if exists any)
for resource in package.resources:
    if resource.descriptor['datahub']['type'] == 'derived/csv':
        print(resource.read())

If you are using JavaScript, please, follow instructions below:

Install data.js module using npm:

  $ npm install data.js

Once the package is installed, use the following code snippet:

const {Dataset} = require('data.js')

const path = 'https://datahub.io/JohnSnowLabs/assertive-community-treatment-outcomes/datapackage.json'

// We're using self-invoking function here as we want to use async-await syntax:
;(async () => {
  const dataset = await Dataset.load(path)
  // get list of all resources:
  for (const id in dataset.resources) {
    console.log(dataset.resources[id]._descriptor.name)
  }
  // get all tabular data(if exists any)
  for (const id in dataset.resources) {
    if (dataset.resources[id]._descriptor.format === "csv") {
      const file = dataset.resources[id]
      // Get a raw stream
      const stream = await file.stream()
      // entire file as a buffer (be careful with large files!)
      const buffer = await file.buffer
      // print data
      stream.pipe(process.stdout)
    }
  }
})()
Datapackage.json