MaineDSA / membership_dashboard

Show member data from nationally-provided CSV files
GNU General Public License v3.0
2 stars 2 forks source link
dashboard dashboard-application membership-management

Python Check Pytest CodeQL

Membership Dashboard

Herein lies a Python module that builds a dashboard to analyze DSA membership lists. It uses web frameworks to create browser-based data visualizations.

Getting Started

To run this code, you'll need to have Python 3.9, 3.10, 3.11, or 3.12 installed on your machine. You'll also need to install the required packages by running the following commands from inside the project folder:

pip install -U pip uv
uv venv
source .venv/bin/activate
uv pip install .

Usage

  1. Clone the repository and open the folder.

  2. Put the name of the membership lists you get from National DSA into a .env configuration file in the project folder after the prefix LIST=. Here in Maine, we use LIST=maine_membership_list.

  3. Put a MapBox API token into the same file (on another line) after the prefix MAPBOX=. [OPTIONAL]

  4. Put a CSV called branch_zips.csv containing zip codes matched with branch names in the project folder. [OPTIONAL]

  5. Create a folder with the same title as the membership lists you receive from National DSA.

  6. Add membership lists to the folder (see notes below).

  7. Open a terminal and run the following command to start the dashboard:

    python3 -m src.app
  8. Open your browser and go to http://localhost:8050 to view the dashboard.

Features

The dashboard provides the following features:

Notes

Feel free to explore the code and modify it according to your needs!

Screenshots (based on random testing data for demonstration/development purposes)

timeline member list metrics graphs retention graphs 1 retention graphs 2 map light mode