Second Milestone project for code institute full stack developer course interactive frontend development. It is a single page responsive application visualizing data of decentralised applications statistics.
- Build a data dashboard that visualizes a dataset of your choice
- Your data can be stored locally (e.g., in a js file) or sourced from an API
- Visualise your data using D3.js and dc.js
This App was developed for users looking for statistics on decentralised applications(DApps) that run on blockchain platforms. The platforms I picked were Ethereum(ETH), EOSIO(EOS) and Tron(TRX), I selected the top 15 DApps on each platform and built a dataset of the platforms, names, category, amount of users over 24hr period and the amount daily and weekly transactions(txs) of each DApp.
For this app i picked a darker theme from bootswatch called sandstone which included fonts, colors and theming. DC css file was also used for styling charts, I used some custom css in styles.css to override some of the styles in the bootswatch theme and edited dc.min.css to change values of the chart styles. I used a dark color for the body background and a lighter shade for the cards that hold the charts.
- As a new or experienced user to blockchain and DApps i want to find information on:
- Amount of users per platform
- DApps categories statistics
- Amount of weekly transactions per platform
- Amount of daily users per DApp
- Amount of daily users and the daily transactions per DApp
- Amount of daily/weekly transactions per DApp
- Dashboard introduction paragraph
- Links in paragraph to read more about the blockchain platforms
- Selectors for filtering the dataset
- 3 Charts in a row
- Platform Users Breakdown pieChart
- Categories Stats barChart
- Weekly Transactions pieChart
- Daily DApps Users rowChart
- Daily User Transactions scatterplotChart
- DApps Daily and Weekly Transactions stackedbarChart
For this project Git Kraken/GloBoards was used as a task/issue tracker board which is synced to the project repo on github. Sections included - issues, to Do, in Progress, to be reviewed, completed, bugs.
-
When starting the project:
- Create cards
- Add descriptions
- Add assignee
- Add labels
- Add tasks
- Add files and comments where needed
-
During the Project:
- Move card from ToDo to in Progress
- Check card for required tasks
- Complete task and tick off list
- Once all tasks completed move card to be reviewed section
- once reviewed move to complete and close issue
- The home section features a transparent navbar with heading title to the left and section nav links to right.
- It also features an intoduction paragraph with links to different blockchain platforms.
- Selectors are located below the paragraph and allow you to filter the different data points.
- Once a selection is made it filters the charts as per selection.
- You can reset the filters by clicking the reset all button.
- This sections has a row of 3 charts
- piechart with platfrom legend to filter the different platforms data.
- barchart showing the different categories data.
- piechart with legend to filter the platform data.
- This section has a rowchart showing the different dapps and allows you to filter the different data points.
- This section features a scatterplot chart showing the amount of user tranactions per dapp and is filtered when selecting a a filter from the selectors in the home section.
- This section features a stacked barchart showing the daily and weekly transactions by dapp name and is filter by the selectors in the home section or by clicking the bar sections on the chart.
- The footer section features a reset all button for the filters and nav items to navigate the sections.
-
When viewing on mobile the charts are positioned on top of each other to help the responsive behavior of the site.
-
It also features a hamburger dropdown menu in the navbar, once clicked a dropdown menu appears containing the nav list items.
-
All views feature a back to top button for ease of navigation.
-
The button fades in and out as you scroll the page once clicked it returns you to home section using jquery script for smooth scrolling effect.
- Add a loader to the dashboard to display while page loads.
- Add more unit tests to get better code coverage.
For this project the following Technologies were used:
-
- The project uses HTML5 to structure the content in line with modern semantic html5.
-
- The project uses CSS3 to style the html content.
-
- The project uses FontAwesome to add icons for chart symbols.
-
- The project uses Javascript to add interactive content to dashboard.
-
- The project uses Bootstrap to layout the html content and make it responsive.
-
- The project uses Bootswatch Theme to add fonts and color the theme chosen was sandstone.
-
- The project uses D3.js for manipulating documents and rendering charts.
-
- The project uses Crossfilter for manipulating and filtering the data.
-
- The project uses Dc.js as a charting library with native crossfilter support and usesd3 to render charts.
-
- The project uses Queue as a little helper for asynchronous JavaScript.
-
- The project uses Jasmine.js for unit testing.
-
- The project used Vs Code as the IDE of choice.
-
- The project used Mockflow for creating the mock-ups.
-
- The project used Git Github for source control management.
-
- The project used Git Kraken/Glo Boards for project and task management.
-
- The project uses JQuery to control scrolling and toggle features.
Jasmine.js was the framework used for the unit tests, I started by testing the piechart function, when adding tests for width, height i realised i would have to declare some variables and build parts of the charts in graphSpec.js to be able to test the various parts of the charts. I added 37 spec tests checking some of the charts which all pass. The results can be viewed in specRunner.html
Testing for this project was done with several browsers and devices.
- Firefox
- Chrome
- Safari
- Opera
- Firefox
- Chrome
- Opera
- Edge
- Hp Laptop
- Lenovo Laptop
- Huawei Nexus 6P android phone
- Samsung Galaxy Tab 4
- Samsung Galaxy J3
- Iphone 6s
- Iphone 7
- Ipad AIR
Firefox developer edition and chrome dev-tools were used during development and for manual testing of the site responsiveness and checking if the charts rendered and filters worked correctly. The devices and browsers listed above were used to test the app on different screen sizes and devices.
-
Platform Selector
- Go to Home section
- Click platform select
- Click a platform name
- check charts to see filter applied
-
DApp Selector
- Go to Home section
- Click DApp select
- Click a DApp name
- Check charts to see filter applied
-
Category Selector
- Go to Home section
- Click Category select
- Click a Category name
- Check charts to see filter applied
-
Reset Filters
- Go to Home/Footer Section
- Apply any filter
- Click Reset All
- See chart filters reset
-
Platform Users Breakdown Piechart
- Go to User/Category section
- Click Legend item or piechart slice
- Check charts to see filter applied
-
Categories Stats Barchart
- Go to User/Category section
- Click category bar
- Check charts to see filter applied
-
Weekly Transactions Piechart
- Go to User/Category section
- Click Legend item or piechart slice
- Check charts to see filter applied
-
Daily DApps Users Rowchart
- Go to DApps Users section
- Click DApp row item
- Check charts to see filter applied
-
Daily User Transactions Scatterplotchart
- Go to User Transactions section
- Hover over dots to see title details
- Apply filter from selectors to see individual data
-
DApps Daily and Weekly Transactions Stacked Barchart
- Go to DApp Transactions section
- Hover over bar section to see title details
- Apply filter from selectors to see individual data.
- Click bar items to filter data
-
Top Navigation Tests
- Go to home page
- Click nav item
- See page scroll to section
-
Footer Navigation Tests
- Go to footer section
- Click Nav item
- See page scroll to section
-
Back To Top Button Tests
- Scroll down page
- See back to top button fade in
- Click button
- See page scroll to top
-
Mobile Navigation Tests
- Open app on mobile device
- Click hamburger menu
- See dropdown menu
- Click Nav item
- See page scroll to section
-
For HTML validation testing I used W3 Validator which shows the html document to be valid.
-
For CSS validation testing I used W3 CSS Validator which shows the stylesheet to be valid CSS3.
- This App was deployed to Github pages
- To run this app locally clone or download the repo and open index.html to view in browser.
- The data used in this app was sourced from:
- DApp Radar
- State of the DApps
- Stackoverflow was used to research about jasmine testing and dc.js
- Library Docs were used during development for jasmine.js, d3.js, dc.js
- Thanks to slack member @Eventyret_mentor for his glo-boards suggestions
- Thanks to slack member @abonello_lead for his jasmine testing suggestions
- Thanks to my mentor @rick_mentor for all his help and suggestions