Convert JSON data of Localytics to CSV using Python

Extraction Transformation Loading (ETL) is very important at the inception of data analytics. Data could come from variety of sources and formats. Either you have to adopt as it is or you have to convert into one common format. Here in this demo we will go through second option.

For those who do not know much about Localytics. Localytics is a lifecycle engagement platform for web and mobile apps. Their integrated approach to app marketing and analytics helps customers automate and optimize every stage of the app lifecycle to keep their users engaged and to deliver more personalized experiences. Localytics is used in more than 37,000 apps on more than 2.7 billion devices by companies such as ESPN, eBay, Fox and The New York Times. Localytics is headquartered in Boston, MA with offices in San Francisco and London. Investors include Sapphire Ventures, Foundation Capital and Polaris Partners. Read More Here.

As a part of their enterprise license Localytics does provide an API to access the raw data of your app analytics. Once you subscribe their Enterprise service you will get HOW TO guide by email. This guide contains how to access raw data from amazon s3.

Localytics exports raw data in JSON format. For IT professionals and MongoDB experts JSON is like their devotion. However for Data Analysts and Modelers it can be headache. Both of them can be either Excel or SPSS lovers who spend their time with tabular data.

As a part of this process We have created quick python script that will covert the json file to csv format.

Run this script from command line using,

Script will create a csv file with the same name in the same directory from which you are executing it. Happy Coding

 

Hardik Thaker

Hardik Thaker is working at Radix Analytics having 2+ years of experience as Full Stack Developer. Knowledge of Web programming (Java, JSP, Servlets, PHP, HTML5, CSS, jQuery/JavaScript), DB (MySQL, IBM DB2, Oracle, Redis, Voltdb, Hive), Mobile/Tablet Applications Programming (Android). Working in Big Data Industry with Apache Hadoop ecosystem and real time big data processing with Apache Storm.

 

Leave a Reply

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