I need to create a private app, but I can’t load the data from my private GitHub repository in the app. How can I set this up?
I notice that the private data has a token at the end of the link but I can’t link it to display it in the app.
Hello Caroline,
I am trying to create a private map in which I need to load different types of information such as csv, geojson or kml.
I share what I was able to solve, in this case read a csv file (preconfiguration of my personal token),
but when reading geojson or kml I have errors with the way to configure the request.
import streamlit as st
import leafmap.foliumap as leafmap
import geopandas
import pandas as pd
headers = {
“Authorization”: “Token xxxxyourPersonalTokenxxxxxx”
}
df =pd.read_csv(“https://raw.githubusercontent.com/userName/Project/master/test.csv”,delimiter=‘,’, storage_options=headers)
st.write(df)
How can I do in the case of reading geojson or kml?
If the above example worked with pd.read_csv
, then you would have to use urllib
or better requests
package for the other cases.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.