Integration is the answer!


In the last year, I have been integrating the SMART conservation tools with some data analytics tools (http://smartconservationtools.org/).  Many animals life could be saved by predicting of future illegal activities around the world.

This type of data analysis relies on a broad set of observations religiously input. This data cannot only advance research in endangered species protection but also detect some patterns in illegal activities. Then policing can be more useful to deter any unlawful activities. This type of analysis could also be extended to a more general purpose and suggests the exploration of some region of some conservation areas for some other aim; i.e. observation.

Technology to the rescue

Such data capture relies on a range of technologies such as GPRS tracking. The more advanced techniques can use some satellite imaging to track the most massive pachyderms and herds. Their patterns of behaviours can be studied. Human activities can then learn to share the space of the animals so that human activities do not affect the animals. This type of settings is just ideal.

Let’s imagine some conservation managers could filter some data on some temporal and specific keywords, to plan some future patrols. Then these managers could be empowered with some unknown patterns of behaviours; some potential illegal hotspot could be identified and also study the real effects of some past interventions.

These types of computer analysis are not so simple and often relies on some large computing facilities to obtain this type of answers. However, with the development of data analytics, this aim is becoming more accessible to achieve.

What have I achieved?

In the last year, I have been integrating two very different types of programming languages; Java and R. Both programming languages should be platform independent, multi-paradigm and open-source; both programming languages are interpreted. Java has a more general use than data mining and statistics. R excels in the later, but it is not suited to create some user-friendly user interface.

The idea is to use the strength of both programming languages to achieve our data analytics. First of all, Java can be useful in designing some user interaction that is intuitive, and easy to learn. The range of “widgets” can help to show some information extracted from a database. Then, Java can also be excellent at obtaining this information to be passed to a complicated statistical model. On the other hand, the programming language R provides some outstanding data analytics libraries. These models can help in predicting future patterns in using geospatial data.

The difficulties now lie in integrating both environments, so that they can run on some not-too-powerful computers. First of all, we needed to save the extracted data in some files. Secondly, the results of some statistical models are necessary to be fed back to a Java application.

Some concurrency was inevitable but needed to be limited to a minimum. Some methods of integrating some R code from Java utilises some client-server architectures. While they can be used on a network, they can be challenging to install on one computer; these techniques would not be suitable for some end-users with some limited IT skills. Also, their performance could be slow. Some others techniques call some R code written inside the Java. This solution can be very challenging to read and debug.

Instead, we have compromised between both programming languages. Only the data types commonly used in Java and R can be used. The “R programmers” write their code in some R scripts. The “Java programmers” calls the function in R and passes some arguments by value and reference. The R code is executed as a process in the background. The results of the R code are saved in some temporary files, which are read from Java.

As a result, we were able to develop the user interaction and data extraction independently from the statistical models. The testing of both elements was completed separately from each other components. The two parts were only bridged together by some agreed R function signatures (i.e. name and list of arguments). I believe the generality of the “JavaToR” library can then be applied to many other purposes.

Overall, not only animals can be saved, but also some times to integrate Java and R together in a more smoother fashion.

 

 

 

, ,

Leave a comment