Skip to content

devobern/NRW23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NRW23 Candidate Search App

⚠️ Notice: The website previously linked here is no longer available as it is not relevant anymore. Please disregard any references to it.

Status Python Version

Table of Contents

Introduction

This repository contains a Flask application designed for users to search for candidates who participated in the 2023 Nationalrat elections (Switzerland). It primarily showcases detailed information about a candidate, emphasizing the number of votes they received.

Repository Structure

NRW23/
│
├── files/
│   └── NRW2023-kandidierende.zip  # Data containing candidate information
│
├── static/
│   ├── JS/
│   │   └── script.js             # JavaScript file for interactive features
│   │
│   └── styles.css                # CSS file for the web application styling
│
├── templates/
│   ├── detail.html               # Detail page template for a specific candidate
│   ├── index.html                # Main page template for search feature
│   ├── privacy-policy.html       # Privacy policy template
│   └── results.html              # Results page displaying candidates
│
├── .gitignore                    # Patterns of files/directories to ignore in git
│
├── app.py                        # Main Flask app script
│
├── LICENSE                       # License file
│
├── main_routes.py                # Routes for the Flask app
│
├── README.md                     # README documentation
│
├── requirements.txt              # List of required Python packages for the app
│
└── utils.py                      # Utility functions for the app

Getting Started

Local Deployment

  1. Clone the Repository

    git clone https://github.com/devobern/NRW23/tree/main
  2. Navigate to Directory

    cd NRW23
  3. Create & Activate Virtual Environment
    Ensure you have python3 and virtualenv installed.

    virtualenv env
    source env/bin/activate
  4. Install Dependencies

    pip install -r requirements.txt
  5. Run the App

    python run.py
  6. Access Locally
    The application will be accessible at http://127.0.0.1:5000/.

    Note: Due to the Content Security Policy (CSP), the app cannot be run locally without dev certificates. To address this, you can use mkcert to generate your own certificate. For a guide on how to use mkcert, please refer to this tutorial.

Online Access

Online access is no longer available.

Disclaimer

This application is an ongoing project and serves as a bit of a playground for me. It was developed with the primary motivation to provide a simple platform to view the votes received by individual candidates. There might be occasional issues or aspects that need refinement. Feedback and suggestions are always welcome.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dataset Information

The data used in this repository is sourced from the Bundesamt für Statistik BFS and relates to the Nationalratswahlen 2023.

  • Dataset Name: NR - Kandidierende
  • Publication Date: 8. August 2023
  • Format: JSON
  • Access URL: Link to Dataset

License for Dataset

The dataset is available under the "Freie Nutzung. Quellenangabe ist Pflicht" terms. Users can use this dataset for both non-commercial and commercial purposes, but proper attribution is required.

Attribution:
Autor:in: Bundesamt für Statistik BFS
Titel: NR - Kandidierende
Link zum Datensatz

Contact

For inquiries or suggestions, please reach out via email.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published