<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Renato Banzai</title>
    <description>The latest articles on DEV Community by Renato Banzai (@renatobanzai).</description>
    <link>https://dev.to/renatobanzai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F457879%2F0c5c4ebf-10ad-4dfb-8808-a202a5f5168a.jpeg</url>
      <title>DEV Community: Renato Banzai</title>
      <link>https://dev.to/renatobanzai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/renatobanzai"/>
    <language>en</language>
    <item>
      <title>Using FHIR to Interact with Natural Language</title>
      <dc:creator>Renato Banzai</dc:creator>
      <pubDate>Sun, 29 Aug 2021 19:14:18 +0000</pubDate>
      <link>https://dev.to/intersystems/using-fhir-to-interact-with-natural-language-2m33</link>
      <guid>https://dev.to/intersystems/using-fhir-to-interact-with-natural-language-2m33</guid>
      <description>&lt;h2&gt;
  
  
  Whats NLP Stands For?
&lt;/h2&gt;

&lt;p&gt;NLP stands for Natural Language Processing which is a field of Artificial Intelligence with a lot of complexity and &lt;br&gt;
techniques to in short words "understand what are you talking about".&lt;/p&gt;

&lt;h2&gt;
  
  
  And FHIR is...???
&lt;/h2&gt;

&lt;p&gt;FHIR stands for Fast Healthcare Interoperability Resources and is a standard to data structures for healthcare. There are &lt;br&gt;
some good articles here explainig better how FHIR interact with Intersystems IRIS.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Solution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xFxA2cV2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/fhir-chatbot/master/img/fhir_chatbot.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xFxA2cV2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/fhir-chatbot/master/img/fhir_chatbot.gif" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chatbot to query FHIR
&lt;/h2&gt;

&lt;p&gt;The most common approach in chatbots is use machine learning to train the model based in old conversations. But when the &lt;br&gt;
chatbot need to use "live" data the challenge is improved. If you already know how a machine learning model works, you know &lt;br&gt;
that is most of cases the trained model is a kind of "hadcorde" application with all decision embedded inside. If you need &lt;br&gt;
more data without retraining the model you will need to create by yourself the integrations and put your mind to work part &lt;br&gt;
in machine learning and part in software engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Approach
&lt;/h2&gt;

&lt;p&gt;To show more about FHIR I have decided to first work on questions that a healthcare professional could do to a chatbot. &lt;br&gt;
And to do this I keep the software engineering simple, using just javascript and regular expressions to look for intentions &lt;br&gt;
and entities on the chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regular Expressions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ksON9D8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/fhir-chatbot/master/img/regular_expressions.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ksON9D8O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/fhir-chatbot/master/img/regular_expressions.png" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my favorite subject in processing texts. Regex are a powerful way to work text and match patterns. With regular &lt;br&gt;
expressions I can search for what patient the person chatting wants to know about and what question or chart he wants to see.&lt;/p&gt;

</description>
      <category>intersystems</category>
      <category>iris</category>
      <category>nlp</category>
      <category>fhir</category>
    </item>
    <item>
      <title>Creating a Chatbot with IRIS and Python </title>
      <dc:creator>Renato Banzai</dc:creator>
      <pubDate>Sun, 20 Sep 2020 02:04:58 +0000</pubDate>
      <link>https://dev.to/intersystems/creating-a-chatbot-with-iris-and-python-3fkd</link>
      <guid>https://dev.to/intersystems/creating-a-chatbot-with-iris-and-python-3fkd</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2MmQ863b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/chatbot.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2MmQ863b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/chatbot.gif" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a Chatbot with IRIS and Python
&lt;/h1&gt;

&lt;p&gt;In this article I'm going to show how to integrate the InterSystems IRIS Database with Python to serve a Machine &lt;br&gt;
Learning Model of Natural Language Processing (NLP). &lt;/p&gt;
&lt;h3&gt;
  
  
  Why Python?
&lt;/h3&gt;

&lt;p&gt;With a large adoption and use in the world, Python have a great community and a lot of accelerators | libraries to deploy any kind of application.&lt;br&gt;
If you are curious (&lt;a href="https://www.python.org/about/apps/"&gt;https://www.python.org/about/apps/&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  Iris Globals
&lt;/h3&gt;

&lt;p&gt;As I start to learn about ^globals they became familiar to use as a fast way to ingest data in a out-of-box data model. &lt;br&gt;
So at first I'm going to use ^globals to store training data and the conversations to log the chatbot behaviour.&lt;/p&gt;
&lt;h3&gt;
  
  
  Natural Language Processing
&lt;/h3&gt;

&lt;p&gt;Natural Language Processing or NLP is a subject of AI that create the ability to read, understand  meaning from our &lt;br&gt;
languages to machines. As you can imagine it's not quite simple but I'm going to show how perform your first steps in this&lt;br&gt;
wide and beautiful field. &lt;/p&gt;
&lt;h3&gt;
  
  
  Demo - Try it yourself
&lt;/h3&gt;

&lt;p&gt;I have deployed the Chatbot application as a demo here:&lt;br&gt;
&lt;a href="http://iris-python-suite.eastus.cloudapp.azure.com:8080"&gt;http://iris-python-suite.eastus.cloudapp.azure.com:8080&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How does it work?
&lt;/h3&gt;
&lt;h3&gt;
  
  
  Machine Learning
&lt;/h3&gt;

&lt;p&gt;First is good to know that Machine Learning has a different paradigm compared to common software development. &lt;br&gt;
The main point that is hard to understand is the cycle of development of machine learning models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shallow explanation alert&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A standard application development cycle are like:&lt;/p&gt;

&lt;p&gt;Develop Code-&amp;gt;Test (with development data)-&amp;gt;Deploy(use real data)&lt;/p&gt;

&lt;p&gt;And Machine Learning the Code by itself don't has the same value. It shares the responsability with data! And no any data,&lt;br&gt;
 real data! Because the final code to be executed is generated by a merge between development concepts and the data used. &lt;br&gt;
 So a machine learning application cycle should be like:&lt;/p&gt;

&lt;p&gt;Develop(Train) Model+Real Data-&amp;gt;Validate-&amp;gt;Deploy the result of this (a Model)&lt;/p&gt;
&lt;h3&gt;
  
  
  How to train a Model?
&lt;/h3&gt;

&lt;p&gt;There are a lot of techniques to train models and each case and objective needs a big learning curve. In this case I use &lt;br&gt;
the &lt;a href="https://github.com/gunthercox/ChatterBot"&gt;ChatterBot&lt;/a&gt; library that encapsulate some techniques and provide train &lt;br&gt;
methods and pre-processed training data to helps us to focus on results.  &lt;/p&gt;
&lt;h3&gt;
  
  
  Pre-trained Model Languages and Custom Model
&lt;/h3&gt;

&lt;p&gt;You can start with this to have a basic conversational chatbot. You also can create all the data to train your chatbot,&lt;br&gt;
that can be perfect to your needs but terrible to make in short time. I this project I use en_core_web_sm as the base of &lt;br&gt;
conversation and  merge with custom training data that you can create by a &lt;a href="http://iris-python-suite.eastus.cloudapp.azure.com/chatbot-training-data"&gt;form&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Basic Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fL9-Mwej--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/chatbot_diagram.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fL9-Mwej--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/chatbot_diagram.png" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What did I use in Python
&lt;/h3&gt;

&lt;p&gt;In this application environment I use Python 3.7 with these modules:   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PyYAML&amp;lt;=5.0.0&lt;/li&gt;
&lt;li&gt;dash==1.12.0&lt;/li&gt;
&lt;li&gt;dash-bootstrap-components==0.10.1&lt;/li&gt;
&lt;li&gt;dash-core-components==1.10.0&lt;/li&gt;
&lt;li&gt;dash-html-components==1.0.3&lt;/li&gt;
&lt;li&gt;dash-renderer==1.4.1&lt;/li&gt;
&lt;li&gt;dash-table==4.7.0&lt;/li&gt;
&lt;li&gt;plotly==4.7.1&lt;/li&gt;
&lt;li&gt;numpy==1.18.4&lt;/li&gt;
&lt;li&gt;networkx==2.4&lt;/li&gt;
&lt;li&gt;Flask&amp;gt;=1.0.0&lt;/li&gt;
&lt;li&gt;chatterbot&amp;gt;=1.0.0&lt;/li&gt;
&lt;li&gt;chatterbot-corpus&amp;gt;=1.2.0&lt;/li&gt;
&lt;li&gt;SQLAlchemy&amp;gt;=1.2&lt;/li&gt;
&lt;li&gt;./nativeAPI_wheel/irisnative-1.0.0-cp34-abi3-linux_x86_64.whl&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;

&lt;p&gt;This project has a simple structure to be easy to understand. On the main folder we have 3 most important subfolders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;./app: with all the &lt;strong&gt;application code&lt;/strong&gt; and installing configuration. &lt;/li&gt;
&lt;li&gt;./iris: with the &lt;strong&gt;InterSystems IRIS dockerfile&lt;/strong&gt; preparing to serve the application.&lt;/li&gt;
&lt;li&gt;./data: To link the host to the container environment by a &lt;strong&gt;volume&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Application Structure
&lt;/h3&gt;

&lt;p&gt;Now inside the ./app directory we can see some files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;chatbot.py : with the implementation of the web application&lt;/li&gt;
&lt;li&gt;iris_python_suite.py : a class with some accelerators to use with IRIS Database and Python by the IRIS Native API.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Database Structure
&lt;/h3&gt;

&lt;p&gt;This application uses Intersystems IRIS as a repository, the globals used are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;^chatbot.training.data: stores all custom training data in the format of question and answers.&lt;/li&gt;
&lt;li&gt;^chatbot.conversation : stores all conversation payload.&lt;/li&gt;
&lt;li&gt;^chatbot.training.isupdated : controls the training pipeline.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Merchandise of my other solution
&lt;/h3&gt;

&lt;p&gt;I didnt create a report to all conversations but it isnt a problem, with my global graph viewer I can follow the &lt;br&gt;
conversations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FixJNeRX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/conversations.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FixJNeRX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/conversations.png" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Running the application by yourself
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;docker and docker-compose (and more memory settings in docker at least 4GB)&lt;/li&gt;
&lt;li&gt;acess to a terminal in your environment&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Steps
&lt;/h3&gt;

&lt;p&gt;With docker-compose you can easily up one environment with all the pieces and configurations go to the iris-python-covid19 &lt;br&gt;
folder and type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker compose build
$ docker compose up
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Estimated time to up containers
&lt;/h3&gt;

&lt;p&gt;1st time running will depend of your internet link to download the images and dependencies. &lt;br&gt;
If it last more than 15 minutes probably something goes wrong feel free to communicate here.&lt;br&gt;
After the 1st time running the next ones will perform better and take less then 2 minutes.&lt;/p&gt;
&lt;h3&gt;
  
  
  If is everything ok
&lt;/h3&gt;

&lt;p&gt;After a while you can open your browser and go to the address:&lt;/p&gt;

&lt;p&gt;The training data form&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8050/chatbot-training-data
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The chatbot&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8080
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  You should look at IRIS Admin Portal
&lt;/h3&gt;

&lt;p&gt;I'm using for now the USER namespace&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:9092
user: _SYSTEM
pass: theansweris42
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>database</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Using Python to Represent Globals in a Network Chart</title>
      <dc:creator>Renato Banzai</dc:creator>
      <pubDate>Tue, 25 Aug 2020 01:55:49 +0000</pubDate>
      <link>https://dev.to/intersystems/using-python-to-represent-globals-in-a-network-chart-1bek</link>
      <guid>https://dev.to/intersystems/using-python-to-represent-globals-in-a-network-chart-1bek</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xYkLuv_g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/global_chart.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xYkLuv_g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/renatobanzai/iris-python-covid19/master/img/global_chart.gif" alt="picture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Globals as a Graph Data Structure in Python
&lt;/h1&gt;

&lt;p&gt;How to use the IRIS Native API + Python to see globals as a Graph Network Chart.&lt;/p&gt;

&lt;h3&gt;
  
  
  Iris Globals
&lt;/h3&gt;

&lt;p&gt;Reading the documentation these topics are related to globals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A global consists of a set of nodes (in some cases, only one node), identified by subscripts.&lt;/li&gt;
&lt;li&gt;Each node can contain a value.&lt;/li&gt;
&lt;li&gt;ObjectScript includes functions to iterate through the nodes of a global and quickly access values.&lt;/li&gt;
&lt;li&gt;A global is automatically stored in the database. When you assign a value to a node of a global variable, the data is written immediately to the database.
&lt;strong&gt;- You can see the contents of a global via an ObjectScript command or via the Management Portal.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A Python Way to See Globals
&lt;/h3&gt;

&lt;p&gt;As one of representations of globals can be a Graph Data Structure there are some modules in Python that can transform &lt;br&gt;
these globals in a visualizable graph. &lt;/p&gt;
&lt;h3&gt;
  
  
  The Chart Application
&lt;/h3&gt;
&lt;h3&gt;
  
  
  Demo - Try it yourself
&lt;/h3&gt;

&lt;p&gt;I have deployed the application as a demo here, my IRIS Database has one global to test ^computer:&lt;br&gt;
(&lt;a href="http://iris-python-suite.eastus.cloudapp.azure.com/global-chart"&gt;http://iris-python-suite.eastus.cloudapp.azure.com/global-chart&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;
  
  
  Into the code
&lt;/h3&gt;

&lt;p&gt;Clone my repository to see all the code implementation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/renatobanzai/iris-python-covid19.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  What did I use in Python
&lt;/h3&gt;

&lt;p&gt;In this application environment I use Python 3.7 with these modules.   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PyYAML==5.3.1&lt;/li&gt;
&lt;li&gt;dash==1.12.0&lt;/li&gt;
&lt;li&gt;plotly==4.7.1&lt;/li&gt;
&lt;li&gt;networkx==2.4&lt;/li&gt;
&lt;li&gt;numpy==1.18.4&lt;/li&gt;
&lt;li&gt;dash-bootstrap-components==0.10.1&lt;/li&gt;
&lt;li&gt;irisnative-1.0.0-cp34-abi3-linux_x86_64.whl&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;

&lt;p&gt;This project has a simple structure to be easy to understand. On the main folder we have 3 most important subfolders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;./app: with all the &lt;strong&gt;application code&lt;/strong&gt; and installing configuration. &lt;/li&gt;
&lt;li&gt;./iris: with the &lt;strong&gt;InterSystems IRIS dockerfile&lt;/strong&gt; preparing to serve the application.&lt;/li&gt;
&lt;li&gt;./data: with the files from Johns Hopkins University to ingest and a YAML to change configuration outside the container environment by a &lt;strong&gt;volume&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Application Structure
&lt;/h3&gt;

&lt;p&gt;Now inside the ./app directory we can see some files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;__main__&lt;/code&gt;.py : with the implementation of the web application&lt;/li&gt;
&lt;li&gt;iris_python_suite.py : a class performing all data transformation to convert the globals into a networkx graph.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Database Structure
&lt;/h3&gt;

&lt;p&gt;This application uses Intersystems IRIS as a repository, the globals used are:&lt;/p&gt;

&lt;p&gt;-^computer : A global to test the graph. If you want, you can test with all other globals default in the USER Namespace.&lt;/p&gt;

&lt;h3&gt;
  
  
  There are some other globals created by the application that can be used as a test too:
&lt;/h3&gt;

&lt;p&gt;-^config : with some config data&lt;br&gt;
-^raw.covid19 : where the raw data (Source of Data) are ingested&lt;br&gt;
-^countrydetails : to get the population of each country&lt;br&gt;
-^end.date.deaths : to serve the chart requisitions and here is the goal, Its fast!&lt;br&gt;
-^end.timeless.deaths : to server another kind of chart requisition&lt;/p&gt;
&lt;h2&gt;
  
  
  App Structure
&lt;/h2&gt;
&lt;h2&gt;
  
  
  iris_python_suite.py: Inside this file are 2 classes that makes the job:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;irisdomestic: Has the same features of irisnative + creates instances of irisglobalchart, irisglobal, etc (factory pattern) &lt;/li&gt;
&lt;li&gt;irisglobalchart: Make a recursive track into the global, converting all the data in a Graph Networkx.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Why do I need to convert the Graph into a Networkx Object?
&lt;/h2&gt;

&lt;p&gt;If are you asking yourself, the module networkx has a function position nodes using Fruchterman-Reingold &lt;br&gt;
force-directed algorithm. &lt;/p&gt;
&lt;h2&gt;
  
  
  Algorithm Fruch... WHAT?
&lt;/h2&gt;

&lt;p&gt;As a graph can have any shape is too hard to represent it in a generic way. This is on algorithm to represent graphs &lt;br&gt;
without &lt;strong&gt;a lot&lt;/strong&gt; of confusion.  &lt;/p&gt;

&lt;p&gt;The line that perform the use of this algorithm is on python_suite_global.py:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    def get_fig(self):
    _nx = self.obj_nx
    pos = nx.spring_layout(_nx)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Running the application by yourself
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;docker and docker-compose&lt;/li&gt;
&lt;li&gt;acess to a terminal in your environment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Steps
&lt;/h3&gt;

&lt;p&gt;With docker-compose you can easily up one environment with all the pieces and configurations go to the iris-python-covid19 &lt;br&gt;
folder and type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker compose build
$ docker compose up
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Estimated time to up containers
&lt;/h3&gt;

&lt;p&gt;1st time running will depend of your internet link to download the images and dependencies. &lt;br&gt;
If it last more than 15 minutes probably something goes wrong feel free to communicate here.&lt;br&gt;
After the 1st time running the next ones will perform better and take less then 2 minutes.&lt;/p&gt;
&lt;h3&gt;
  
  
  If is everything ok
&lt;/h3&gt;

&lt;p&gt;After a while you can open your browser and go to the address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8050/global-chart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  You should look at IRIS Admin Portal
&lt;/h3&gt;

&lt;p&gt;I'm using for now the USER namespace&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:9092
user: _SYSTEM
pass: theansweris42
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  If this article help you or you like the content  please vote:
&lt;/h3&gt;

&lt;p&gt;This application is at the current contest on open exchange, you can vote in my application &lt;strong&gt;iris-python-suite&lt;/strong&gt; here(&lt;a href="https://openexchange.intersystems.com/contest/current"&gt;https://openexchange.intersystems.com/contest/current&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>python</category>
      <category>database</category>
    </item>
  </channel>
</rss>
