Hi @robmarkcole. Nice app! I think it would be cool if the wide view was forced. The table would look better as a result?
Hi @TomJohn I agree that looks better! I was also hoping to make the url’s clickable, but despite experimentation, was not able to achieve that. Would you recommend making these changes in streamlit, or are there external plugins which would be suitable? Thanks!
As for wide layout it is quite simple: st.set_page_config - Streamlit Docs
Regarding clickable links: maybe this will help?
Thanks I just implemented with wide table
Re that thread I tried the suggestions without success. Bit frustrating that the thread was then closed
As this (i.e. links in a table) is a thing that I would like to able to do I will look into it in the evening have a great day!
I already found some useful articles with your app. Sure I could use their native search but more fun this way. So many possibilities to extend it…
Thanks.
The app has lots of scope for improvement, particularly making the search more fully featured (multiple queries, on category etc). Another idea is that in addition to github url, to find url for popular dataset locations like Zenodo.
@robmarkcole after some reasearch I see that it currently not possible to show links in st.dataframe, here is a link to github issue: Display clickable links in st.dataframe or st.table · Issue #983 · streamlit/streamlit · GitHub it is in open status.
As for workarounds it seems that there three options:
- Use static table
- Use plotly
- Use AgGrid
all of above discussed here: How to display a clickable link pandas dataframe - #2 by mathcatsand
Just trying ag-grid, perhaps some special args are required but out of the box the links are not clickable
Same for st.table
Yes, for AdGrid it requries some JS in cellRenderer How to display a clickable link pandas dataframe - #5 by edsaac
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid, JsCode, GridOptionsBuilder
df = pd.DataFrame(
{
"Site": "DuckDuckGo Google Bing".split(),
"URL": "https://duckduckgo.com/ https://www.google.com/ https://www.bing.com/".split(),
}
)
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_column(
"URL",
headerName="URL",
cellRenderer=JsCode(
"""
function(params) {
return '<a href=' + params.value + ' target="_blank"> 🖱️ </a>'
}
"""
),
)
gridOptions = gb.build()
AgGrid(df, gridOptions=gridOptions, allow_unsafe_jscode=True)
That approach does work, although it is not displaying the url which is a bit confusing
if you replace return line to:
return '<a href=' + params.value + ' target="_blank">'+ params.value +'</a>'
it will work
Btw. @robmarkcole you may consider custom subdomain for your app Deploy an app - Streamlit Docs
Nice suggestion! Will the old url redirect?
Unfortunately, no.
I did make a feature request about redirecting renamed apps a while back if anyone is interested in voting on that. It’s something that pops up on the forum from time to time, but doesn’t seem to have any traction as a feature request yet.
I have renamed the repo and tried to select the below name, but for some reason it is not available, despite there being no app with this name:
For some reason custom domain settings page really does not like “hub” in app name Anyone knows why?
I’ve actually noticed a bunch of names not work. For example I wanted to use “assistance-chat” for the following repo:
But it didn’t like that either…