create account

Streamlit - The Faster Way To Build And Share Data Apps by geekgirl

View this thread on: hive.blogpeakd.comecency.com
· @geekgirl · (edited)
$7.87
Streamlit - The Faster Way To Build And Share Data Apps
<center>![streamlitt.png](https://images.hive.blog/DQmfFKCKBFd1CkpivCobSPNzVPq9DjehbapAAuEtBxHFQDE/streamlitt.png)</center>

Streamlit is an open source library to that makes building data apps in python quick and easy. It is free and all in python. It is designed for those who work on machine learning or data analysis using python. This enables users to quickly build and share such apps without any front-end experience. I tried it. It works. It is great. For details on Streamlit, documentation, tutorials and demo visit [Streamlit website](https://www.streamlit.io).

Getting started with Streamlit is really easy. Go the the terminal or command prompt and pip install streamlit as following.

`pip isntall streamlit`

Once it is installed, we can run the following.

`streamlit hello`

This will open up the demo web app in the default browser. This means Streamlit is installed properly and it works. Now we are ready to build our own app, all in python. Once our python code is ready, we simply run the following in the terminal and app opens up in the default browser.

`streamlit run my_first_app.py`

It took about ten minutes to write the following simple script that takes stock or crypto symbols as input and displays prices and charts in a web app. I just did this as test to see how it works. Try it yourself, see if you like it. If you do like it read their tutorials and documentations. They are really well written and easy to get started. 

```
import streamlit as st 
import numpy as np 
import pandas as pd 
import yfinance as yf
import datetime as dt
from pandas_datareader import data as pdr

stocks = st.sidebar.text_area('Stock Symbols:', 'BTC-USD')
stocks = stocks.split()
days = st.sidebar.text_input('Days:','365')
days = int(days)
button_getStocks = st.sidebar.button('Get Stocks')
end_date = dt.datetime.today()
start_date = end_date - dt.timedelta(days=days)


def getStocks(stocks, start_date, end_date):
    yf.pdr_override()
    for stock in stocks:
        df = pdr.get_data_yahoo(stock, start_date, end_date)
        price = stock + ' -  ' + str(round(df['Close'][-1],2))
        st.write(price)
        st.line_chart(df['Close'])
       
if button_getStocks:
    getStocks(stocks, start_date, end_date)

```

This is how the output looks on the browser.

![stocks.png](https://images.hive.blog/DQmai1ZkNgHyCg4wCZZTtuJrpiVPFmLBY28xWZqAviKXMKj/stocks.png)

Nothing fancy. But it works. I am sure with some more thought and adding more code we can come up with some useful and better looking app.

What is really great about Streamlit is it makes sharing the apps easy. They offer sharing on their platform. Moreover, these apps can easily be deployed to Heroku as well. 

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@geekgirl/streamlit-the-faster-way-to-build-and-share-data-apps)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 127 others
properties (23)
authorgeekgirl
permlinkstreamlit-the-faster-way-to-build-and-share-data-apps
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["hive-167922","coding","apps","dev","crypto","neoxian","ctptalk","posh","pal","tutorial","python","leofinance"],"canonical_url":"https://leofinance.io/@geekgirl/streamlit-the-faster-way-to-build-and-share-data-apps","links":["https://www.streamlit.io","https://leofinance.io/@geekgirl/streamlit-the-faster-way-to-build-and-share-data-apps"],"image":["https://images.hive.blog/DQmfFKCKBFd1CkpivCobSPNzVPq9DjehbapAAuEtBxHFQDE/streamlitt.png","https://images.hive.blog/DQmai1ZkNgHyCg4wCZZTtuJrpiVPFmLBY28xWZqAviKXMKj/stocks.png"]}
created2021-01-17 09:11:36
last_update2021-01-17 09:16:36
depth0
children12
last_payout2021-01-24 09:11:36
cashout_time1969-12-31 23:59:59
total_payout_value4.404 HBD
curator_payout_value3.465 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,837
author_reputation1,586,488,611,824,452
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,579
net_rshares36,920,021,361,369
author_curate_reward""
vote details (191)
@amr008 ·
$0.11
The output looks really pleasant. Thanks for sharing . 
πŸ‘  
properties (23)
authoramr008
permlinkre-geekgirl-qn7ka4
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2021.01.3"}
created2021-01-20 01:03:42
last_update2021-01-20 01:03:42
depth1
children0
last_payout2021-01-27 01:03:42
cashout_time1969-12-31 23:59:59
total_payout_value0.052 HBD
curator_payout_value0.053 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length55
author_reputation61,403,929,105,681
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,459,584
net_rshares752,903,013,275
author_curate_reward""
vote details (1)
@hivebuzz ·
Congratulations @geekgirl! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://images.hive.blog/60x70/http://hivebuzz.me/@geekgirl/payout.png?202101182156"></td><td>You received more than 25000 as payout for your posts. Your next target is to reach a total payout of 26000</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@geekgirl) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>

properties (22)
authorhivebuzz
permlinkhivebuzz-notify-geekgirl-20210119t110956000z
categoryhive-167922
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2021-01-19 11:09:54
last_update2021-01-19 11:09:54
depth1
children0
last_payout2021-01-26 11:09:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length653
author_reputation369,240,710,670,438
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,446,929
net_rshares0
@jasonzhang ·
You are outstanding.

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@jasonzhang/re-geekgirl-3pbtpu)
properties (22)
authorjasonzhang
permlinkre-geekgirl-3pbtpu
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["hive-167922","leofinance"],"canonical_url":"https://leofinance.io/@jasonzhang/re-geekgirl-3pbtpu"}
created2021-01-17 13:44:27
last_update2021-01-17 13:44:27
depth1
children0
last_payout2021-01-24 13:44:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length117
author_reputation92,763,822,435
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,416,389
net_rshares0
@josediccus ·
$0.36
Considering the fact that it took 10 minutes to write the below script, I still think it came out nice on the output look from the browser. With some more coding it could be even better. Been a while @geekgirl, seems you haven't been on here that much lately?

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@josediccus/re-geekgirl-5txnvs)
πŸ‘  ,
properties (23)
authorjosediccus
permlinkre-geekgirl-5txnvs
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["hive-167922","leofinance"],"canonical_url":"https://leofinance.io/@josediccus/re-geekgirl-5txnvs"}
created2021-01-17 09:31:39
last_update2021-01-17 09:31:39
depth1
children2
last_payout2021-01-24 09:31:39
cashout_time1969-12-31 23:59:59
total_payout_value0.182 HBD
curator_payout_value0.182 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length356
author_reputation2,569,195,427,633,647
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,781
net_rshares2,282,176,907,813
author_curate_reward""
vote details (2)
@geekgirl ·
Thank you @josedicuss. Yes, I haven’t been posting much lately. I hope everything is great with you.
properties (22)
authorgeekgirl
permlinkqn2ol8
categoryhive-167922
json_metadata{"users":["josedicuss"],"app":"hiveblog/0.1"}
created2021-01-17 09:48:45
last_update2021-01-17 09:48:45
depth2
children1
last_payout2021-01-24 09:48:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length100
author_reputation1,586,488,611,824,452
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,939
net_rshares0
@josediccus ·
$0.08
It's all good with me, surviving in covid-19 times isn't really a pleasant task but then we are grateful to be alive nontheless. 

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@josediccus/re-geekgirl-5dpfza)
πŸ‘  
properties (23)
authorjosediccus
permlinkre-geekgirl-5dpfza
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["hive-167922","leofinance"],"canonical_url":"https://leofinance.io/@josediccus/re-geekgirl-5dpfza"}
created2021-01-17 09:52:30
last_update2021-01-17 09:52:30
depth3
children0
last_payout2021-01-24 09:52:30
cashout_time1969-12-31 23:59:59
total_payout_value0.040 HBD
curator_payout_value0.041 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length226
author_reputation2,569,195,427,633,647
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,965
net_rshares592,056,439,055
author_curate_reward""
vote details (1)
@mominsdt ·
$0.08
It is completely free and easy to use. Thank you for sharing content about the app.
πŸ‘  
properties (23)
authormominsdt
permlinkqn2nvc
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2021-01-17 09:33:18
last_update2021-01-17 09:33:18
depth1
children0
last_payout2021-01-24 09:33:18
cashout_time1969-12-31 23:59:59
total_payout_value0.040 HBD
curator_payout_value0.041 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length83
author_reputation5,271,058,967,388
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,790
net_rshares597,161,359,756
author_curate_reward""
vote details (1)
@poshbot ·
https://twitter.com/geekjen/status/1350733179540234240
properties (22)
authorposhbot
permlinkre-streamlit-the-faster-way-to-build-and-share-data-apps-20210117t091426z
categoryhive-167922
json_metadata"{"app": "beem/0.24.8"}"
created2021-01-17 09:14:27
last_update2021-01-17 09:14:27
depth1
children0
last_payout2021-01-24 09:14:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length54
author_reputation5,554,335,374,496
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,611
net_rshares0
@poshbot ·
https://twitter.com/geekjen/status/1354180435740303361
properties (22)
authorposhbot
permlinkre-streamlit-the-faster-way-to-build-and-share-data-apps-20210126t213236z
categoryhive-167922
json_metadata"{"app": "beem/0.24.20"}"
created2021-01-26 21:32:36
last_update2021-01-26 21:32:36
depth1
children0
last_payout2021-02-02 21:32:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length54
author_reputation5,554,335,374,496
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,572,294
net_rshares0
@topbooster ·
$0.08
You are a programmer. RIGHT??? I don't know much about programming.
πŸ‘  
properties (23)
authortopbooster
permlinkqn2o0c
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2021-01-17 09:36:18
last_update2021-01-17 09:36:18
depth1
children2
last_payout2021-01-24 09:36:18
cashout_time1969-12-31 23:59:59
total_payout_value0.042 HBD
curator_payout_value0.042 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation14,454,501,146,413
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,821
net_rshares603,176,622,196
author_curate_reward""
vote details (1)
@geekgirl ·
I don’t know much either. I just try to learn sometimes.
πŸ‘  
properties (23)
authorgeekgirl
permlinkqn2omp
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2021-01-17 09:49:39
last_update2021-01-17 09:49:39
depth2
children1
last_payout2021-01-24 09:49:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation1,586,488,611,824,452
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,413,948
net_rshares719,247,038
author_curate_reward""
vote details (1)
@topbooster ·
Good wishes for learning programming.
properties (22)
authortopbooster
permlinkqn2p4f
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2021-01-17 10:00:21
last_update2021-01-17 10:00:21
depth3
children0
last_payout2021-01-24 10:00:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length37
author_reputation14,454,501,146,413
root_title"Streamlit - The Faster Way To Build And Share Data Apps"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,414,036
net_rshares0