Time Zones and Daylight Saving Time

Well, while only tangentially related because of a missed meeting, I thought this was an interesting thing to post about since I just learned about it.

Basically, less than half of the world currently uses daylight saving time (DST) and the rules are a little more complex than one might originally expect.

Many countries in Europe adjust their clocks at the same time (01:00 GMT) while countries like the USA adjusts clocks locally at 03:00. In addition to the simple act of many countries/time zones adjusting at different times, different countries also switch to DST on different dates, Europe having switched this Sunday while the USA will not switch for another week.

Hope you enjoyed this little tid-bit as much as I did!

Posted in Uncategorized | Leave a comment

Updates! Finally!

Well, I would love to blog about my travels and experiences in Europe but the only relevant part would be how it pulls me away from the computer and slows down progress!

Joking aside, my newest update is mainly a bug fix to handle a problem with bad links coming back to me from my initial query and the addition of displaying the results in small (5 results a a time) pieces to minimize computer processing draw and make the results more manageable.

Anyone who had previously visited my page that displays results may have had the please to meet my friendly JavaScript Alert “Error in query: Request timed out”.

The reason for these timeout errors is pretty simple, when I query the database for URLs to all of the individual data sets, some of the links are bad. Most of these links were probably good at one time but the data was moved while the URL remained unchanged. I realized that before I could move any further forward towards my outlined goals, I needed to find a reasonable solution/workaround for timeouts.

My solution to handle the bad errors was first to remove the pop-up, the user doesn’t need to know about all of those errors. Second was to account for the problems the error caused, mainly in counting/displaying/hiding different visualizations. When I simply displayed everything at once it allowed me to ignore the error, but if I want to only display some data I need to be certain that my information matches up. To make sure that number always matches up, I am inserting a false set of divs for the bad link and will eventually use it as a way to report/find the bad links. Currently, you are simply given an empty div but I can use this in the future.

With these features I think I have greatly expanded the use-ability of the page, specifically since it will no longer annoy users.

You can check everything out for yourself here: http://www.cs.rpi.edu/~helmc2/TWC/Research.html

A quick preview for the rest:

Posted in Uncategorized | Leave a comment

Blogging from another country!

As some of you may know I am spending this semester abroad in Denmark! My goals while studying here are mainly to gain exposure to how people in different parts of the world interact in social and educational contexts. I have spent the past few weeks traveling to Denmark and getting settled into this new place. Finally, I have the chance to sit down and concentrate on getting back to research.

The first step is thinking about some goals that I would like to accomplish this semester and beginning to plan them out. I left of at the end of the summer with a reasonably presentable set of tables describing the data sets found on the LOGD sparql endpoint. There is still a LOT of work to be done in terms of visually presenting the data and in terms of parsing/cleaning/selecting the data. I think it then makes sense to break down my objectives in terms of presentation and parsing with a little overlap between the two.

Visual Goals
  • Eliminate presentation of all of the data at once, instead allowing more of a browse/select which data to show and eliminate the overhead of processing everything at once.
  • Determine ways to prepare more “visual” presentations of the data ranging from pie charts to geo-maps. I need to look at data sets and identify unique information that could be used to create a more useful visualization.
  • E-mail members of TWC and see if there are any specific ways they would like information presented or ways that would be helpful for demonstration purposes  and etc.
Data Parsing Goals
  • Re-organize data on a basic level to group similar information together. This makes sense from a browsing viewpoint.
  • Find ways to identify unique information that could be used in creating more useful visualizations.
  • Expand capabilities of queries to gather information from different endpoints and handle a broader range of data.
Following the completing of some of these tasks/goals I will likely have to re-hash other ones, but that will come later. For now, those are my current thoughts and ideas and I should be able to start knocking them out soon!
Looking forward to a productive semester and meeting all the new undergrads!
Posted in Uncategorized | Leave a comment

Summer Reflections

After a long summer of traveling, tiring work weeks with Cisco, bathing in the summer sun, and getting down to the basics with my project, the time to wrap the summer up and start thinking about the next year has come! This summer was off and on progress with a lot of work coming in my weeks of free time and a slow trickle coming during the busiest weeks. I came into the summer with some basic plans and ideas of what I wanted to do (dynamic visualizations) and worked out the details for accomplishing it as I went. My plan of attack was as follows:

  • Write a query to return all of the information from a specific data set.
  • Write a general purpose query to get the urls to the specific data sets.
  • Create a mash-up of the general query.
  • Create a mash-up that can work for the results of the specific query returned by the general query.
  • Combine all of the mash-ups into an attractive (debatable) and easy to navigate web page that can display what is in a specific triple store.

Starting with the Visualizations I previously produced I turned them into tables to create something a little more general. This would give me a base for displaying the data I gather from my first set of queries. I then worked on getting my data. After investigating the tutorials written by Tim L, I was able to create a couple useful queries based on the information in his tutorials. SELECT ?dataset WHERE { GRAPH ?dataset  { ?dataset void:dataDump ?datadump . } } GROUP BY ?dataset This base query generates a list of all of the urls that I would use in my second query: prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#&gt; prefix void:       <http://rdfs.org/ns/void#&gt; prefix ov:         <http://open.vocab.org/terms/&gt; prefix conversion: <http://purl.org/twc/vocab/conversion/&gt; SELECT DISTINCT ?eg ?col ?p ?pLabel ?o WHERE { graph <http://logd.tw.rpi.edu/source/data-gov/dataset/2793/version/2010-Dec-17/conversion/enhancement/1/subset/sample&gt; { [] void:exampleResource ?eg . ?eg ?p ?o . optional{ ?p ov:csvCol                       ?col } optional{ ?p rdfs:label                      ?pLabel } optional{ ?p conversion:subjectDiscriminator ?discrim } } } ORDER BY ?eg ?colSimply substituting different results from the first query into the second query would allow me to create a table containing all the data from the data-set as seen below:

Now that I had all of the raw results it was time to figure out a way to link everything together and create a “super-mash-up” containing everything and additionally think of useful ways to display the data.

I entertained a few different ideas for how to create my final mash-up and got pretty far into a couple before scrapping them and deciding that another idea was superior. At first I thought that perhaps sending the data off to a perl cgi script would be a good idea and streamline the process but after encountering trouble with writing data I decided against it in favor of a pure JS implementation. I found a way to creatively generate the queries that I would send to Google Viz by noticing the url generated from running queries on the SPARQL proxy hosted by the LOGD site. With the queries ready and the mash-ups good to go it was time to link everything together. The original JS implementation simply printed out all of the visualizations and left a lot to be desired in terms of useability. Since an important part of this project is to make the data useable, I took a while to think of a reasonable way to display the data and still have much work to do, but currently have a pretty good demo of the potential that the script can offer.


You can visit the real thing at: http://www.cs.rpi.edu/%7Ehelmc2/TWC/TWCMainDev.html I have enjoyed working on this project and would greatly enjoy continuing to do so and perhaps helping out with some other projects going on in the TWC. I think the progress and work I completed this summer is a great step towards my goal of creating a tool that can help give researchers, especially undergrads, an idea of what data is out there that they can get their hands into and start doing more with! Overall I think this summer was highly successful and I was able to learn a lot about creating visualizations and using SPARQL. I’m exciting to keep making progress and see what everyone else is up to!

Posted in Uncategorized | Leave a comment

Two week break.

Time to drive across the country and then fly across the ocean! Expect more updates as soon as I am once again off the road! Until then, contact me via email with questions.

Posted in Uncategorized | Leave a comment

Something Visual.

Made some serious style and formatting updates so that everything looks nice and comes out pretty easy to navigate. Looking into reorganizing the information and maybe setting things up so it only loads a few queries at a time. But here’s how it turned out:


Check out the real thing at http://www.cs.rpi.edu/~helmc2/TWC/TWCMainDev.html

Posted in Uncategorized | Leave a comment

Some more changes and back to something practical.

After tormenting anyone who looked at the previous script with hundreds of pop-ups, I decided to make things a lot more manageable by getting everything back into one script and creating divs that can be opened and closed. Currently everything looks pretty sloppy since there isn’t really any css going on, but I will get to that at some point.

The new file, TWCnew.html, has been dropped into this folder along with the older files.

A quick preview is below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Visualization</title>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">

google.load('visualization', '1', {packages: ['table']});
var numdivs = 0;
function drawTable() {
//load data using SPARQL query
var queryLoc = 'http://www.cs.rpi.edu/~helmc2/query';
var query = new google.visualization.Query('http://logd.tw.rpi.edu/sparql.php?'+
'query-uri=' + queryLoc +
// Send the query with a callback function.

function drawSecondTable(q) {
var queryurl = "http://logd.tw.rpi.edu/sparql.php?query-option=text&query=prefix+rdfs%3A+++++++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0Aprefix+void%3A+++++++%3Chttp%3A%2F%2Frdfs.org%2Fns%2Fvoid%23%3E%0D%0Aprefix+ov%3A+++++++++%3Chttp%3A%2F%2Fopen.vocab.org%2Fterms%2F%3E%0D%0Aprefix+conversion%3A+%3Chttp%3A%2F%2Fpurl.org%2Ftwc%2Fvocab%2Fconversion%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Feg+%3Fcol+%3Fp+%3FpLabel+%3Fo%0D%0AWHERE+{%0D%0Agraph+%3C" + q + "%3E+{%0D%0A[]+void%3AexampleResource+%3Feg+.%0D%0A%3Feg+%3Fp+%3Fo+.%0D%0Aoptional{+%3Fp+ov%3AcsvCol+++++++++++++++++++++++%3Fcol+}%0D%0Aoptional{+%3Fp+rdfs%3Alabel++++++++++++++++++++++%3FpLabel+}%0D%0Aoptional{+%3Fp+conversion%3AsubjectDiscriminator+%3Fdiscrim+}%0D%0A}%0D%0A}+ORDER+BY+%3Feg+%3Fcol&service-uri=&output=gvds&callback=&tqx=&tp=";
var query = new google.visualization.Query(queryurl);
// Send the query with a callback function.

function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' +
response.getMessage() + ' ' +
//Get the data
var data = response.getDataTable();
var rows = data.getNumberOfRows();
for (var i = 0; i < 5; i++ ){
drawSecondTable(encodeURIComponent(data.getValue(i, 0)));

var viz = document.getElementById('root');
new google.visualization.Table(viz).draw(data);

function handleSecondQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' +
response.getMessage() + ' ' +
var data = response.getDataTable();
var div = 'content'+numdivs;
var viz = document.getElementById(div);
new google.visualization.Table(viz).draw(data);

function createDiv(q)

var div1 = document.createElement('div');
var div1IdName = 'divheader'+ q;
div1.innerHTML = "Visualization " + q;

var div2 = document.createElement('div');
var div2IdName = 'content'+ q;
div2.style.display = "none";

var div = document.getElementById(div1IdName);
var newlink = document.createElement('a');
var header = 'header' + q;
newlink.setAttribute('class', 'signature');
newlink.setAttribute('href', 'javascript:toggle2(' +'\'' + div2IdName +'\'' + ',' + '\'' + header +'\'' +')');
newlink.innerHTML = '<img src="/plus.png">'


function toggle2(showHideDiv, switchTextDiv) {
var ele = document.getElementById(showHideDiv);
var text = document.getElementById(switchTextDiv);
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = '<img src="/plus.png">';
else {
ele.style.display = "block";
text.innerHTML = '<img src="/minus.png">';


<h3>Visualization Results</h3>

<div id="titleText">First Query Results</div><a id="myHeader" href="javascript:toggle2('root','myHeader');"><img src="plus.png"></a>
<div id="root" style="display: none;"></div>


Posted in Uncategorized | Leave a comment