Skip to content

blawok/crypto-quick-view

Repository files navigation

b8debf44-f85b-4642-9432-3efd80b7c367

forthebadge forthebadge

cryptoQuickView

Python (Flask) university project of creating cryptocurrency dashboard web app.
The whole logic of this app is that you select (or use default values of) a cryptocurrency and period of time, and it will show you a dashboard and some tables of that cryptocurrency.

Installation

Clone repository (https://github.com/blawok/cryptoQuickView.git) to your desired directory (mine is GIT/) and then

For Python 3.6 or newer:

cd GIT/cryptoQuickView
pip install -r requirements

Usage

Requires internet connection to display Plotly charts and download new data.

flask run

open http://127.0.0.1:5000/ (not in IE - some frontend functionality won't work)

You should see this now in your browser:

formsc

Now choose desired cryptocurrency from the list and type desired dates in YYYY-MM-DD format and click "Go".
Remember to check if date exists and that you can only choose dates since the begining of 2017 till one day before today.
There are some default values if you don't know what to choose :)
App will check if that data exists in database and download and insert new data otherwise.

Summary page

Next page should look something like this:
(scroll down for additional graphs or click the "View details" button to go to Tables page)

summary

On the panels in the head of the page you can see choosen cryptocurrency, maximum and minimum of currency rate from chosen period. First graph is a Plotly (so you can play with it) graph showing open and close rates for given period. Second graph shows volume values and the third one market capitalization of a currency.

Tables page

After clicking on the "View details" button or choosing "Tables" from the list on the left side, you should be redirected to Tables page where you can browse data from the Database:

tables

First table shows grouped data for all currencies and all time from the Database. Second one (on the right) is a table of grouped by month and year data for chosen currency (all time). The last one is a huge table of all values from the Database for chosen currency and period.

Update page

If you click on the Update object on the left you should see:

updateform

If your imagination goes beyond normal human being one then you can update any row you want in the cryptoStats table :)

Database overview

Sqlite3 database is being used in this project and structure of this database is quite straightforward.

erdiagram

The main table that the whole app depends on is cryptoStats. Data in that table is inserted by using scraper https://github.com/guptarohit/cryptoCMD which uses https://coinmarketcap.com/ API. This table's content covers all basic daily information about cryptocurrencies. Index is its primary key, but its foreign keys are Date and Currency which correspond to two following tables. The database update process requires existence of two additional tables: cryptoStatsUser which is basically a copy of cryptoStats but has only data that was searched by user but was not in the Database, second table cryptoStatsTemp is a temporary table that is only created if user's query required data that was not in the Database (its whole content is inserted into cryptoStats, I showed it here only for the overview of the structure). The last table in the Database is cryptoDict that is kind of a dictionary which keys are cryptocurrencies names and items are their's shortcuts (which by many people are considered real names).

Functions overview

Each function that is used in the app (except of the ones in routes.py) has its own docstring, like the one below:

docstring

TODO

  • Add update functionality
  • Reconstruct appending to database functionality (get rid of unnecessary tables)
  • Chart choose by user
  • Forms in each template
  • Add other cryptocurrencies
  • Add time series analysis
  • Add description of app's logic (whole process more technically)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

2019 - [Flask] Cryptocurrency dashboard web app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages