Comments (9)
Confirmed in 0.17.2
from streamlit-folium.
Can you look in the developer console in the browser (right-click and "inspect") and highlight whatever error message it is providing?
from streamlit-folium.
We only have vega included, but not vega-lite
Without bringing up a Streamlit app, I would guess we'd just add vega-lite to the index.html file
from streamlit-folium.
Looks like Folium dynamically loads the vega-lite version 🥲
from streamlit-folium.
This could be a weird one @blackary...the code snippet here uses Altair. Altair packages 5.0+ use v5 of vega-lite.
So we could assume that and include vega-lite v5, but it would probably be more stable if we required Altair 5+. But that adds a dependency that we really don't need for our package.
from streamlit-folium.
Can you look in the developer console in the browser (right-click and "inspect") and highlight whatever error message it is providing?
<noscript>You need to enable JavaScript to run this app.</noscript>
Full element
<body data-new-gr-c-s-check-loaded="14.1143.0" data-gr-ext-installed="" data-gr-ext-disabled="forever" style=""><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div class=""><div class="withScreencast"><div tabindex="-1"><div class="stApp stAppEmbeddingId-s58kxvttxse3 st-emotion-cache-1r4qj8v erw9t6i1" data-testid="stApp" data-teststate="notRunning"><header tabindex="-1" data-testid="stHeader" class="st-emotion-cache-18ni7ap ezrtsby2"><div data-testid="stDecoration" id="stDecoration" class="st-emotion-cache-1dp5vir ezrtsby1"></div><div data-testid="stToolbar" class="st-emotion-cache-zq5wmm ezrtsby0"><div data-testid="stToolbarActions" class="st-emotion-cache-1p1m4ay e3g6aar0"></div><div class="stDeployButton"><button kind="header" data-testid="baseButton-header" class="st-emotion-cache-ztfqz8 ef3psqc5"><div class="st-emotion-cache-1wbqy5l e17vllj40"><span>Deploy</span></div></button></div><span id="MainMenu" data-testid="stMainMenu" aria-haspopup="true" aria-expanded="false" class="st-emotion-cache-czk5ss e16jpq800"><button kind="headerNoPadding" data-testid="baseButton-headerNoPadding" class="st-emotion-cache-iiif1v ef3psqc4"><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false" fill="currentColor" xmlns="http://www.w3.org/2000/svg" color="inherit" class="eyeqlp51 st-emotion-cache-fblp2m ex0cdmw0"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></button></span></div></header><div class="appview-container st-emotion-cache-1wrcr25 ea3mdgi4" data-testid="stAppViewContainer" data-layout="narrow"><section tabindex="0" class="main st-emotion-cache-uf99v8 ea3mdgi3"><div class="block-container st-emotion-cache-1y4p8pa ea3mdgi2" data-testid="block-container"><div data-testid="stVerticalBlockBorderWrapper" class="st-emotion-cache-0 e1f1d6gn0"><div class="st-emotion-cache-1wmy9hl e1f1d6gn1"><div width="704" data-testid="stVerticalBlock" class="st-emotion-cache-1n76uvr e1f1d6gn2"><div data-stale="false" width="704" class="element-container st-emotion-cache-e8g64f e1f1d6gn4" data-testid="element-container"><iframe allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; clipboard-write; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking" src="http://localhost:8502/component/streamlit_folium.st_folium/index.html?streamlitUrl=http%3A%2F%2Flocalhost%3A8502%2F" width="704" height="20" scrolling="no" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads" title="streamlit_folium.st_folium"></iframe></div></div></div></div></div><div data-testid="IframeResizerAnchor" data-iframe-height="true" class="st-emotion-cache-1wrevtn ea3mdgi0"></div></section></div></div></div></div><div id="portal" class="st-emotion-cache-1q6lfs0 erw9t6i0"></div></div><div class=""></div></div></body>
from streamlit-folium.
This could be a weird one @blackary...the code snippet here uses Altair. Altair packages 5.0+ use v5 of vega-lite.
So we could assume that and include vega-lite v5, but it would probably be more stable if we required Altair 5+. But that adds a dependency that we really don't need for our package.
You could add Altair as an optional dependency? Quite a few packages have done that. I mainly use python poetry so cannot remember how to do it with requirements.txt
but it can be done :)
You can add them to your setup.py
from streamlit-folium.
I was overthinking it. More recent versions of Streamlit already require altair 5, so by transitive dependency it's already required.
I'll make a PR to add the vega-lite js library and this should be solved.
from streamlit-folium.
SMH...missed vega-embed, will add in new PR
from streamlit-folium.
Related Issues (20)
- Example doesn't render in JupyterLab HOT 1
- Drop 3.7, add 3.10/11 to GitHub test matrix
- Add code for other pages in https://folium.streamlit.app/ HOT 1
- Error with st_folium and not with folium_static HOT 8
- Marker popup not working in Safari HOT 4
- Compatibility with st.empty. For scalability of shape HOT 4
- fig.render() is used several time in a row for st_folium HOT 3
- Longitude out of range HOT 2
- st_folium not taking style attribute into account HOT 3
- Compatibility with folium 0.15.0 HOT 20
- GroupedLayerControl breaks st_folium HOT 1
- folium.FitBounds Does not work HOT 2
- folium.LayerControl() does not work with dynamic feature group HOT 10
- Dynamically updating center and zoom of the map does not work properly HOT 6
- Plot not rendering correctly when using `m.keep_in_front()` HOT 12
- Draw example doesn't work with `folium = ^0.15.0` HOT 12
- Feature group not removed from the map
- Draw doesn't work on timeseries figure HOT 2
- Session state key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamlit-folium.