<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Narrative Science</title>
	<atom:link href="http://narrativescience.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://narrativescience.com</link>
	<description></description>
	<lastBuildDate>Fri, 14 Jun 2013 17:33:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>New Advisor Tech Coming Our Way</title>
		<link>http://narrativescience.com/blog/new-advisor-tech-coming-our-way/</link>
		<comments>http://narrativescience.com/blog/new-advisor-tech-coming-our-way/#comments</comments>
		<pubDate>Fri, 14 Jun 2013 17:32:57 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2888</guid>
		<description><![CDATA[MoneyMarketing]]></description>
				<content:encoded><![CDATA[<p>MoneyMarketing</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/new-advisor-tech-coming-our-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quill-Creator Narrative Science Partners with In-Q-Tel to Bring its Natural Language Reports to Government Intelligence Agencies</title>
		<link>http://narrativescience.com/blog/quill-creator-narrative-science-partners-with-in-q-tel-to-bring-its-natural-language-reports-to-government-intelligence-agencies/</link>
		<comments>http://narrativescience.com/blog/quill-creator-narrative-science-partners-with-in-q-tel-to-bring-its-natural-language-reports-to-government-intelligence-agencies/#comments</comments>
		<pubDate>Thu, 06 Jun 2013 14:10:37 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2878</guid>
		<description><![CDATA[Finovate Blog]]></description>
				<content:encoded><![CDATA[<p>Finovate Blog</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/quill-creator-narrative-science-partners-with-in-q-tel-to-bring-its-natural-language-reports-to-government-intelligence-agencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chicago-based Tech Firm Attracts Investment From CIA Offshoot</title>
		<link>http://narrativescience.com/blog/chicago-based-tech-firm-attracts-investment-from-cia-offshoot/</link>
		<comments>http://narrativescience.com/blog/chicago-based-tech-firm-attracts-investment-from-cia-offshoot/#comments</comments>
		<pubDate>Thu, 06 Jun 2013 14:05:02 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2881</guid>
		<description><![CDATA[Chicago Tribune]]></description>
				<content:encoded><![CDATA[<p>Chicago Tribune</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/chicago-based-tech-firm-attracts-investment-from-cia-offshoot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Narrative Science Goes Beyond ‘Robot Journalism’ with CIA Investment</title>
		<link>http://narrativescience.com/blog/narrative-science-goes-beyond-robot-journalism-with-cia-investment/</link>
		<comments>http://narrativescience.com/blog/narrative-science-goes-beyond-robot-journalism-with-cia-investment/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 19:22:23 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2873</guid>
		<description><![CDATA[VentureBeat]]></description>
				<content:encoded><![CDATA[<p>VentureBeat</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/narrative-science-goes-beyond-robot-journalism-with-cia-investment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The CIA Takes an Interest in Narrative Science’s Quick Summaries of Big Data</title>
		<link>http://narrativescience.com/blog/the-cia-takes-an-interest-in-narrative-sciences-quick-summaries-of-big-data/</link>
		<comments>http://narrativescience.com/blog/the-cia-takes-an-interest-in-narrative-sciences-quick-summaries-of-big-data/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 19:12:43 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2870</guid>
		<description><![CDATA[GigaOM]]></description>
				<content:encoded><![CDATA[<p>GigaOM</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/the-cia-takes-an-interest-in-narrative-sciences-quick-summaries-of-big-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Local AI Startup Gets CIA-linked Funding</title>
		<link>http://narrativescience.com/blog/local-ai-startup-gets-cia-linked-funding/</link>
		<comments>http://narrativescience.com/blog/local-ai-startup-gets-cia-linked-funding/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 16:29:05 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2866</guid>
		<description><![CDATA[Chicago Tribune]]></description>
				<content:encoded><![CDATA[<p>Chicago Tribune</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/local-ai-startup-gets-cia-linked-funding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Narrative Science Announces Strategic Investment and Technology Development Agreement with IQT</title>
		<link>http://narrativescience.com/blog/narrative-science-announces-strategic-investment-and-technology-development-agreement-with-iqt/</link>
		<comments>http://narrativescience.com/blog/narrative-science-announces-strategic-investment-and-technology-development-agreement-with-iqt/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 14:11:10 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2855</guid>
		<description><![CDATA[Business Wire]]></description>
				<content:encoded><![CDATA[<p>Business Wire</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/narrative-science-announces-strategic-investment-and-technology-development-agreement-with-iqt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling Services with Amazon Autoscaling Groups and Chef</title>
		<link>http://narrativescience.com/blog/scaling-services-with-amazon-autoscaling-groups-and-chef/</link>
		<comments>http://narrativescience.com/blog/scaling-services-with-amazon-autoscaling-groups-and-chef/#comments</comments>
		<pubDate>Fri, 31 May 2013 12:00:06 +0000</pubDate>
		<dc:creator>Tom Howe</dc:creator>
				<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2833</guid>
		<description><![CDATA[At Narrative Science, we have highly variable load needs. Many of our clients need stories delivered at a particular time and in batches. This means that we need to be flexible enough to scale our systems up and down easily. We already host our services on EC2, so we had access to the computing flexibility...  <a href="http://narrativescience.com/blog/scaling-services-with-amazon-autoscaling-groups-and-chef/" title="Read Scaling Services with Amazon Autoscaling Groups and Chef">Read more &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>At Narrative Science, we have highly variable load needs. Many of our clients need stories delivered at a particular time and in batches. This means that we need to be flexible enough to scale our systems up and down easily. We already host our services on EC2, so we had access to the computing flexibility of autoscaling groups. We also use Chef to manage our system configuration. However, until recently, we hadn&#8217;t tried using the two together to dynamically alter our load with automatic configuration.</p>
<p>We have started to use Netflix&#8217;s *amazing* <a title="Asgard" href="https://netflix.github.com/asgard" target="_blank">Asgard</a> to manage our deployments of our service clusters. If you haven&#8217;t tried it yet, I strongly recommend it. It is designed to allow you to build and deploy autoscaled clusters of machines with tremendous ease. Having said that, any solution we developed for maintaining configuration management with chef needed to fit into a paradigm that would work well with Asgard. The Cloud Formation documentation which is supplied by Opscode gave us a good pattern to use for our configuration:</p>
<ol>
<li>Store validation and secret keys in S3</li>
<li>Create a user data script which can Chef bootstrap a server</li>
<li>Launch servers in Autoscaling groups for great good</li>
</ol>
<p>As a general model, this worked perfectly, however we needed to add some of our own tweaks to completely realize this solution.</p>
<p>We created a bucket in S3 which holds our validation.pem and encrypted_data_bag_secret keys. This needs to be accessible to our server. We also store our first_run.json files there, but more about that later.</p>
<p>Step 2 actually requires work <img src='http://narrativescience.com/narrativescience/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . In the end, we developed 2 scripts. One is the script which is stored in user data. This is a simple bash script whose primary purpose is to download the *actual* bootstrap script. Here is an example of what that bash script looks like:</p>
<p>This is a sample of what you would put into your user-data:</p>
<pre>#/bin/bash

export AWS_ACCESS_KEY_ID=********************
export AWS_SECRET_ACCESS_KEY_ID=***************************
export LOGSTASH_HOST=*****************
export LOGSTASH_PORT=*****************
export GITHUB_TOKEN=***********************

curl -o /tmp/virtualenv.py https://raw.github.com/pypa/virtualenv/master/virtualenv.py
python /tmp/virtualenv.py /tmp/install
/tmp/install/bin/pip install boto
/tmp/install/bin/pip install sh
/tmp/install/bin/pip install requests

curl -o /tmp/bootstrap.tar.gz https://gist.github.com/gists/4218533/download
mkdir /tmp/bootstrap
cd /bootstrap
tar -xzvf bootstrap.tar.gz
mv */bootstrap.py /tmp

/tmp/install/bin/python /tmp/bootstrap.py -b your-bucket -t instance-type -e stg -c http://your.chef.url -k $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY_ID -l $LOGSTASH_HOST -L $LOGSTASH_PORT -g $GITHUB_TOKEN &gt; /tmp/bootstrap.log 2&gt; /tmp/bootstrap.error

rm -rf /tmp/install /tmp/bootstrap.tar.gz /tmp/bootstrap.py</pre>
<p>Most of this should look fairly straight forward, although a couple things are somewhat unique to our setup. At the beginning we define some environment that are needed to bootstrap the machine. The first two are AWS credentials which will be used to grab the validation.pem and encrypted_data_bag_secret file from S3. A note about these credentials: because the user data script is available to all users on the instance (via the EC2 metadata url), these credentials should have very limited permissions. Basically, they need to have permission to read items from the S3 bucket containing the chef secrets and permission to edit tags on EC2 instances.</p>
<p>We use <a title="Logstash" href="http://logstash.net" target="_blank">Logstash</a> to process all of our logs so, we supply the host and port to our Logstash server to collect certain data. Finally, we are posting the bootstrap reports to private gist files, so we supply a github OAuth token with &#8220;gist&#8221; permission.</p>
<p>The script next creates a virtualenv which will be used to run the actual bootstrap script. It also installs a couple of dependencies which we use to make the bootstrap script simpler. Next, we download the gist which contains the bootstrap script and store it in /tmp.</p>
<p>Then, we actually invoke the bootstrap script. This does all the magic. Lastly, we delete all of the temporary files we have created.</p>
<p>This is a pretty general purpose user-data script. The bootstrap script could pretty much do anything, but in our case we are bootstrapping chef.</p>
<p>Instead of pasting the entire bootstrap script here, I&#8217;ll just point at the gist and then discuss a few specific parts. The entire script can be found <a title="Github" href="https://gist.github.com/4218533" target="_blank">here</a>.</p>
<p>The first thing the script does is add a generate the details about the newly created server. This includes the name, run_list, environment and generic server type.</p>
<pre>response = urllib2.urlopen(INSTANCE_ID_URL)
instance_id = response.read()
server_name = "i_{0}_{1}_{2}".format(environment, server_class, instance_id)
key = Key(bucket)
key.key = 'first-boot-scripts/{0}/{1}.json'.format(environment, server_class)
key.get_contents_to_filename('/etc/chef/first-boot.json')

with open('/etc/chef/first-boot.json', 'r') as handle:
run_list = json.loads(handle.read())['run_list']

return {
'name': server_name,
'instance_id': instance_id,
'environment': environment,
'class': server_class,
'run_list': run_list
}</pre>
<p>This grabs the first-boot.json file from S3. This contains the run_list for the server plus any attributes which need to be set at the node level. It also generates a name for the server.</p>
<p>Next we add a Name tag the instance to the instance. This means that you see a human friendly name in the AWS console.</p>
<p>After we have generated and stored all of the metadata about the new instance, we configure and run Chef for the first time.</p>
<pre>response = urllib2.urlopen('http://www.opscode.com/chef/install.sh')
with open('/tmp/chef-install.sh', 'w') as handle:
handle.write(response.read())
chef_install_log = sh.bash('/tmp/chef-install.sh')
configure_chef(server_details, chef_server, bucket)
chef_client = sh.Command('/opt/chef/bin/chef-client')
chef_run_log = chef_client(config='/etc/chef/client.rb', environment=server_details['environment'], j='/etc/chef/first-boot.json')</pre>
<p>This installs Chef using the default installer, then runs chef-client using the configuration stored earlier.</p>
<p>Finally, we store the output from the chef-client run in a private gist and send the url in a message to Logstash. That is all straight-forward http and socket work, but it gets us all of the information we need about the status of the bootstrap.</p>
<p>At this point our new server has been automatically bootstrapped with chef and should be working.</p>
<p>In a future post, I&#8217;ll discuss how we integrate this with our Asgard deployment.</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/scaling-services-with-amazon-autoscaling-groups-and-chef/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Ancestry.com Transforms Mounds of Data into Legible Digital Records</title>
		<link>http://narrativescience.com/blog/how-ancestry-com-transforms-mounds-of-data-into-legible-digital-records/</link>
		<comments>http://narrativescience.com/blog/how-ancestry-com-transforms-mounds-of-data-into-legible-digital-records/#comments</comments>
		<pubDate>Mon, 27 May 2013 19:33:20 +0000</pubDate>
		<dc:creator>Katy De Leon</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2828</guid>
		<description><![CDATA[GigaOM]]></description>
				<content:encoded><![CDATA[<p>GigaOM</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/how-ancestry-com-transforms-mounds-of-data-into-legible-digital-records/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Human Insight at Machine Scale</title>
		<link>http://narrativescience.com/blog/human-insight-at-machine-scale/</link>
		<comments>http://narrativescience.com/blog/human-insight-at-machine-scale/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 19:02:37 +0000</pubDate>
		<dc:creator>Kris Hammond</dc:creator>
				<category><![CDATA[Thought Leadership]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[automated content generation]]></category>
		<category><![CDATA[Big Data]]></category>
		<category><![CDATA[data analytics]]></category>
		<category><![CDATA[Data Communication]]></category>
		<category><![CDATA[data insights]]></category>
		<category><![CDATA[data scientist]]></category>
		<category><![CDATA[Data Transformation]]></category>
		<category><![CDATA[human insight]]></category>
		<category><![CDATA[insight]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[natural language processing]]></category>
		<category><![CDATA[Quill]]></category>

		<guid isPermaLink="false">http://narrativescience.com/?p=2766</guid>
		<description><![CDATA[For a while now, we have been talking about Quill as providing &#8220;human insight at machine scale.&#8221; So, what do we mean by that? It’s actually pretty straightforward. Starting from a data perspective, you can think of insight as a product of noticing relationships between facts that are not entirely clear by looking at each...  <a href="http://narrativescience.com/blog/human-insight-at-machine-scale/" title="Read Human Insight at Machine Scale">Read more &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>For a while now, we have been talking about <a href="http://narrativescience.com/artificial-intelligence-data-engine/">Quill</a> as providing &#8220;human insight at machine scale.&#8221; So, what do we mean by that?</p>
<p>It’s actually pretty straightforward.</p>
<p>Starting from a data perspective, you can think of insight as a product of noticing relationships between facts that are not entirely clear by looking at each fact by itself. Insight is going beyond the data and even beyond drawing the facts from it, to assessing how those facts come together to form an overall picture of what has, and is, happening.</p>
<p>For example, the fact that a company has declining revenues is interesting but not insightful. Likewise, the fact that its costs are going up alone doesn’t paint a picture. Nor does that fact that labor costs are on the rise because of a scarcity of expertise. But together, we can <a href="http://narrativescience.com/why-narratives/">read the story</a> of a company who is on the ropes because it is competing for a resource that every other company in its industry is hunting as well. And, true insight is to understand that this situation often leads to consolidation, which is likely on the horizon.</p>
<p>Of course, since we can describe this situation means that we can encode it along side similar patterns of fact and data relations that give rise to insight. Once encoded and turned into data analytics, <a href="http://narrativescience.com/artificial-intelligence-data-engine/">Quill</a> can use those analytics to move from data, to fact, to insight. That is to say, it can express human insight at machine scale.</p>
<p>Now some may say that insight is a human trait that goes beyond the numbers. I would agree with them. Insight goes beyond the numbers to the facts and the relationships between them. Numbers are the &#8220;grist for the mill&#8221; of insight. They are part of the human experience of assessing the world and determining what has happened and will happen next. That <a href="http://narrativescience.com/artificial-intelligence-data-engine/">Quill</a> can take this human skill and execute it at tremendous speed, scale and quality is less a testament to the machine and more to our ability to understand ourselves and how we think.</p>
]]></content:encoded>
			<wfw:commentRss>http://narrativescience.com/blog/human-insight-at-machine-scale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
