Hi Pollination community,
I’m currently experimenting with building Streamlit apps. Looking at the
Get and Display Model (by @nicolas ) the following packages are used:
from pollination_streamlit_viewer import viewer
from pollination_streamlit_io import get_hbjson
But I can’t seem to find them on GitHub, are they currently closed source, or am I looking in the wrong place?
For context - I was hunting for an epw equivalent to get_hbjson
Thanks in advance,
Charlie
Managed to solve my specific issue around epw upload handling from the weather report app code here:
import pathlib
import streamlit as st
import pandas as pd
import numpy as np
from ladybug.epw import EPW
from helper import colorsets, get_fields, get_hourly_data_figure, \
get_bar_chart_figure, get_hourly_line_chart_figure, get_figure_config,\
get_hourly_diurnal_average_chart_figure, get_daily_chart_figure, get_sunpath_figure,\
get_degree_days_figure, get_windrose_figure, get_psy_chart_figure, \
get_diurnal_average_chart_figure
st.set_page_config(
page_title='Weather data visualization', layout='wide',
page_icon='https://app.pollination.cloud/favicon.ico'
)
st.sidebar.image(
'https://uploads-ssl.webflow.com/6035339e9bb6445b8e5f77d7/6397a0e7b8237e2d67af741a'
This file has been truncated. show original
epw_data = st.file_uploader('', type='epw')
if epw_data:
epw_file = pathlib.Path(f'./data/{epw_data.name}')
epw_file.parent.mkdir(parents=True, exist_ok=True)
epw_file.write_bytes(epw_data.read())
else:
epw_file = './assets/sample.epw'
global_epw = EPW(epw_file)
1 Like
mostapha
(Mostapha)
August 6, 2023, 4:00pm
3
Hi @charliebrooker ,
Yes. We kept the repositories on GitHub closed however the code itself is open and can be accessed from PIPy.
Glad that you found the answer to your question. @antonellodinunzio has also created a new epwmap component recently that can come handy in the future.
1 Like