Getting Started with the PTSD-Repository
The PTSD-Repository contains data from 389 randomized
controlled trials (RCTs) focused on PTSD treatment. If you want to dig into
the data a bit more, these tips can help you navigate the Socrata platform.
Below, we provide quick information for some common tasks, as well as links to
more detailed documentation and step-by-step videos.
On the Socrata platform, you can read our stories that use the PTSD-Repository data and create your own visualizations to learn more about
PTSD treatment. You are not able to manipulate the data or run statistical
analyses on the platform, but you can download the data for your own projects.
We
expect visitors to the site may have varied levels of comfort in working with
data; this guide is intended for anyone.
Top Tips to Get Started
Sign Up with Socrata
Before you get too far, we
encourage you to sign up as a community user. While anyone using the
PTSD-Repository may create visualizations and other content using the data, in
order to save it you will need to sign up with the Socrata platform. This is a quick to-do and within minutes you will
have a username and password to sign into the
site.
Learn About the PTSD-Repository
Our story, About the
PTSD-Repository, offers an overview of what is in the platform. As noted,
data was abstracted (taken) from 389 RCTs of PTSD treatment. To help simplify
use on this platform, data was reformatted into multiple datasets.
The data were formatted in such a way that each table (or
dataset) is intended to capture a core characteristic of the studies. For example,
some tables are at the study level highlighting characteristics of the RCT
overall, such as demographics, methodology (e.g., inclusion/exclusion criteria)
or reference information. Other tables are at the arm level and provide
detailed information about each intervention arm in the RCTs, such as treatment
specifics or outcomes.
To best work with the data in the PTSD-Repository, you first
need to identify which table contains your data of interest. You can learn more about the specific data in
each table in our story, How
the Data Were Organized.
Easily Find What You Need: Data Catalog
Now that you have identified your table of interest, you can go
directly to it. At the top left of the page is a link to our Data Catalog, which is a
“home base” for navigating the site. (If you are not signed in to Socrata, the
Data Catalog is found using the “Browse” tab at the top left.) The Data Catalog
lists all content on the PTSD-Repository. On the left, there is a “View Types”
menu--choosing “Datasets” will give you a list of all data tables included in
the PTSD-Repository. You can also choose to see a list of all “Stories” or
other content options.
Using the search bar at the top of the data catalog is also
an easy way to locate content.
Read Our Stories
We write Data Stories that help you see and interact with
data in the PTSD-Repository. Our stories help you understand the context of
data and see trends using visualizations we created. The combination of text
and visuals you can interact with help explain key themes from PTSD treatment
studies. You can read a preview of all of our data stories.
Interact with Our Visualizations
As noted above, we create and explain visualizations within our Data Stories; you can also view a list of Featured Visualizations. At the bottom right of a visualization you can choose to “View Source Data” to identify more information related to the data in the visualization.
If you are interested in using a visualization on your own website, there is an icon on the top right of this view of a visualization to “Share and Embed” the image.
Viewing Our Data
Whether you use the Data
Catalog, Browse or Search options to locate a dataset, you will be taken to its
primer page. Take some time to read through the information on the primer page,
which includes:
- Description: A text overview of the data found in the dataset is given at the top of the primer page
- Metadata (About the Dataset): Information about the dataset includes last update, tags and a button to contact the dataset owner if you have questions
- What’s in this Dataset?: A high-level summary of dataset properties (e.g., number of rows and columns)
- Columns in this Dataset: List of all variables (columns) in the dataset with a description and list of response options where possible
It is important that users pay
attention to dataset information to ensure incorrect conclusions or
“misreading” of data does not occur.
From the primer page, you can
select the “View Data” button in the top right (or lower on the screen, above
the Table Preview) to open the full dataset for viewing.
Understanding row-level organization of the data is
also important. Because data in the PTSD-Repository are based upon RCTs
that have both study-level and arm-level information, there are a few
pointers to remember.
Datasets at the study-level include one row for each RCT. When a dataset includes arm-level data, there are
multiple rows for a single RCT. Each arm represents a treatment intervention
(or control) used in the study. For example, the table to the left includes 1
row for each treatment arm. Some studies only have 2 arms, A and B. Others,
like the Buhmann2016 example here, have as many as 4.
In addition to multiple arms, a single RCT may report
outcomes at multiple assessment points, using different outcome measures (e.g.,
CAPS, PCL, etc.), or using different analyses (e.g., Intention to Treat/ITT vs.
Completer/Comp). In each case, a separate row is included and labeled to allow for
comparison. More detail about this is included where “Study ID” is explained in
our How
the Data Were Organized story.
Create Your Own Visualizations
Once you have a general understanding about the data
included in the PTSD-Repository and locate the table you want, you are ready to
get started creating your own visualizations.
Whether you are on a dataset primer page or viewing the full
dataset, there are buttons to “Visualize” or “Create Visualization”. If you are
not signed into Socrata, it will prompt you to do so to be able to save your
visualization. It’s not necessary to login. If you do not have an account, you
will need to capture the visualization in a screenshot; the visualization will
lose interactive features in this option.
The Support page for how to explore,
visualize and analyze data on Socrata offers a number of tutorial
videos. Below is an example on how to
create a stacked bar chart:
Downloading Data
You can download a dataset directly from a primer page (by
choosing the “Export” button on the top right). Another option is to click the
“View Data” button from the dataset primer page. (The “View Data” button is at
the top right and above the Table Preview on the primer page.) Once you open
the data view, you can select the “Export” button on the top right to download
different data formats:
- CSV (Comma Separated Values)
- CSV for Excel (Tab Separated Values)
- CSV for Excel (Europe)
- JSON
- RDF
- RSS (with GeoRSS information if there is a Location column in the dataset)
- TSV for Excel
- XLM
Note that the data were formatted to be machine-readable,
meaning that the structure of each table includes column variables that contain
one value per row. This means that for some variables, there is more than one
row for each RCT. Read more in our story, How the Data Were
Organized.
If you are exporting to Excel (CSV) and notice some
inconsistencies in value options (e.g., added time stamp, 00:00) for some
variables, this Exporting
to CSV article is helpful.
Filtering data prior to downloading
You may want to filter the variables of primary interest to
you. For example, you may be interested in PTSD studies that were specific to
Veteran samples (Column/Variable: Military Status) or included psychotherapies
(Column/Variable: Study Class). Note that this filtering option is available
only if you are signed into Socrata.
Once you find the dataset you need, go to the primer page
and select “View Data”. You’ll land on a page that includes a tabular view of
the dataset. Note: You may need to scroll to the right to see the whole
dataset.
On the top right, there are a series of tabs; click on “Filter”
to open the menu. Choose to “Add a New Filter Condition”.
You can choose the variable/column you want to use as the
filter, then you can select an option from:
- Is
- Is not
- Starts with
- Contains
- Does not contain
- Is blank
You can add multiple filters, but currently, Socrata only allows
for “AND” matches. For isolating rows OR matches, you can use the conditional
formatting tool to apply a color that isolates rows of data matching the
conditions you set.
Under the “Filter” tab, set When
to “Any Condition” and then match Condition to options you would
like to be met. Select “Apply.” The rows will be isolated visually but cannot
currently be aggregated to form their own separate view.
If you want to create an AND match condition with an OR
match condition, created a filtered view based off the AND condition, then use
conditional formatting on this filtered view.
Once you have filtered the dataset, you need to save
the view. Choose “Save As …” from the top left. Once you have saved this
filtered dataset, you can find it within the Data Catalog by clicking “Filtered
view” category in the left navigation.
The short video below provides an example of how to create a filtered dataset.
Access via API
All of the noted download formats are available for that
data in filtered views and are also available to developers via the Socrata Open Data Consumer API.
Each
dataset on Socrata has a corresponding Application Programming Interface, or
API, document that is hosted on dev.socrata.com. This page
contains details on utilizing the API for the particular dataset.
The
API Docs page can be found from either dataset's primer page or data table
page.
Access from Primer
Select API from the top right menu bar which will open a
new pop up window. From this window select API Docs, this will
direct you to the docs for the particular dataset.
Read
more about our API Docs
here.
API Access from the Data Table
Click on the blue Export button from the top panel and select Soda API to open the API drop-down. From here
select API Docs.
Access via Odata
Use OData to open the dataset in
tools like Excel or Tableau. This provides a direct connection to the data that
can be refreshed on-demand within the connected application.
Connect
to either the Odata V2 or V4 endpoints by choosing the ellipses on the dataset
page.
Need More Help?
The Socrata platform is a powerful
tool with many features that are beyond the scope of this story. We
encourage you to just explore the PTSD-Repository and what it can do. Most of
the features and controls are intuitive and can be learned with just a bit of
exploration. If you're stuck, please do not hesitate to contact us with
questions. For the full
Socrata help documentation, see this Socrata
Support page. For developers looking to use the more advanced Socrata
features for easy analytics or to build web or phone apps, see Socrata's developer documentation here.