How to build a finance dashboard
in 1 day using Neo4j and NeoDash
Neo4j-logo_color.png
neo_dash_logo_edited.png
 25 November 2022
why a 1-day challenge?
Todays is challenge day!
So let's kick off the idea to build an awesome dashboard with some cool analytic features in 1 day.


The are following reasons for it:
  • Most of e-bankings show only aggregated view of stock orders. This makes it difficult to have a clear picture of single orders.
  • Most of e-banking solutions calculate only once using last trading price.
    This is not enough! We want near real time! (ok 5 minutes is already great)
  • There are no possibilities to define budgets or information on branch/sectors aggregation etc.
  • The are no analytic functions that supports the user to make further decisions in investments.
  • time is money ;-)
GEORGE_MARTENS_2016_WHITE_LARGE_500_edit
So let's go......
Today's goals (6 hours to go)
Todays goals are focusing on following topics :
Goal for next week: (04.11.2022)
check-mark-3-48.png
Create database instance in the cloud
sandglass-48.png
Finalizing the dashboard
check-mark-3-48.png
Load personal data from Google sheet
check-mark-3-48.png
Enrich data from API, near real time data
check-mark-3-48.png
Create draft dashboard (positions only)
07:00 - 08:00 : Lets draw the idea
What do we actually need?
  • A database in the cloud
    Solution -> Neo4j Aura (free) 
     
  • A dashboard app in the cloud
    Solution -> NeoDash
     
  • Stock data provider (real time price)
    Solution -> https://iexcloud.io/docs/api/
     
  • Our personal data stored in
    Solution -> Google sheet
    (user, ticker, buy, sell, budget, ..)
IMG_3565_edited_edited.jpg
08:00 - 09:00 : Lets get a database instance and the dashboard app
1. Registered a free Neo4j database instance in the cloud (Limited to 2'000'000 nodes)
2. Then downloaded Neo4j Desktop and connected to remote Neo4j AURA Database.
    Query Browser and Bloom are out of the box ready to go.
3. Under GraphApps -> NeoDash needed to be installed.
4. e voilà... ready to focus now on the data
new_aura_instance.jpg
web_install_neaDash.jpg
Easy & smooth! Let's get ready to rumble ....
09:00 - 10:30 - let's load the personal data from Google Sheet
We store our stock data in Google sheet in multiple tabs. The second Tag tab is for the global data i.E. budget, sectors,  notification preferences. On the 3rd Tab the main data is entered for stock orders.
For the demo user some purchases of various stock was entered. Later we add more data.
web_google_dash.jpg
So next step. Loading this data into the database. This requires a little bit of Cypher knowhow.
The data is now visible as nodes in the Neo4j Query Browser.
web_code_google.jpg
Sketch Arrow Down_edited.png
web_query_load_google.jpg
10:00 - 12:00 - lets enrich our data with the latest Stock price (API)
So now we have the stock purchases in the database. Let's call a API that provides us with the latest Stockprice. For that we use the API from iExCloud.IO. btw ....I like their slogan...."focus on building".
web_iexcloud_api.jpg
After registering a API Key was provided. (i.E. token below)
Since our stock positions can contain the same ticker multiple times we fetch the price per ticker once from the API.  With this Cypher statement the data get's enriched from the external data provider.


As you can see on the right side the Ticker "FFIE" was enriched with the API information.
The attribute api_latestPrice was updated to 0.3246. This value was successfully verified in Google.
 
web_call_api.jpg
web_api_update.jpg
web_google_ffie.jpg
12:00 -12:30 : Lets' automate and get the lates stockprice from the API
Lets calll the API each 5 minutes and update the price in the database.
This is done using a Library function -> CALL apoc.periodic.repeat
web_api_automate.jpg
12:30 - 13:00 : Lets show the data on the Dashboard (draft only)
So in the last 30 minutes we connect the dashboard to the database and display the fresh data as a grid report.
Screen_draft_1_edited.jpg
NeoDash provides flexible components.

The Cypher query fetches the data from the database and displays it as a grid. 
Screen_draft_2.png
Cool. After 5 hours the near realtime data
is available on the board.

Todays goals is accomplished.

Now lets start to be creative!