{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# EventVestor: Clinical Trials\n",
"\n",
"In this notebook, we'll take a look at EventVestor's *Clinical Trials* dataset, available on the [Quantopian Store](https://www.quantopian.com/store). This dataset spans January 01, 2007 through the current day, and documents announcements of key phases of clinical trials by biotech/pharmaceutical companies.\n",
"\n",
"### Blaze\n",
"Before we dig into the data, we want to tell you about how you generally access Quantopian Store data sets. These datasets are available through an API service known as [Blaze](http://blaze.pydata.org). Blaze provides the Quantopian user with a convenient interface to access very large datasets.\n",
"\n",
"Blaze provides an important function for accessing these datasets. Some of these sets are many millions of records. Bringing that data directly into Quantopian Research directly just is not viable. So Blaze allows us to provide a simple querying interface and shift the burden over to the server side.\n",
"\n",
"It is common to use Blaze to reduce your dataset in size, convert it over to Pandas and then to use Pandas for further computation, manipulation and visualization.\n",
"\n",
"Helpful links:\n",
"* [Query building for Blaze](http://blaze.pydata.org/en/latest/queries.html)\n",
"* [Pandas-to-Blaze dictionary](http://blaze.pydata.org/en/latest/rosetta-pandas.html)\n",
"* [SQL-to-Blaze dictionary](http://blaze.pydata.org/en/latest/rosetta-sql.html).\n",
"\n",
"Once you've limited the size of your Blaze object, you can convert it to a Pandas DataFrames using:\n",
"> `from odo import odo` \n",
"> `odo(expr, pandas.DataFrame)`\n",
"\n",
"### Free samples and limits\n",
"One other key caveat: we limit the number of results returned from any given expression to 10,000 to protect against runaway memory usage. To be clear, you have access to all the data server side. We are limiting the size of the responses back from Blaze.\n",
"\n",
"There is a *free* version of this dataset as well as a paid one. The free one includes about three years of historical data, though not up to the current day.\n",
"\n",
"With preamble in place, let's get started:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# import the dataset\n",
"from quantopian.interactive.data.eventvestor import clinical_trials\n",
"# or if you want to import the free dataset, use:\n",
"# from quantopian.data.eventvestor import clinical_trials_free\n",
"\n",
"# import data operations\n",
"from odo import odo\n",
"# import other libraries we will use\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"dshape(\"\"\"var * {\n",
" event_id: ?float64,\n",
" asof_date: datetime,\n",
" trade_date: ?datetime,\n",
" symbol: ?string,\n",
" event_type: ?string,\n",
" event_headline: ?string,\n",
" clinical_phase: ?string,\n",
" clinical_scope: ?string,\n",
" clinical_result: ?string,\n",
" product_name: ?string,\n",
" event_rating: ?float64,\n",
" timestamp: datetime,\n",
" sid: ?int64\n",
" }\"\"\")"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Let's use blaze to understand the data a bit using Blaze dshape()\n",
"clinical_trials.dshape"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"9118"
],
"text/plain": [
"9118"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# And how many rows are there?\n",
"# N.B. we're using a Blaze function to do this, not len()\n",
"clinical_trials.count()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
" \n",
" \n",
" | \n",
" event_id | \n",
" asof_date | \n",
" trade_date | \n",
" symbol | \n",
" event_type | \n",
" event_headline | \n",
" clinical_phase | \n",
" clinical_scope | \n",
" clinical_result | \n",
" product_name | \n",
" event_rating | \n",
" timestamp | \n",
" sid | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 138303 | \n",
" 2007-01-03 | \n",
" 2007-01-03 | \n",
" IMCL | \n",
" Clinical Trials | \n",
" ImClone Systems Commences Patient Treatment in... | \n",
" Phase I | \n",
" NaN | \n",
" NaN | \n",
" IMC-3G3 | \n",
" 1 | \n",
" 2007-01-04 | \n",
" 3871 | \n",
"
\n",
" \n",
" 1 | \n",
" 138180 | \n",
" 2007-01-04 | \n",
" 2007-01-04 | \n",
" DNA | \n",
" Clinical Trials | \n",
" Genentech Announces Positive Results From Rand... | \n",
" Phase II | \n",
" NaN | \n",
" Positive | \n",
" Pertuzumab | \n",
" 1 | \n",
" 2007-01-05 | \n",
" 24847 | \n",
"
\n",
" \n",
" 2 | \n",
" 952759 | \n",
" 2007-01-04 | \n",
" 2007-01-04 | \n",
" VICL | \n",
" Clinical Trials | \n",
" Vical Initiates Pivotal Phase 3 Trial of Allov... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" Allovectin-7 | \n",
" 1 | \n",
" 2007-01-05 | \n",
" 8763 | \n",
"
\n",
" \n",
"
"
],
"text/plain": [
" event_id asof_date trade_date symbol event_type \\\n",
"0 138303 2007-01-03 2007-01-03 IMCL Clinical Trials \n",
"1 138180 2007-01-04 2007-01-04 DNA Clinical Trials \n",
"2 952759 2007-01-04 2007-01-04 VICL Clinical Trials \n",
"\n",
" event_headline clinical_phase \\\n",
"0 ImClone Systems Commences Patient Treatment in... Phase I \n",
"1 Genentech Announces Positive Results From Rand... Phase II \n",
"2 Vical Initiates Pivotal Phase 3 Trial of Allov... Phase III \n",
"\n",
" clinical_scope clinical_result product_name event_rating timestamp sid \n",
"0 NaN NaN IMC-3G3 1 2007-01-04 3871 \n",
"1 NaN Positive Pertuzumab 1 2007-01-05 24847 \n",
"2 NaN NaN Allovectin-7 1 2007-01-05 8763 "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Let's see what the data looks like. We'll grab the first three rows.\n",
"clinical_trials[:3]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's go over the columns:\n",
"- **event_id**: the unique identifier for this clinical trial.\n",
"- **asof_date**: EventVestor's timestamp of event capture.\n",
"- **trade_date**: for event announcements made before trading ends, trade_date is the same as event_date. For announcements issued after market close, trade_date is next market open day.\n",
"- **symbol**: stock ticker symbol of the affected company.\n",
"- **event_type**: this should always be *Clinical Trials*.\n",
"- **event_headline**: a short description of the event.\n",
"- **clinical_phase**: phases include *0, I, II, III, IV, Pre-Clinical*\n",
"- **clinical_scope**: types of scope include *additional indications, all indications, limited indications*\n",
"- **clinical_result**: result types include *negative, partial, positive*\n",
"- **product_name**: name of the drug being investigated.\n",
"- **event_rating**: this is always 1. The meaning of this is uncertain.\n",
"- **timestamp**: this is our timestamp on when we registered the data.\n",
"- **sid**: the equity's unique identifier. Use this instead of the symbol."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We've done much of the data processing for you. Fields like `timestamp` and `sid` are standardized across all our Store Datasets, so the datasets are easy to combine. We have standardized the `sid` across all our equity databases.\n",
"\n",
"We can select columns and rows with ease. Below, we'll fetch all phase-3 announcements. We'll only display the columns for the sid and the drug name."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" \n",
" \n",
" | \n",
" timestamp | \n",
" sid | \n",
" product_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2007-01-05 | \n",
" 8763 | \n",
" Allovectin-7 | \n",
"
\n",
" \n",
" 1 | \n",
" 2007-01-09 | \n",
" 1416 | \n",
" FENTORA | \n",
"
\n",
" \n",
" 2 | \n",
" 2007-01-11 | \n",
" 3871 | \n",
" ERBITUX | \n",
"
\n",
" \n",
" 3 | \n",
" 2007-01-25 | \n",
" 8763 | \n",
" Allovectin-7 | \n",
"
\n",
" \n",
" 4 | \n",
" 2007-02-09 | \n",
" 24415 | \n",
" Xibrom | \n",
"
\n",
" \n",
" 5 | \n",
" 2007-02-23 | \n",
" 24847 | \n",
" Avastin | \n",
"
\n",
" \n",
" 6 | \n",
" 2007-04-05 | \n",
" 3871 | \n",
" ERBITUX (Cetuximab) | \n",
"
\n",
" \n",
" 7 | \n",
" 2007-04-11 | \n",
" 3871 | \n",
" ERBITUX | \n",
"
\n",
" \n",
" 8 | \n",
" 2007-04-17 | \n",
" 3871 | \n",
" ERBITUX (Cetuximab) | \n",
"
\n",
" \n",
" 9 | \n",
" 2007-04-26 | \n",
" 23846 | \n",
" BEMA Fentanyl | \n",
"
\n",
" \n",
" 10 | \n",
" 2007-04-27 | \n",
" 5847 | \n",
" Nuvion | \n",
"
\n",
" \n",
"
"
],
"text/plain": [
" timestamp sid product_name\n",
"0 2007-01-05 8763 Allovectin-7\n",
"1 2007-01-09 1416 FENTORA \n",
"2 2007-01-11 3871 ERBITUX\n",
"3 2007-01-25 8763 Allovectin-7\n",
"4 2007-02-09 24415 Xibrom\n",
"5 2007-02-23 24847 Avastin\n",
"6 2007-04-05 3871 ERBITUX (Cetuximab)\n",
"7 2007-04-11 3871 ERBITUX\n",
"8 2007-04-17 3871 ERBITUX (Cetuximab) \n",
"9 2007-04-26 23846 BEMA Fentanyl\n",
"..."
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phase_three = clinical_trials[clinical_trials.clinical_phase == \"Phase III\"][['timestamp', 'sid','product_name']].sort('timestamp')\n",
"# When displaying a Blaze Data Object, the printout is automatically truncated to ten rows.\n",
"phase_three"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, suppose we want a DataFrame of GlaxoSmithKline Phase-III announcements, sorted in descending order by date:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"gsk_sid = symbols('GSK').sid"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"
\n",
" \n",
" \n",
" | \n",
" event_id | \n",
" asof_date | \n",
" trade_date | \n",
" symbol | \n",
" event_type | \n",
" event_headline | \n",
" clinical_phase | \n",
" clinical_scope | \n",
" clinical_result | \n",
" product_name | \n",
" event_rating | \n",
" timestamp | \n",
" sid | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1937202 | \n",
" 2015-09-27 | \n",
" 2015-09-28 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results From ... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Anoro Ellipta | \n",
" 1 | \n",
" 2015-09-29 11:17:13.121838 | \n",
" 3242 | \n",
"
\n",
" \n",
" 3 | \n",
" 1836852 | \n",
" 2015-02-09 | \n",
" 2015-02-09 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Theravance Initiate Phase ... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" fluticasone furoate/umeclidinium/vilanterol ( | \n",
" 1 | \n",
" 2015-02-10 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 4 | \n",
" 1817331 | \n",
" 2014-12-18 | \n",
" 2014-12-18 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports ZOE-50 Phase 3 Study M... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" ZOE-50 | \n",
" 1 | \n",
" 2014-12-19 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 5 | \n",
" 1745987 | \n",
" 2014-07-16 | \n",
" 2014-07-16 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline & Theravance Initiates Phase I... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" IMPACT | \n",
" 1 | \n",
" 2014-07-17 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 6 | \n",
" 1738566 | \n",
" 2014-06-25 | \n",
" 2014-06-25 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Initiates Phase 3 Study with E... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" Eltrombopag | \n",
" 1 | \n",
" 2014-06-26 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 7 | \n",
" 1735091 | \n",
" 2014-06-13 | \n",
" 2014-06-13 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Phase 3 PETIT2 Study M... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" PETIT2 | \n",
" 1 | \n",
" 2014-06-14 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 8 | \n",
" 1734216 | \n",
" 2014-06-11 | \n",
" 2014-06-11 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results from ... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Incruse Ellipta | \n",
" 1 | \n",
" 2014-06-12 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 10 | \n",
" 1707265 | \n",
" 2014-04-22 | \n",
" 2014-04-22 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Theravance Starts Phase II... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" FF/VI | \n",
" 1 | \n",
" 2014-04-23 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 11 | \n",
" 1700157 | \n",
" 2014-04-02 | \n",
" 2014-04-02 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline to Stop MAGE-A3 Cancer Immunot... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" MAGRITi | \n",
" 1 | \n",
" 2014-04-03 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 12 | \n",
" 1695526 | \n",
" 2014-03-20 | \n",
" 2014-03-20 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline's MAGE-A3 Cancer Immunotherape... | \n",
" Phase III | \n",
" NaN | \n",
" Negative | \n",
" MAGE-A3 | \n",
" 1 | \n",
" 2014-03-21 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 13 | \n",
" 1693181 | \n",
" 2014-03-14 | \n",
" 2014-03-14 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline & Theravance Reports Positve R... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Anoro Ellipta | \n",
" 1 | \n",
" 2014-03-15 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 15 | \n",
" 1653485 | \n",
" 2013-12-06 | \n",
" 2013-12-06 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Theravance Announces Posit... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Fluticasone Furoate | \n",
" 1 | \n",
" 2013-12-07 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 17 | \n",
" 1647384 | \n",
" 2013-11-12 | \n",
" 2013-11-12 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Announces Phase III Stability ... | \n",
" Phase III | \n",
" NaN | \n",
" Negative | \n",
" Darapladib | \n",
" 1 | \n",
" 2013-11-13 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 18 | \n",
" 1620476 | \n",
" 2013-09-05 | \n",
" 2013-09-05 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline's MAGE-A3 Vaccine Fails to Mee... | \n",
" Phase III | \n",
" NaN | \n",
" Negative | \n",
" MAGE-A3 | \n",
" 1 | \n",
" 2013-09-06 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 19 | \n",
" 1521603 | \n",
" 2012-12-19 | \n",
" 2012-12-20 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline, Amicus Therapeutics Announce ... | \n",
" Phase III | \n",
" NaN | \n",
" Negative | \n",
" Migalastat HCl | \n",
" 1 | \n",
" 2012-12-20 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 21 | \n",
" 1474291 | \n",
" 2012-08-24 | \n",
" 2012-08-24 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline, Theravance Complete Phase III... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" LAMA/LABA | \n",
" 1 | \n",
" 2012-08-25 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 22 | \n",
" 1451483 | \n",
" 2012-07-11 | \n",
" 2012-07-11 | \n",
" GSK | \n",
" Clinical Trials | \n",
" Shionogi-ViiV Healthcare Reports Positive Init... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" ING114467 | \n",
" 1 | \n",
" 2012-07-12 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 23 | \n",
" 1451624 | \n",
" 2012-07-11 | \n",
" 2012-07-11 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results in Ph... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Albiglutide | \n",
" 1 | \n",
" 2012-07-12 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 24 | \n",
" 1448947 | \n",
" 2012-07-02 | \n",
" 2012-07-02 | \n",
" GSK | \n",
" Clinical Trials | \n",
" Theravance and GlaxoSmithKline Report Positive... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" LAMA/LABA | \n",
" 1 | \n",
" 2012-07-03 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 26 | \n",
" 1414886 | \n",
" 2012-04-03 | \n",
" 2012-04-03 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Further Positive Resul... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Albiglutide | \n",
" 1 | \n",
" 2012-04-04 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 27 | \n",
" 1381734 | \n",
" 2012-01-09 | \n",
" 2012-01-09 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline, Theravance Report Initial Res... | \n",
" Phase III | \n",
" NaN | \n",
" Partial | \n",
" Relovair | \n",
" 1 | \n",
" 2012-01-10 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 28 | \n",
" 1376242 | \n",
" 2011-12-15 | \n",
" 2011-12-15 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Human Genome Initiate Phas... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2011-12-16 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 29 | \n",
" 1352859 | \n",
" 2011-10-18 | \n",
" 2011-10-18 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results from ... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" RTS,S | \n",
" 1 | \n",
" 2011-10-19 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 30 | \n",
" 1351145 | \n",
" 2011-10-11 | \n",
" 2011-10-11 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Pfizer JV Initiates Phase ... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" Celsentri/Selzentry; emtricitabine/tenofovir | \n",
" 1 | \n",
" 2011-10-12 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 31 | \n",
" 1336573 | \n",
" 2011-09-12 | \n",
" 2011-09-12 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Amicus Therapeutics Initia... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" Amigal | \n",
" 1 | \n",
" 2011-09-13 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 32 | \n",
" 1335427 | \n",
" 2011-08-15 | \n",
" 2011-08-15 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results for I... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" IPX066 | \n",
" 1 | \n",
" 2011-08-16 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 33 | \n",
" 1332195 | \n",
" 2011-07-26 | \n",
" 2011-07-26 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Data from Pro... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" ENABLE-1 | \n",
" 1 | \n",
" 2011-07-27 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 34 | \n",
" 1301739 | \n",
" 2011-06-02 | \n",
" 2011-06-02 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and Theravance Announce Positi... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Relovair | \n",
" 1 | \n",
" 2011-06-03 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 36 | \n",
" 1249526 | \n",
" 2011-02-07 | \n",
" 2011-02-07 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline, Human Genome Announce Positiv... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2011-02-08 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 37 | \n",
" 1249289 | \n",
" 2011-02-03 | \n",
" 2011-02-03 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GSK and Theravance Announce Progression of LAM... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" GSK573719/vilanterol | \n",
" 1 | \n",
" 2011-02-04 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 39 | \n",
" 1188282 | \n",
" 2010-10-21 | \n",
" 2010-10-21 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline JV Initiates Phase III Trial f... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" S/GSK1349572 | \n",
" 1 | \n",
" 2010-10-22 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 42 | \n",
" 1126301 | \n",
" 2010-06-17 | \n",
" 2010-06-17 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Announces Positive Result in P... | \n",
" Phase III | \n",
" NaN | \n",
" Partial | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2010-06-18 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 43 | \n",
" 1126332 | \n",
" 2010-06-17 | \n",
" 2010-06-17 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Announces Positive Phase 3 Res... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2010-06-18 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 44 | \n",
" 1089424 | \n",
" 2010-04-20 | \n",
" 2010-04-20 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline, Human Genome Announce Failure... | \n",
" Phase III | \n",
" Limited Indications | \n",
" Negative | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2010-04-21 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 46 | \n",
" 1004093 | \n",
" 2009-11-02 | \n",
" 2009-11-02 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Reports Positive Results in Se... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" BENLYSTA | \n",
" 1 | \n",
" 2009-11-03 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 47 | \n",
" 1000032 | \n",
" 2009-10-27 | \n",
" 2009-10-27 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Commences Phase III Horizon Pr... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" COPD | \n",
" 1 | \n",
" 2009-10-28 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 48 | \n",
" 976852 | \n",
" 2009-10-20 | \n",
" 2009-10-20 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline Announces Positive Phase3 Resu... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Belimumab | \n",
" 1 | \n",
" 2009-10-21 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 53 | \n",
" 537694 | \n",
" 2009-02-17 | \n",
" 2009-02-17 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GSK Initiates Phase III Programme for Novel Ty... | \n",
" Phase III | \n",
" NaN | \n",
" NaN | \n",
" GLP-1 | \n",
" 1 | \n",
" 2009-02-18 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 56 | \n",
" 522433 | \n",
" 2008-12-06 | \n",
" 2008-12-08 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GSK, Valeant's Retigabine Reduces Seizures in ... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" Retigabine | \n",
" 1 | \n",
" 2008-12-07 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
" 70 | \n",
" 147654 | \n",
" 2008-02-28 | \n",
" 2008-02-28 | \n",
" GSK | \n",
" Clinical Trials | \n",
" GlaxoSmithKline and XenoPort Get Positive Resu... | \n",
" Phase III | \n",
" NaN | \n",
" Positive | \n",
" XP13512 | \n",
" 1 | \n",
" 2008-02-29 00:00:00 | \n",
" 3242 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" event_id asof_date trade_date symbol event_type \\\n",
"0 1937202 2015-09-27 2015-09-28 GSK Clinical Trials \n",
"3 1836852 2015-02-09 2015-02-09 GSK Clinical Trials \n",
"4 1817331 2014-12-18 2014-12-18 GSK Clinical Trials \n",
"5 1745987 2014-07-16 2014-07-16 GSK Clinical Trials \n",
"6 1738566 2014-06-25 2014-06-25 GSK Clinical Trials \n",
"7 1735091 2014-06-13 2014-06-13 GSK Clinical Trials \n",
"8 1734216 2014-06-11 2014-06-11 GSK Clinical Trials \n",
"10 1707265 2014-04-22 2014-04-22 GSK Clinical Trials \n",
"11 1700157 2014-04-02 2014-04-02 GSK Clinical Trials \n",
"12 1695526 2014-03-20 2014-03-20 GSK Clinical Trials \n",
"13 1693181 2014-03-14 2014-03-14 GSK Clinical Trials \n",
"15 1653485 2013-12-06 2013-12-06 GSK Clinical Trials \n",
"17 1647384 2013-11-12 2013-11-12 GSK Clinical Trials \n",
"18 1620476 2013-09-05 2013-09-05 GSK Clinical Trials \n",
"19 1521603 2012-12-19 2012-12-20 GSK Clinical Trials \n",
"21 1474291 2012-08-24 2012-08-24 GSK Clinical Trials \n",
"22 1451483 2012-07-11 2012-07-11 GSK Clinical Trials \n",
"23 1451624 2012-07-11 2012-07-11 GSK Clinical Trials \n",
"24 1448947 2012-07-02 2012-07-02 GSK Clinical Trials \n",
"26 1414886 2012-04-03 2012-04-03 GSK Clinical Trials \n",
"27 1381734 2012-01-09 2012-01-09 GSK Clinical Trials \n",
"28 1376242 2011-12-15 2011-12-15 GSK Clinical Trials \n",
"29 1352859 2011-10-18 2011-10-18 GSK Clinical Trials \n",
"30 1351145 2011-10-11 2011-10-11 GSK Clinical Trials \n",
"31 1336573 2011-09-12 2011-09-12 GSK Clinical Trials \n",
"32 1335427 2011-08-15 2011-08-15 GSK Clinical Trials \n",
"33 1332195 2011-07-26 2011-07-26 GSK Clinical Trials \n",
"34 1301739 2011-06-02 2011-06-02 GSK Clinical Trials \n",
"36 1249526 2011-02-07 2011-02-07 GSK Clinical Trials \n",
"37 1249289 2011-02-03 2011-02-03 GSK Clinical Trials \n",
"39 1188282 2010-10-21 2010-10-21 GSK Clinical Trials \n",
"42 1126301 2010-06-17 2010-06-17 GSK Clinical Trials \n",
"43 1126332 2010-06-17 2010-06-17 GSK Clinical Trials \n",
"44 1089424 2010-04-20 2010-04-20 GSK Clinical Trials \n",
"46 1004093 2009-11-02 2009-11-02 GSK Clinical Trials \n",
"47 1000032 2009-10-27 2009-10-27 GSK Clinical Trials \n",
"48 976852 2009-10-20 2009-10-20 GSK Clinical Trials \n",
"53 537694 2009-02-17 2009-02-17 GSK Clinical Trials \n",
"56 522433 2008-12-06 2008-12-08 GSK Clinical Trials \n",
"70 147654 2008-02-28 2008-02-28 GSK Clinical Trials \n",
"\n",
" event_headline clinical_phase \\\n",
"0 GlaxoSmithKline Reports Positive Results From ... Phase III \n",
"3 GlaxoSmithKline and Theravance Initiate Phase ... Phase III \n",
"4 GlaxoSmithKline Reports ZOE-50 Phase 3 Study M... Phase III \n",
"5 GlaxoSmithKline & Theravance Initiates Phase I... Phase III \n",
"6 GlaxoSmithKline Initiates Phase 3 Study with E... Phase III \n",
"7 GlaxoSmithKline Reports Phase 3 PETIT2 Study M... Phase III \n",
"8 GlaxoSmithKline Reports Positive Results from ... Phase III \n",
"10 GlaxoSmithKline and Theravance Starts Phase II... Phase III \n",
"11 GlaxoSmithKline to Stop MAGE-A3 Cancer Immunot... Phase III \n",
"12 GlaxoSmithKline's MAGE-A3 Cancer Immunotherape... Phase III \n",
"13 GlaxoSmithKline & Theravance Reports Positve R... Phase III \n",
"15 GlaxoSmithKline and Theravance Announces Posit... Phase III \n",
"17 GlaxoSmithKline Announces Phase III Stability ... Phase III \n",
"18 GlaxoSmithKline's MAGE-A3 Vaccine Fails to Mee... Phase III \n",
"19 GlaxoSmithKline, Amicus Therapeutics Announce ... Phase III \n",
"21 GlaxoSmithKline, Theravance Complete Phase III... Phase III \n",
"22 Shionogi-ViiV Healthcare Reports Positive Init... Phase III \n",
"23 GlaxoSmithKline Reports Positive Results in Ph... Phase III \n",
"24 Theravance and GlaxoSmithKline Report Positive... Phase III \n",
"26 GlaxoSmithKline Reports Further Positive Resul... Phase III \n",
"27 GlaxoSmithKline, Theravance Report Initial Res... Phase III \n",
"28 GlaxoSmithKline and Human Genome Initiate Phas... Phase III \n",
"29 GlaxoSmithKline Reports Positive Results from ... Phase III \n",
"30 GlaxoSmithKline and Pfizer JV Initiates Phase ... Phase III \n",
"31 GlaxoSmithKline and Amicus Therapeutics Initia... Phase III \n",
"32 GlaxoSmithKline Reports Positive Results for I... Phase III \n",
"33 GlaxoSmithKline Reports Positive Data from Pro... Phase III \n",
"34 GlaxoSmithKline and Theravance Announce Positi... Phase III \n",
"36 GlaxoSmithKline, Human Genome Announce Positiv... Phase III \n",
"37 GSK and Theravance Announce Progression of LAM... Phase III \n",
"39 GlaxoSmithKline JV Initiates Phase III Trial f... Phase III \n",
"42 GlaxoSmithKline Announces Positive Result in P... Phase III \n",
"43 GlaxoSmithKline Announces Positive Phase 3 Res... Phase III \n",
"44 GlaxoSmithKline, Human Genome Announce Failure... Phase III \n",
"46 GlaxoSmithKline Reports Positive Results in Se... Phase III \n",
"47 GlaxoSmithKline Commences Phase III Horizon Pr... Phase III \n",
"48 GlaxoSmithKline Announces Positive Phase3 Resu... Phase III \n",
"53 GSK Initiates Phase III Programme for Novel Ty... Phase III \n",
"56 GSK, Valeant's Retigabine Reduces Seizures in ... Phase III \n",
"70 GlaxoSmithKline and XenoPort Get Positive Resu... Phase III \n",
"\n",
" clinical_scope clinical_result \\\n",
"0 NaN Positive \n",
"3 NaN NaN \n",
"4 NaN Positive \n",
"5 NaN NaN \n",
"6 NaN NaN \n",
"7 NaN Positive \n",
"8 NaN Positive \n",
"10 NaN NaN \n",
"11 NaN NaN \n",
"12 NaN Negative \n",
"13 NaN Positive \n",
"15 NaN Positive \n",
"17 NaN Negative \n",
"18 NaN Negative \n",
"19 NaN Negative \n",
"21 NaN NaN \n",
"22 NaN Positive \n",
"23 NaN Positive \n",
"24 NaN Positive \n",
"26 NaN Positive \n",
"27 NaN Partial \n",
"28 NaN NaN \n",
"29 NaN Positive \n",
"30 NaN NaN \n",
"31 NaN NaN \n",
"32 NaN Positive \n",
"33 NaN Positive \n",
"34 NaN Positive \n",
"36 NaN Positive \n",
"37 NaN Positive \n",
"39 NaN NaN \n",
"42 NaN Partial \n",
"43 NaN Positive \n",
"44 Limited Indications Negative \n",
"46 NaN Positive \n",
"47 NaN NaN \n",
"48 NaN Positive \n",
"53 NaN NaN \n",
"56 NaN Positive \n",
"70 NaN Positive \n",
"\n",
" product_name event_rating \\\n",
"0 Anoro Ellipta 1 \n",
"3 fluticasone furoate/umeclidinium/vilanterol ( 1 \n",
"4 ZOE-50 1 \n",
"5 IMPACT 1 \n",
"6 Eltrombopag 1 \n",
"7 PETIT2 1 \n",
"8 Incruse Ellipta 1 \n",
"10 FF/VI 1 \n",
"11 MAGRITi 1 \n",
"12 MAGE-A3 1 \n",
"13 Anoro Ellipta 1 \n",
"15 Fluticasone Furoate 1 \n",
"17 Darapladib 1 \n",
"18 MAGE-A3 1 \n",
"19 Migalastat HCl 1 \n",
"21 LAMA/LABA 1 \n",
"22 ING114467 1 \n",
"23 Albiglutide 1 \n",
"24 LAMA/LABA 1 \n",
"26 Albiglutide 1 \n",
"27 Relovair 1 \n",
"28 BENLYSTA 1 \n",
"29 RTS,S 1 \n",
"30 Celsentri/Selzentry; emtricitabine/tenofovir 1 \n",
"31 Amigal 1 \n",
"32 IPX066 1 \n",
"33 ENABLE-1 1 \n",
"34 Relovair 1 \n",
"36 BENLYSTA 1 \n",
"37 GSK573719/vilanterol 1 \n",
"39 S/GSK1349572 1 \n",
"42 BENLYSTA 1 \n",
"43 BENLYSTA 1 \n",
"44 BENLYSTA 1 \n",
"46 BENLYSTA 1 \n",
"47 COPD 1 \n",
"48 Belimumab 1 \n",
"53 GLP-1 1 \n",
"56 Retigabine 1 \n",
"70 XP13512 1 \n",
"\n",
" timestamp sid \n",
"0 2015-09-29 11:17:13.121838 3242 \n",
"3 2015-02-10 00:00:00 3242 \n",
"4 2014-12-19 00:00:00 3242 \n",
"5 2014-07-17 00:00:00 3242 \n",
"6 2014-06-26 00:00:00 3242 \n",
"7 2014-06-14 00:00:00 3242 \n",
"8 2014-06-12 00:00:00 3242 \n",
"10 2014-04-23 00:00:00 3242 \n",
"11 2014-04-03 00:00:00 3242 \n",
"12 2014-03-21 00:00:00 3242 \n",
"13 2014-03-15 00:00:00 3242 \n",
"15 2013-12-07 00:00:00 3242 \n",
"17 2013-11-13 00:00:00 3242 \n",
"18 2013-09-06 00:00:00 3242 \n",
"19 2012-12-20 00:00:00 3242 \n",
"21 2012-08-25 00:00:00 3242 \n",
"22 2012-07-12 00:00:00 3242 \n",
"23 2012-07-12 00:00:00 3242 \n",
"24 2012-07-03 00:00:00 3242 \n",
"26 2012-04-04 00:00:00 3242 \n",
"27 2012-01-10 00:00:00 3242 \n",
"28 2011-12-16 00:00:00 3242 \n",
"29 2011-10-19 00:00:00 3242 \n",
"30 2011-10-12 00:00:00 3242 \n",
"31 2011-09-13 00:00:00 3242 \n",
"32 2011-08-16 00:00:00 3242 \n",
"33 2011-07-27 00:00:00 3242 \n",
"34 2011-06-03 00:00:00 3242 \n",
"36 2011-02-08 00:00:00 3242 \n",
"37 2011-02-04 00:00:00 3242 \n",
"39 2010-10-22 00:00:00 3242 \n",
"42 2010-06-18 00:00:00 3242 \n",
"43 2010-06-18 00:00:00 3242 \n",
"44 2010-04-21 00:00:00 3242 \n",
"46 2009-11-03 00:00:00 3242 \n",
"47 2009-10-28 00:00:00 3242 \n",
"48 2009-10-21 00:00:00 3242 \n",
"53 2009-02-18 00:00:00 3242 \n",
"56 2008-12-07 00:00:00 3242 \n",
"70 2008-02-29 00:00:00 3242 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gsk = clinical_trials[clinical_trials.sid==gsk_sid].sort('timestamp',ascending=False)\n",
"gsk_df = odo(gsk, pd.DataFrame)\n",
"# now filter down to the Phase 4 trials\n",
"gsk_df = gsk_df[gsk_df.clinical_phase==\"Phase III\"]\n",
"gsk_df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}