Namara.io as a Bluemix Service

Share: Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditEmail this to someonePrint this page

NamaraAndBluemix

I am a co-op student who just recently joined the IBM jStart Emerging Technologies team.  My first project was to create and run an application on the IBM Bluemix platform and have that application use the new Web and Application service, Namara.io.


IBM Bluemix

As this was my first IBM Bluemix app, it is important to note how easy I found it to start coding. In 1 minute, I setup and ran the hello world app for the node.js SDK. It was great knowing I had a working app right away and that now I could easily move to creating my code, instead of figuring out how to get everything running.

Next, I decided I wanted to work locally instead of using the IBM DevOp service. I downloaded the starter code to my machine and then installed the Cloud Foundry command line tool and node.js packages that I would need to develop locally. This took an additional 5 minutes, but now i was ready to start coding.

The hardest part of the whole setup process was learning about how to use the cloud foundry CLI, and that wasn’t even difficult because Bluemix gives you the 7 instructions you need to get going.

After a few days of development and a couple “cf push”s later, my app that called the Namara.io service APIs was finished and completely running on IBM Bluemix without any issues.


Namara.io

The Namara.io platform aggregates available open data released by all levels of government and presents it to users in a single portal. It organizes and catalogues this public data, providing users with API access to high value information.

Namara provides the ability to gather many different kinds of data, in a simple, uniform way, and without having to host the data yourself.

Normally, to add a service to your Bluemix app, you have to bind the service. In the case of Namara, all I had to do was create a simple api string and the data was returned to me in a JSON format. And to make things even easier, there exists a Namara, node.js API client that formats the string and returns the data to a variable for use in the javascript.

Note that Namara currently only returns 250 data items per API call and you are only allowed to make 10,000 requests on your account per month. These are important to keep in mind when creating a larger scaled application.

Namara was easy to use and once I had gathered the data from them, it was just a matter of manipulating the JSON string and creating the visual representation of it that I wanted.

Apart from the simple app I created using Namara, I see people being able to gather many different kinds of data quickly and doing analytics on that larger dataset.


My ApplicationScreen Shot 2015-06-04 at 1.36.29 PM

The direction I took this project in was a simple information display. I called for the API to return the “ENVIRONMENT CANADA: POLLUTANT RELEASE TO WATER (SUBSTANCE)” data and made some graphs that displayed, for each year between 2009 and 2013, how many Facilities were disposing the specific substance and the total amount being disposed of.

In order to get all 988 data items, I called the api five times, once for each year. Each api call had the api end point, the data set key, the data set version, my conditionals, and my api key:

http://api.namara.io/v0/

data_sets/70aa282d-d5c3-4b99-a2ac-0bf3a8fb452a/

data/en-0?

where=year=2009

&api_key={api key}

This particular api call returns a data set that looks like this:


Overall my impression of IBM Bluemix and Namara were very good. Both do a good job abstracting their services so that I could focus on writing the core of the application, the thing that I think all developers are most interested in doing.

 

Share: Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditEmail this to someonePrint this page
Alex Lewitt
Alex is currently a software developer co-op on the IBM jStart Team and is pursuing a BS Degree in Computer Science at the University of Florida. Alex's main focus for the past few months has been on Apache Spark, Apache Spark Machine Learning, and IBM BlueMix.
Alex Lewitt
Alex Lewitt
GitHub

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *