I am trying to access a feature layer on Esriβs living Atlas. I get an error when trying to create sdf from feature layer.
ERROR:
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/exec_code.py:88 in exec_func_with_error_handling
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/script_runner.py:579 in code_to_exec
/mount/src/portfolio/wildfireApp.py:42 in <module>
39
40 # Retrieve Wildfire layer and create SDF
41 item_id = "21638fcd54d14a25b6f1affdef812146"
β± 42 wildfire_sdf = read_fl(item_id)
43
44 # Filter and create Province column
45 conus_fires = wildfire_sdf[wildfire_sdf['Agency'] == 'conus']
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/
cache_utils.py:217 in __call__
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/
cache_utils.py:242 in _get_or_create_cached_value
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/caching/
cache_utils.py:299 in _handle_cache_miss
/mount/src/portfolio/wildfireApp.py:37 in read_fl
34 def read_fl(item_id):
35 β living_atlas_item = gis.content.get(item_id)
36 β feature_layer = living_atlas_item.layers[0]
β± 37 β wf_sdf = feature_layer.query(where="1=1", out_sr=4326).sdf
38 β return wf_sdf
39
40 # Retrieve Wildfire layer and create SDF
/home/adminuser/venv/lib/python3.12/site-packages/arcgis/features/feature.py
:864 in sdf
861 β β β
862 β β β return from_featureset(fset=self)
863 β β except ImportError:
β± 864 β β β raise Exception(
865 β β β β "Could not find the panda installation, please instal
866 β β β )
867 β β except Exception as e:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Exception: Could not find the panda installation, please install Pandas and
retry
import streamlit as st
import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
import leafmap.foliumap as leafmap
from arcgis.gis import GIS
gis = GIS()
# Set up
st.set_page_config(page_title='Dashboard', layout='wide')
@st.cache_data
def read_fl(item_id):
living_atlas_item = gis.content.get(item_id)
feature_layer = living_atlas_item.layers[0]
**wf_sdf = feature_layer.query(where="1=1", out_sr=4326).sdf**
return wf_sdf
# Retrieve Wildfire layer and create SDF
item_id = "21638fcd54d14a25b6f1affdef812146"
wildfire_sdf = read_fl(item_id)
Requirements.txt
streamlit
geopandas
pandas
matplotlib
leafmap
gssapi
arcgis
packages.txt
libkrb5-dev