A package to fetch Bureau of Labor Statistics data using Streamlit
Project description
Streamlit Connection API
The Streamlit Connection API is a custom-built Python package that allows you to easily interact with the U.S. Bureau of Labor Statistics (BLS) API and retrieve data as pandas dataframes.
Installation
To install the Streamlit Connection API, simply run the following command:
pip install streamlit-bls-connection
Example Streamlit API:
import streamlit as st
from streamlit_bls_connection import BLSConnection
# Step 1: Setup connection to US Bureau of Labor Statistics
connection = BLSConnection("bls_connection")
# Step 2: Define Input parameters for the API call
# Tip: one or multiple Series ID's* can be retrieved
seriesids_list = ['APU000074714', 'APU000072610']
start_year_str = '2014' # start of date range
end_year_str = '2023' # end of date range
# Step 3: Fetch data using the custom connection
dataframes_dict = connection.query(seriesids_list, start_year_str, end_year_str)
# Step 4: Create dataframes
gas_df = dataframes_dict['APU000074714']
electricity_df = dataframes_dict['APU000072610']
# Step 5: Show Dataframes in Streamlit
st.dataframe(gas_df, electricity_df)
Requirements
- Python 3.8 and above
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For questions, suggestions, or contributions, please visit my GitHub Profile.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamlit_bls_connection-0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | deca8886c922228c0a9f073ceb8f330cb5506df5801f2e95ecb96be576f26d2b |
|
MD5 | 311af0ec76606c14a9a957f03723b5e2 |
|
BLAKE2b-256 | b28a46173dd8640ccb507d6869020800d7865577e4f5b21c15b028b4a7f7d78c |
Close
Hashes for streamlit_bls_connection-0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb22fbfd0ae688bc7286552750bc85eced146cc264e306fea9781c56ba81328b |
|
MD5 | 3888f31da8682565a13246dd20debb3b |
|
BLAKE2b-256 | 23d1a1fe2cd07e6c3576b2821788fbbb74839d74d02da83825b2e4da0566b18f |