How otniel113/visdat_hdi works
Project type and purpose
• This is a single‐page, monolithic data-visualization web application.
• Purpose: load an Excel dataset of HDI values, render interactive charts with Bokeh, and serve them via a web server on Heroku.
File structure
• Top level:
• Procfile – instructs Heroku how to launch the app (e.g. web: gunicorn myapp:app)
• README.md – describes the app’s goal and deployment URL
• myapp.py – Python script that (a) loads the data, (b) builds a Bokeh application, (c) serves HTTP endpoints.
• requirements.txt – Python dependencies (Bokeh, Pandas, openpyxl, Gunicorn, etc.)
• data/HDI.xlsx – source dataset, loaded by myapp.py at runtime.
Extract insights from the README
• Interactive visualization using Bokeh.
• Deployed on Heroku.
• Dataset origin and presentation/demo links.
a. Client Browser
b. Heroku Platform:
• Heroku Router (HTTPS endpoint)
• Dyno running the Web Process
c. Web Process inside Dyno:
• Gunicorn (WSGI server)
• Python Bokeh Application (myapp.py)
d. Data Store:
• Local file system in the dyno containing HDI.xlsx
e. External Services:
• Heroku Git (code pushes)
• GlobalDataLab (original dataset source – optional reference)
Relationships and interactions
• Browser → HTTPS request → Heroku Router → Dyno (Gunicorn/Bokeh)
• Bokeh app loads HDI.xlsx via Pandas/openpyxl when serving pages or on startup
• Bokeh server generates JSON/JS plots → HTTP response → Browser renders interactive charts
• Git push → Heroku Git → build environment installs requirements.txt → runs Procfile to launch Gunicorn
Architectural patterns and design principles
• Monolithic MVC‐style: Bokeh server handles “View” and “Controller” in one process; simple data model loaded from an Excel file.
• Separation of concerns:
• Presentation & interaction: Bokeh in the browser
• Business logic & data access: myapp.py + Pandas
• Deployment & process management: Gunicorn + Procfile on Heroku