Code of the fairdataspace as employed for the Humanitarian Data Space and the upcoming Health Data Space Africa
# Fair Data Space
A Flask-based web application for discovering datasets across FAIR Data Points (FDPs), composing standardized data access request emails, and executing authenticated SPARQL queries.
One codebase serves multiple data spaces — each deployment picks its identity (branding, colors, default FDPs, page content) via the `DATASPACE` environment variable. See Multi-dataspace architecture below.
## Overview
Data visiting (code-to-data) is an approach where queries are sent to datasets for local execution, returning only verified results. This tool handles the **requester** side of that workflow:
1. **Discover** datasets across multiple FAIR Data Points
2. **Browse and filter** datasets by theme, keyword, or free-text search
3. **Compose** standardized data access request emails grouped by contact
4. **Query** SPARQL endpoints discovered from dataset distributions
## Features
### Dataset Discovery
- Add and manage FAIR Data Point endpoints (single or index FDPs)
- Browse datasets with filtering by theme, keyword, and free-text search
- Pagination and sorting for large dataset collections
- Automatic discovery of SPARQL endpoints from DCAT distributions
### Data Access Requests
- Add datasets to a request basket
- Compose data access requests with structured metadata (name, affiliation, ORCID, purpose)
- Automatically group and generate separate emails per dataset contact
- Preview and copy composed request emails
### Authenticated SPARQL Queries
- Log in with credentials for SPARQL endpoint authentication
- Execute read-only SPARQL queries against discovered endpoints
- Client-side query federation across multiple endpoints
- View aggregated results with per-endpoint breakdown
### Admin
- Admin login at `/admin/login` for editing the home and about page content
- Dashboard configuration for scheduled aggregate queries
## Multi-dataspace architecture
Each deployment serves one data space. A data space is a directory under `dataspaces/` that bundles …