flowers4algernon/hf-project-peacock
1
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ Shiny Demographic & Persona Dashboard
This repository contains a Shiny web application for visualizing demographic data, personas, and related analytics. The app provides an interactive interface for exploring key indicators, visual summaries, and downloadable reports through a clean and responsive UI.
๐ Features
- Interactive Landing Page: Navigate between demographics, persona insights, and additional visual modules.
- Dynamic Visualizations: Interactive plots, tables, and UI elements built using Shiny reactive programming.
- Custom Styling: A clean, professional look powered by
styles.css, including hover effects, responsive layouts, and consistent theming.
- Downloadable Data: Export tables and plots using download buttons styled with
.downclass.
- Modular Structure: Each component (Demographics, Persona, etc.) is modularized for maintainability.
๐งฉ Repository Structure
.
โโโ global.R # Loads libraries, global variables, and data sources
โโโ ui.R # Defines the main UI layout and navigation
โโโ server.R # Contains server logic and reactivity
โโโ demographicsPageNew.R # Module for demographics data and visualizations
โโโ personaPage.R # Module for persona-level insights
โโโ styles.css # Custom CSS for styling the UI
โโโ README.md # Documentation (this file)โ๏ธ Installation & Setup
Prerequisites
- R โฅ 4.1
- Shiny โฅ 1.7
- Recommended packages:
install.packages(c(
"shiny", "tidyverse", "plotly", "DT", "shinythemes",
"shinydashboard", "readr", "dplyr", "ggplot2"
))Running the App
Clone the repository and run:
# In R console
library(shiny)
runApp("path/to/this/repo")Or directly from within RStudio:
shiny::runApp()๐จ UI & Styling
The styles.css file defines consistent design rules across the app:
.landing-page-box,.landing-page-icon: hover-enabled cards with icons.depr-text-box: styled informational boxes.down: custom buttons for downloads.navbar,.well,.definitionbox: styled navigation and layout elements
๐ง Modules Overview
๐ Data Inputs
You can connect the app to your data by updating the data loading section in global.R. Ensure CSVs or APIs used are accessible in your environment.
๐งช Development Notes
- CSS errors are suppressed in Shiny using:
.shiny-output-error { visibility: hidden; }
.shiny-output-error:before { visibility: hidden; }- Follows modular design principles โ easy to extend with new pages.
- Supports deployment on shinyapps.io or internal Shiny Server.
๐ Acknowledgments
- Built with โค๏ธ using R Shiny.
- Inspired by public health and demographic visualization dashboards.
