
MeDeMAP is an advanced web application that visualizes and analyzes media data across European countries. It provides interactive tools to explore how media environments perform democratic functions under different conditions, offering insights for researchers, policymakers, and citizens.
- Interactive 3D globe powered by Globe.gl and Three.js
- WebGL-based rendering for smooth performance
- 3D bar charts representing data metrics with height scaling
- Logarithmic scaling option for better visualization of similar values
- Dynamic color palettes (Rainbow, Heat Map, Cool Colors, Sunset, Forest, Ocean, Custom)
- Per-country indicator selection with distinct color coding
- Draggable controls and settings panels
- Data labels with customizable font sizes
- Multiple visualization modes: 3D Globe, Choropleth Maps, Tables, Histograms
- Advanced filtering and selection tools
- Country-specific indicator comparisons
- Global vs. per-country data selections
- Real-time data updates with progress tracking
- Multi-language support (English, German, French, Latin)
- Responsive design optimized for various screen sizes
- Draggable UI panels for customized layouts
- Settings management with localStorage persistence
- Tutorial system with step-by-step guidance
- Preview mode for resource optimization
- Next.js 14 - React framework with App Router
- React 18 - Component-based UI library
- TypeScript - Type-safe development
- Redux Toolkit - State management with RTK Query
- Material-UI (MUI) - React component library
- React i18next - Internationalization framework
- Globe.gl - WebGL-based 3D globe visualization
- Three.js - 3D graphics library
- React-Draggable - Draggable UI components
- PostgreSQL - Primary database
- AG-Grid - Advanced data grid
- Knex.js - SQL query builder
- React-Select - Advanced select components
- Kubernetes - Container orchestration
- Docker - Containerization
- ESLint - Code linting
- CSS Modules - Scoped styling
- Node.js (v18 or later)
- npm or yarn
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/pacedproton/medemap
-
Install dependencies:
npm install # or yarn install
-
Run DB migrations:
knex migrate:latest
-
Configure the application:
- Create a
.env.local
with values:POSTGRES_USER=...
POSTGRES_PASSWORD=...
POSTGRES_HOST=...
POSTGRES_DB=...
POSTGRES_PORT=5432
- Optionally edit
app/config.yaml
for non-secret defaults. Secrets should not be committed.
- Create a
-
Kubernetes secrets setup (if deploying to k8s):
-
Copy the example secrets and fill in values locally (do not commit the real file):
cp Kubernetes/medemap-secrets.example.yaml Kubernetes/medemap-secrets.yaml # edit Kubernetes/medemap-secrets.yaml to set real values
-
Apply:
kubectl apply -f Kubernetes/medemap-secrets.yaml
-
-
Create your local env file:
-
Copy
env.example
to.env.local
and fill values:cp env.example .env.local # edit .env.local
-
-
Run the development server or deploy to Kubernetes:
npm run dev # or yarn dev
-
Open
http://localhost:3000
in your browser.
MeDeMAP-app/
βββ app/ # Next.js App Router
β βββ components/ # React components
β β βββ GlobeGL.tsx # Globe.gl 3D visualization
β β βββ SettingsDialog.tsx # Global settings management
β β βββ ... # Other UI components
β βββ 3d/ # 3D visualization pages
β βββ api/ # API routes
βββ lib/ # Application logic
β βββ features/ # Redux slices
β β βββ medemap/ # Main data slice
β β βββ settings/ # Settings slice
β β βββ language/ # i18n slice
β βββ store.ts # Redux store configuration
βββ locales/ # Translation files
β βββ en.json # English translations
β βββ de.json # German translations
β βββ fr.json # French translations
β βββ la.json # Latin translations
βββ public/ # Static assets
βββ styles/ # CSS and styling
βββ Kubernetes/ # Deployment configuration
The application uses Globe.gl for 3D rendering:
Globe.gl Engine (/app/components/GlobeGL.tsx
)
- WebGL-based lightweight rendering
- Custom color palettes and effects
- Per-country indicator selection
- Real-time data visualization with 3D bars
- Smooth animations and interactions
Choose between two selection modes:
-
Global Selection: Apply indicators to all countries
- Use the main data selection interface
- Consistent visualization across all European countries
- Ideal for comparative analysis
-
Per-Country Selection: Customize indicators per country
- Access through the 3D view's country-specific panel
- Mix different indicators for different countries
- Perfect for focused regional studies
// Available in Globe.gl engine
{
showDataLabels: boolean, // Toggle data labels
dataLabelFontSize: number, // Font size (8-24pt)
use3DLogScale: boolean, // Logarithmic height scaling
barSpacing: number, // Spacing between bars
barScale: number, // Height scale multiplier
colorPalette: string // Color scheme selection
}
- Default: Balanced HSL spectrum
- Rainbow: Full spectrum colors (0-300Β° hue)
- Heat Map: Yellow to red gradient
- Cool Colors: Blue to cyan range
- Sunset: Warm orange to purple
- Forest: Green nature tones
- Ocean: Blue marine palette
- Custom: User-defined HSL range
The application supports four languages with complete UI translation:
// Available languages
const supportedLanguages = {
'en': 'English',
'de': 'Deutsch',
'fr': 'FranΓ§ais',
'la': 'Latina'
};
GET /api/data
- Fetch all media dataGET /api/geocoordinates
- Get country coordinatesGET /api/config
- Application configuration
The app uses app/config.yaml
for feature flags and settings:
features:
previewGlobeView: true
enableTutorial: true
verboseLogging: false
database:
connectionTimeout: 30000
cesium:
terrainProvider: "world"
enableLighting: true
npm run test
# or
yarn test
npm run build
# or
yarn build
npm run lint
# or
yarn lint
- Configure secrets in
Kubernetes/medemap-secrets.yaml
- Apply Kubernetes manifests:
kubectl apply -f Kubernetes/
Required environment variables:
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
POSTGRES_HOST=your_db_host
POSTGRES_DB=your_db_name
POSTGRES_PORT=5432
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
MeDeMAP is developed as part of research into media environments and democratic functions across European countries. Special thanks to the research teams and data providers who make this visualization possible.