top of page
Building a finance dashboard
in 1 day using Neo4j and NeoDash
Neo4j-logo_color.png
neo_dash_logo_edited.png
 2. January 2023
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......
the goals 
Part 1 : Get DB instance and data
Part 2 : Building the dashboard
check-mark-3-48.png
Create database instance in the cloud
check-mark-3-48.png
Load personal data from Google sheet
check-mark-3-48.png
check-mark-3-48.png
check-mark-3-48.png
Enrich data from API, near real time data
check-mark-3-48.png
check-mark-3-48.png
Create draft dashboard (positions only)
Create Layout
Automate API Loading (5 min)
Adding Custom Actions, Filters and visual alerts using advanced styling
Part 2 -> building the dashboard
08:00 - 09:00 : Lets sketch the dashboard
What are the building blocks?
  • The top will hold information like the last data refresh timestamp as well as the key figures of the current selected portfolio
     
  • Below that there will be information about the total value per shares, performance and distribution among the branch.
     
  • Below there will be a realtime visualization of the performance of the holding.
     
  • The table views hold the aggregation and details of the portfolio enriched with calculation of the current stock price.
     
IMG_3813_edited_edited.jpg
09:00 - 15:00 : Building the Dashboard
After a few hours the dashboard was full functional and automated. Financial data is updated every 5 minutes.
 
Part 1 -> get the data
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!
bottom of page