AdamJeddy / dimo-streams-demo

Code for Subscribing to DIMO Data, collecting, and analyzing it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This repository contains a set of scripts to process, save, and convert stream data for visualization.

Installation guide

  • Make sure you have Node.js installed for running the TypeScript script.
  • Make sure you have Python installed for running the Python script.
  • Make sure you have npm installed
  1. Run installation

    npm i
  2. Install npx

    npm i -g npx
  3. Start subscriber

    npm run start

Usage

Data Collection

The main.ts file contains the TypeScript code to connect to a data stream, process the data, and save specific fields (id, ambientTemp, latitude, longitude, and time) to a file named output.txt.

Run the TypeScript script using the following command:

tsc main.ts && node main.js

Data Conversion

The convert_to_csv.py file contains the Python script to convert the data saved in output.txt to a CSV file named output.csv.

Run the Python script using the following command:

python convert_to_csv.py

Data Visualization

Upload the file output.csv on https://kepler.gl/demo to see all the data points

About

Code for Subscribing to DIMO Data, collecting, and analyzing it

License:Apache License 2.0


Languages

Language:Python 53.8%Language:TypeScript 46.2%