Giter Club home page Giter Club logo

iris-analytics-template's Introduction

iris-analytics-template

Gitter Quality Gate Status GitHub last commit

This is a template for InterSystems IRIS Analytics (DeepSee) solutions. The template contains a very basic example of the BI solution which contains one source class, data, one cube, two pivots and one dashboard.

Installation

ZPM

It's packaged with ZPM so it could be installed as:

zpm "install iris-analytics-sample"

then open http://localhost:32792/dsw/index.html#/USER

you should see a dashboard with the data on confirmed COVID-19 cases distributed by countries and its provinces, like that: Screenshot 2022-08-17 at 11 36 32

Docker

The repo is dockerised so you can clone/git pull the repo into any local directory

$ git clone https://github.com/intersystems-community/iris-analytics-template.git

Open the terminal in this directory and run:

$ docker-compose up -d

and open then http://localhost:32792/dsw/index.html#/USER

Or, open the cloned folder in VSCode, start docker-compose and open the URL via VSCode menu: Screenshot 2020-11-15 at 20 17 12

How to start coding

Prerequisites

Make sure you have git and Docker desktop installed.

This repository is ready to code in VSCode with ObjectScript plugin. Install VSCode, Docker and ObjectScript plugin and open the folder in VSCode. Open /src/cls/PackageSample/ObjectScript.cls class and try to make changes - it will be compiled in running IRIS docker container. docker_compose

Read more about folder setup for InterSystems ObjectScript

The script in Installer.cls will import everything you place under /src into IRIS.

How this sample was created

The class and data were taken from covid19 CSV Johns Hopkins repository.

zpm "install csvgen" will import csvgen package which lets to create class and import data with the following line:

set file="https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/11-14-2020.csv"
zw ##class(community.csvgen).GenerateFromURL(file,",","dc.irisbi.covid19")

The cube was generated from with:

zw ##class(%DeepSee.WizardUtils).%GenerateCubeDefinition("dc.irisbi.covid19","CovidCube","dc.irisbi.covid19cube",1)

Deployment

To deploy this project via ZPM or docker we need: classes, data and DFI. Cube class dc.irisbi.Covid19Cube.cls was exported manually via Server view in VSCode.

Pivots and dashboard were created manually and then were exported with isc dev to the format, which standard import procedures and ZPM can import:

zpm "install isc-dev"
do ##class(dev.code).workdir("/irisdev/app/src")
d ##class(dev.code).export("*.DFI")

And data was exported via standard export utility:

do $System.OBJ.Export("dc*.GBL","/irisdev/app/src/gbl/dc.irisbi.covid19D.xml",,.errors)

after that ZPM module.xml was created manually which includes classes, DFI, global and calls %DeepSee.Utils("Covid19Cube") to build the cube data.

What's inside the repository

Dockerfile

The simplest dockerfile which starts IRIS and imports Installer.cls and then runs the Installer.setup method, which creates IRISAPP Namespace and imports ObjectScript code from /src folder into it. Use the related docker-compose.yml to easily setup additional parametes like port number and where you map keys and host folders. Use .env/ file to adjust the dockerfile being used in docker-compose.

.vscode/settings.json

Settings file to let you immedietly code in VSCode with VSCode ObjectScript plugin)

.vscode/launch.json

Config file if you want to debug with VSCode ObjectScript

Read about all the files in this article

iris-analytics-template's People

Contributors

daimor avatar evshvarov avatar sergeymi37 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.