Welcome to our Exchange Marathon Dashboard! This dashboard allows you to visualize data extracted from EXPA using the EXPA API in real-time. Here's how you can set it up and get started:
This repo contans the The AP Hackathon.
We utilize Google Sheets as a datasource and Streamlit, a Python package, for data visualization.
- EXPA Access token
- Basic Knowledge in Google Sheets & AppScript
- Basic Python knowledge. You can easily learn Streamlit.
-
Create a Google Sheet.
-
Access Extensions -> Appscript.
-
Create a new file or use an existing one.
-
Paste the code from
App-Script -> data-extraction.gs
.4.1 In the code you may change the below sections.
// API data const baseUrl = 'https://analytics.api.aiesec.org/v2/applications/analyze'; const accessToken = 'your token';
4.2. Instead of the above ideas you may add your LC ids and the name
// Entity Lists const entitiesList = [ { id: 1630, name: 'Asia Pacific' }, { id: 572, name: 'Afghanistan' }, { id: 1591, name: 'Australia' }, ];
4.3. Change the date duration and Make sure that you have a sheet named 'Final'
// CONFIGS const startDate = "2024-04-03"; const endDate = "2024-04-07"; const sheetName = "Final";
-
Set up a trigger to extract data in real-time.
5.1 howevr the left bar and choose the alarm/clock icon (trigger) which is in the 4th from top to down 5.2 Click the blue colour +Add Trigger Icon 5.3 You will get a prompt 5.4 Choose ''startProcess'' in ''Choose which function to run'' 5.5 Choose ''which deployment should run'' as ''Head'' 5.6 ''Choose Select event source'' as ''Time-driven'' 5.7 based on your preference choose ''Select type of time based trigger'' and ''Select hour interval''
Now the dataset is ready you can see the data realtime in the Final tab.
Additional, you may use a pivot to analys them or the usual google sheet formaulas and tricks to make a sheet dashboard.
- From the Google Sheet -> click File -> Share -> Publish to web
- Choose the specific tab (Final in my case) and choose the csv option.
- Then you will get a link. Copy the link and keep it with you safely
It's better if you are using Anaconda or conda, but you can create a virtual environment click here for more details about the installation.
- Fork our repo (link of the repo). (link to a doc - how to fork a repo)
- Clone the repo in your PC
- You may add your link that you copied when you pucblush the csv to the web in leaderboard.py
sheet_url = 'your link here'
Then you can commit & push the codes
Then you may deploy your streamlit app easily within a few steps. [Clikc here for the tutorials](link : https://docs.streamlit.io/deploy/streamlit-community-cloud/deploy-your-app)