in Data Visualisation, Uncategorized

Data Visualisation on iOS

Data visualisation is an integral part of reporting and analytics apps.Data visualisation is a vast field ranging from simple Bar Charts to complex interactive 3D Hyper Graphs and Web Spheres.This article presents my findings on the current state of libraries and frameworks available on iOS.

Making Data visualisation can be as easy as calling a function with the data, to coding on Graphics level drawing with primitives such as points and lines. This article categorizes libraries on the level of abstraction they provide.

Abstraction Levels

  • Data Visualisation Libraries
  • Visualisation Libraries
  • Graphics Libraries

WebView Performance Issues and Recent Development

Hybrid apps have long been associated with performance issues.On iOS, UIWebView doesn’t has access to the safari Nito JIT optimisations. Which in turns make all Web Based hybrid apps slow.

Good News for Hybrid app developers

iOS 8 supports WkWebView which now has access to this optimisation ,this optimisation can be leveraged just by shifting to this new API

Corresponding Case Study

Data Visualisation Libraries

  • Native Libraries

    • Basic Plotting Libraries

      • SM2DGraphView
      • CorePlot(Cocoa touch) – Basic Barebones plotting library
      • Limited 2d visualizations.
    • Charting Libraries

      • iOS Controls by Infragistics

        Marketed as Data UX solution, iOS Controls provides –

        • Charts
        • Grids
        • Gauges
        • Widgets

        Apart from the basic visualisation constructs widgets are add ons which can be included for fast prototyping. Projects can be developed in Objective-C, Xcode and Xamarin.

        iOS Controls is a Enterprise software, with a one time license purchase per dev.

      • ChartFx

        ChartFx is a widely cross-platform enterprise tool used for desktop data visualization. It also boasts of Web support but lacks the kind of variety which D3 or Chart js Provides.

        • Provides Basic Construct like Charts and grids.
        • Supports Visualisations on mapping.
        • Scientific data.
      • Nchart3D

        NChart3D is also a enterprise solution and provides similar functionality like ChartFx.

  • Web Libraries

    Web libraries are basically javascript libraries which can be put in use by the use of WebView(UIWebView for IOS). UIWebView can embed HTML5 , CSS and JS inside your app. This though seems to be the best way to take advantage of vast data visualisation libraries on web has performance issues. WebView though can take help of GPU acceleration can’t even come close to native app performance.
    NOTE: Recently in IOS 8 UIWebView performance has increased almost two folds.

    • D3 (Awesome Data Visualisation Library)

      D3 combines powerful data visualisation components and Data-Driven approach approach to DOM Manipulation. D3 gives very convenient chaining construct and functional style allows modular development. This approach lead to a wide array of community developed modules which can be reused and extended. THe constructs provided by D3 allow for fast prototyping without loosing flexibility of creating custom visualisation unlike other dedicated charting libraries.

      • Data Binding to DOM
      • Vast Community
      • Provides – canvas, svg, CSS3D and WebGL renderers.

      D3 has also been used with three.js to create interactive 3D visualisation running on WebGL.

    • CanvasJS

      Charting Library uses canvas element to build interactive designs.Charts are responsive and works on mobile devices painlessly.Charting takes relatively takes less code than D3 but is compensated with lost flexibility.

      • Easy to use charting library
      • Focus on Performance
      • Claims to work at 100K data Points
    • Chart.js

      Charting library with some standout charts like Radar Charts and Polar Area Charts. Also it provides the ability to write your own charts or extend existing ones.

Visualisation Library (Creative Coding Libraries)

Creative coding is a type of computer programming in which the goal is to create something expressive instead of something functional.A number of libraries have been created that aid in the rapid prototyping and development of these works.

  • Web Libraries

    • Processing

      Processing is open source programming language and integrated development environment based on JAVA. Processing Does not support iOS natively(supportsandroid though). There is a javascript port of processing that can be used for development on iOS.

      • No Native Support
      • Js Library
      • Can be embedded in WebView
      • iProcessing
        • iProcessing embeds processingjs into WebView.
        • Outdated no development after 2011
        • Performance Issues
  • Native Libraries

    • openFrameworks

      openFrameworks is an open source C++ toolkit for creative coding. openFrameworks main difference from Processing is that it is written in C++, instead of Java.openFrameworks supports all major platforms linux, windows and OSx and on mobile android and iOS. Programmer can also embed glut code for higher degree of control.

      • Allows range of useful primitives
      • Curves
      • Shapes
      • Animations
      • With a Physics engine can create awesome visualisations Dummy Game
      • Native iOS code integrates with Xcode
      • Touch controls

Graphics Libraries

  • Minko by Aerys

  • Minko Engine is a free cross platform and open source real-time 3D framework created by Aerys.Minko is similar to unity but better. For web it function totally on HTML5 so no need of installing a plugin like unity. Also it boasts of 3D compression for faster streaming on web and mobile.
  • Sprite Kit and Scene Kit

    • Sprite Kit render 2D Images native code, Scene kit renders 3D graphics
    • Box2d can be used to create interesting games and visualisations
    • Built on top of OpenGL

Perf Matters

  • renderperfgl- WebGL
    • IPad (iOS 7)- 3147 objects -25FPS
    • Got 5092 objects – 30FPS
    • OSx – 13546 objects – 30FPS
  • sbperftest – Canvas 2D
    • IPad (iOS 7)
    • Score =33
    • Again iOS 8 Score = 59
    • OSx
    • Score = 70

RenderperfGL

iOS 7 3147 Objects
iOS 8 5092 Objects
OSx 13546 Objects

 

Sbperftest

iOS 7 33 Objects
iOS 8 59 Objects
OSx 70 Objects

Impressive Visualisation

  • Ecosphere
    • Viz
    • Developed on WebGL.
  • Deaths By guns
  • Google Globe ChromeExperiments

Custom Open Source Libraries

Write a Comment

Comment