Mike Lamoureux's Blog

Work: I am a health information technology architect, management consultant, and Adjunct Professor located in the Washington, DC Area.

Play: Red Sox and Patriots fan, dog owner, technologist, coffee addict

View my Online Profile / Resume

Find me on...

Twitter feed

Search

Tag Results

13 posts tagged professional

Defining the Problem - Octo Consulting’s entree into Semantic Web

Note: This blog post was co-posted at Octoconsulting.com, with the help of our Director of Health IT, Dr. Charlie Mead.

Octo set out a few weeks ago to figure out a path to solve a problem that is simple to explain but difficult to achieve. We call it a “End-to-End Use Case.” The challenge is to find a way to discover “semantically equivalent” data that has been collected in multiple studies. Traditionally, this is a relatively straight-forward task if done pre-study (although it requires considerable “top-down” governance), but very difficult once a study has been “designed” and executed. The inherent semantic difficulty of the task is made even more difficult by ‘non-semantic’ barriers including different physical data persistence and access models, and the wire-format exchange” serialization brittleness” of XML, the lingua franca for much clinical trial data exchange. Our work is based on the overarching thesis that “end-to-end Semantic Web-based representation of study meta-data and data plus data transport formats largely circumvents the non-semantic barriers, thereby allowing study stakeholders to focus on the core problem: interoperable semantics.

Octo Consulting and members of the W3C’s Healthcare Life Sciences Working Group have developed a concrete instance of our hypothesis in which study meta-data and data are represented using based on RDFS and OWL ontologies of the HL7 Model Interchange Format (MIF) — the MIF includes the HL7 Reference Information Model (RIM), data types and vocabulary bindings — and SNOMED-CT. Data transport will use an Semantic Web representation of the CDISC ODM (Operational Data Model) specification. SPARQL end points are used for data discover and analysis.

Finished the graph for my Social Connections this weekend, so far Facebook is the only data point.  See my link to the dashboard here.  Took much longer than I anticipated as I had to change SPARQL endpoints a few times to get what I wanted.  A few of the SPARQL endpoints out there have limited or no support for BIND commands, and/or no support for SPARQL INSERT/UPDATE commands.  I’m now using Jena’s SPARQL endpoint.  Eventually I’ll expose the endpoint to the web if anyone is interested in the raw data.  Right now it’s firewalled.

Now that I have the social interactions proof of concept complete, I will move to getting more interesting data out of Facebook and my other social networks.  And then, of course, since I’m graphing them over time, it will take a bit to get the historical data to make it interesting.

EasyRDF has also been a great help, and I’m hoping the author continues to develop the library.

Progress on Semantic Web Dashboard

image

I am in the process of adding another source of data to my Semantic Web Dashboard.  I want to chart my number of friends via Social Media over time.  I started with Facebook - but Facebook doesn’t give me access to my historical friends count, only the current count today.  So, I’m writing a app that will record the number of friends I have on a daily basis.  I plan to expand it down the road to include number of postings and other things.  This will mean that any chart I create will have limited data initially.  I didn’t get to actually creating the chart yet, it took me long enough to figure out Facebook’s Graph API and to get that working properly (did I mention that I hate JSON?).

Here is the source to my PHP script that grabs my friend count:

<?php 

//require_once(“facebook-php-sdk-master/src/facebook.php”);

    $user_id = “7412441”;

$app_id = “REMOVED”;

$app_secret = “REMOVED”;

$my_url = “REMOVED”;

$app_token_url = “https://graph.facebook.com/oauth/access_token?”

. “client_id=” . $app_id

. “&client_secret=” . $app_secret 

. “&grant_type=client_credentials”;

 

$response = file_get_contents($app_token_url);

$params = null;

    parse_str($response, $params);

$graph_url = “https://graph.facebook.com/app?access_token=” 

        . $params[‘access_token’];

    //$app_details = json_decode(file_get_contents($graph_url), true);

    //$query_url = “https://graph.facebook.com//fql?q=SELECT+friend_count+FROM+user+WHERE+uid=” . $user_id . “&access_token=” . $params[‘access_token’];

$query_url = “https://graph.facebook.com/$user_id?fields=friends&access_token=” . $params[‘access_token’];

    $rawdata = file_get_contents($query_url);

    //echo $rawdata;

$friends = json_decode($rawdata, true);

$friends_count = count($friends[‘friends’][‘data’]);

echo $friends_count;

// Write to RDF, not complete yet.

$RDFData = “data.ttl”;

$fh = fopen($RDFData, ‘a’);

$stringData = “”;

?>

I’m very excited that I have my first chart / widget being produced off Semantic Web technologies. The link (click the header bar with the link icon) takes you to a server I have running.

Here’s how it works: the index.html file (code is below) makes a ajax call to a PHP file called “getEnergyData.php” and uses that data to chart the information in a Google Cart.  The PHP script’s ultimate output is a data format called JSON.  The PHP script uses a library I found called easyRDF, which has been very helpful and saved me lots of time.  easyRDF makes a call to my SPARQL server, which is hosting some simple data about my energy usage in 2011 (I simply haven’t entered my 2012 data yet).

The only change from my original plan is that I’m running SWObjects rather than Apache Jena Fuseki as my SPARQL Server.  SWObjects is cleaner and simpler, I didn’t need anything fancy for what I was doing.

What I learned: Moving between RDF and JSON isn’t as simple as I thought.  I’m embarrassed in the poor coding quality of my getEnergyData.php script (which is why I’m not sharing it yet).  JSON has the benefit of having many developer libraries that work well with it.  Manipulating RDF data (as to keep the context of the data) until you wish to output in JSON is the ultimate goal.  Currently I’m using PHP to iterate through records and script JSON, not the best tactic I’m sure.

Here is the index.html code:

<html>

  <head>

    <script type=”text/javascript” src=”https://www.google.com/jsapi”></script>

    <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.3.js”></script>

    <script type=”text/javascript”>

    // Load the Visualization API and the piechart package.

    google.load(‘visualization’, ‘1’, {‘packages’:[‘corechart’]});

    // Set a callback to run when the Google Visualization API is loaded.

    google.setOnLoadCallback(drawChart);

    function drawChart() {

      var energyDataArray = $.ajax({

          url: “getEnergyData.php”,

          dataType:”json”,

          async: false

          }).responseText;

      // Create our data table out of JSON data loaded from server.

     var data = new google.visualization.DataTable(energyDataArray);

       var options = {

          title: ‘Energy Usage (kWh)’

        };

      //var data = google.visualization.arrayToDataTable(energyDataArray);

      // Instantiate and draw our chart, passing in some options.

      var chart = new google.visualization.LineChart(document.getElementById(‘chart_div’));

      chart.draw(data, options);

    }

    </script>

  </head>

  <body>

    <div id=”chart_div” style=”width: 700px; height: 500px;”></div>

  </body>

</html>

Building a Semantic Web Personal Dashboard

image

I’m taking up a pet project to develop a personal data dashboard that I will make partially public on my blog.  I’m challenging myself to do this as I was looking for a achievable project to undertake using Semantic Web technologies.  Here are the data sources, some of which are manual, that I’m considering using:

  • Energy Usage Data (SOURCE: Power Bills, I wish NEST were to give me specifics on this in a automated way)
  • Personal Health Information including my weight (SOURCE: Fitbit scale)
  • Social Trends Information (SOURCE: Facebook and Twitter)
  • Personal finances (likely will hide the Y-axis!) such as net worth or retirement savings (SOURCE: iBank)
  • Average TV Usage (SOURCE: My Home Automation System)

Here are the details for the plan:

  • I will use RDF to store my data in a flat file
  • I will use Fuseki from the Apache Jena project to serve that data using SPARQL
  • I will use PHP to query the information using easyRDF libraries which will be converted to JSON
  • I will use Google Charts to produce the dashboard, and JQuery to load the information asynchronously
  • I’ll host this on my Synology Server (hopefully without having to keep a VM running on my iMac to successfully keep it hosted, but we will see)

I look forward to showing my colleagues at Octo Consulting my progress.  I know some of the developers there may have some suggestions on how to best work with JSON, something I’m not very experienced with.  Wish me luck, I’ll keep you posted on progress.

The Maturing Conversation of Twitter

Companies often mistake Twitter as solely a marketing tool.  While it might seem a bit dumb to write a post about defining the “value” of twitter, I do believe that maturity of the conversation occurring on twitter has improved year after year as valuable voices have added their input to the social network.  While that has happened, some companies have not understood that twitter is maturing.

As a consultant, part of my job is to engage in active conversation about areas that my company provides advice, and where I hold my passions.  Twitter is by no means a replacement for participating in face to face communities, but it can be a supplement.  Recently, I attended a week-long HL7 working group session.  As a newcomer, I was shy to participate, but meeting a few people on Twitter gave me a bit of a way to share and validate my early thoughts while not speaking aloud in large working group meetings.  While listening, I didn’t just share the raw quotes that were spewing from the mouth of the speaker.  I synthesized the information, joined with other topics that are being discussed outside of the conference, and gave my opinion.  These types of posts received more traction than the raw quotes you often see from tweets while attending a conference.   It sounds obvious, but content really is king.

In the past two years, Twitter has completely replaced my RSS reader.  It is where I track professional topics that are of interest to me, and over the years I have stopped simply consuming and started producing.  I’m sorry to say that I visit less websites as a daily ritual now because of twitter.  I get my news from Twitter, and if I want to read more, I follow the link.  I am now slightly annoyed when someone I believe has a valuable voice that I want to hear, doesn’t participate in twitter, or they do so poorly.

For all you bloggers out there - don’t just tweet the titles of your blog posts.  Participate more, and share in unfiltered ways.  RT when you find something that is of value to you, not just because it is asked of you. “Retweet this!” will get you no-where with me.

Companies, especially consulting firms - encourage your employees to grow their voice in their field of expertise by participating in discussions online and otherwise.  Don’t use Twitter solely for well-planned press releases.

This year, I was faced with the decision on whether to continue to represent my current employer, Octo Consulting Group, using my current twitter handle @mlamoure, or to use a new one.  I ultimately decided to create a new handle @octo_mikel which is where I tweet some Octo specific items.  Hope to see you on there.

Semantic Web Activities

I’ve been going through “Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL” (amazon link) for quite some time.  Today, I am paring that with a tutorial from Matthew Horridge.  It is quite amazing how primitive the tools remain for the semantic web, I believe it adds to the barrier of entry for most established technical folks who look at the semantic web like it’s a foreign language.

This is the future of healthcare data, and what will pave the way for future health IT systems initiatives, I’m almost convinced.  I’ll post more on my progress.

My brother just returned from a two-month-long trip to Tanzania, his efforts paid off with a published article, see the link.  I think he is the “jl” in the signature line at the bottom :)

A LCD screen for every purpose

One of the arguments for or against a smaller iPad / tablet that I have not heard (maybe I missed it) is that laptop screens are getting smaller, which is encroaching on the larger tablet screen of the iPad.  If you have a 10” netbook, why would you want a 10” tablet?  Perhaps the real question is whether or not we need a device for every “divide by two” from a 12” screen down…

I’m not saying that I subscribe to this line of thinking just yet - I plan to stick with the “full size” iPad, could my opinion come from the fact that I have a 15” laptop?  I do reserve the right to change my mind!

In other news, I went full speed ahead and purchased a INSTEON starter kit, and the Indigo Mac software.   I plan to integrate my home cameras, my remote control, and a few other devices into a single platform.  I will most certainly update you as I go.

Why we don’t need a Apple partnership with the cable companies

Now that we have Hulu Plus on the AppleTV the stage is set… Next up should be ESPN, HBO, NBC Nightly News, and more… We’ve seen the trends of timeshifting and placeshifting pass us by. Now the cloud will centralize our content for delivery when and where we want, rather than relying on recorded content from home. All of this provided over the multiple service provides that provide us with access to the Internet. Apple should work to pressure the content proving media companies to restructure their deals with the cable companies to allow them to distribute their own content over multiple mediums, cable TV and the Internet. It’s good business and finally brings competition to the cable industry.

Loading posts...