Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/

The crawler subdirectory was the only active project. Moving it to the
repo root simplifies paths and removes the unnecessary nesting. The
vqa/ and immoweb/ directories were legacy/unused and have been removed.

Updated .drone.yml, .gitignore, .claude/ docs, and skills to reflect
the new flat structure.
This commit is contained in:
Viktor Barzin 2026-02-07 23:01:20 +00:00
parent e2247be700
commit eafbc1ac52
No known key found for this signature in database
GPG key ID: 0EB088298288D958
221 changed files with 70 additions and 146140 deletions

View file

@ -0,0 +1,83 @@
// Color schemes for map visualization
// Different color schemes for different metrics to improve clarity
import { Metric } from "@/components/Parameters";
// For metrics where LOW is GOOD (price, price per sqm): Green → Yellow → Red
export const LOW_IS_GOOD_COLOR_STOPS: [number, string][] = [
[0, 'rgba(34, 197, 94, 0.7)'], // Green - good deal
[25, 'rgba(132, 204, 22, 0.7)'], // Lime
[50, 'rgba(250, 204, 21, 0.7)'], // Yellow - neutral
[75, 'rgba(249, 115, 22, 0.7)'], // Orange
[100, 'rgba(239, 68, 68, 0.7)'], // Red - expensive
];
// For metrics where HIGH is GOOD (size, rooms): Red → Yellow → Green
export const HIGH_IS_GOOD_COLOR_STOPS: [number, string][] = [
[0, 'rgba(239, 68, 68, 0.7)'], // Red - small
[25, 'rgba(249, 115, 22, 0.7)'], // Orange
[50, 'rgba(250, 204, 21, 0.7)'], // Yellow - medium
[75, 'rgba(132, 204, 22, 0.7)'], // Lime
[100, 'rgba(34, 197, 94, 0.7)'], // Green - large
];
// Legacy color stops (for backwards compatibility)
export const LEGACY_COLOR_STOPS: [number, string][] = [
[0, 'rgba(0,185,243,0)'],
[25, 'rgba(0,185,243,0.24)'],
[60, 'rgba(255,223,0,0.3)'],
[100, 'rgba(255,105,0,0.3)'],
];
// Get the appropriate color scheme based on metric type
export function getColorSchemeForMetric(metric: Metric | string): [number, string][] {
switch (metric) {
case Metric.qmprice:
case Metric.price:
case 'qmprice':
case 'total_price':
// Lower price is better → Green for low, Red for high
return LOW_IS_GOOD_COLOR_STOPS;
case Metric.qm:
case Metric.rooms:
case 'qm':
case 'rooms':
// Higher value is better → Green for high, Red for low
return HIGH_IS_GOOD_COLOR_STOPS;
default:
return LOW_IS_GOOD_COLOR_STOPS;
}
}
// Get interpretation text for legend
export function getMetricInterpretation(metric: Metric | string): { low: string; high: string; name: string } {
switch (metric) {
case Metric.qmprice:
case 'qmprice':
return { low: 'Good deal', high: 'Expensive', name: 'Price per m²' };
case Metric.price:
case 'total_price':
return { low: 'Good deal', high: 'Expensive', name: 'Total Price' };
case Metric.qm:
case 'qm':
return { low: 'Small', high: 'Large', name: 'Size (m²)' };
case Metric.rooms:
case 'rooms':
return { low: 'Few rooms', high: 'Many rooms', name: 'Bedrooms' };
default:
return { low: 'Low', high: 'High', name: 'Value' };
}
}
// Color scheme names for display
export const COLOR_SCHEME_NAMES = {
LOW_IS_GOOD: 'Green → Red (low is good)',
HIGH_IS_GOOD: 'Red → Green (high is good)',
LEGACY: 'Classic (blue → orange)',
} as const;

View file

@ -0,0 +1,62 @@
// Application constants and configuration
// Re-export color schemes
export * from './colorSchemes';
// API endpoints
export const API_ENDPOINTS = {
LISTING_GEOJSON: '/api/listing_geojson',
LISTING_GEOJSON_STREAM: '/api/listing_geojson/stream',
REFRESH_LISTINGS: '/api/refresh_listings',
TASK_STATUS: '/api/task_status',
TASKS_FOR_USER: '/api/tasks_for_user',
CANCEL_TASK: '/api/cancel_task',
CLEAR_ALL_TASKS: '/api/clear_all_tasks',
GET_DISTRICTS: '/api/get_districts',
} as const;
// Map configuration
export const MAP_CONFIG = {
MAPBOX_TOKEN: import.meta.env.VITE_MAPBOX_TOKEN || 'pk.eyJ1IjoiZGktdG8iLCJhIjoiY2o0bnBoYXcxMW1mNzJ3bDhmc2xiNWttaiJ9.ZccatVk_4shzoAsEUXXecA',
DEFAULT_CENTER: [13.38032, 49.994210] as [number, number],
DEFAULT_ZOOM: 5,
STYLE: 'mapbox://styles/mapbox/light-v9',
} as const;
// Heatmap configuration
export const HEATMAP_CONFIG = {
INTENSITY: 9,
SPREAD: 0.05,
CELL_DENSITY: 0.5, // Smaller value = bigger hexagons
} as const;
// Percentile configuration for data visualization
export const PERCENTILE_CONFIG = {
MIN_BOUND: 0.05, // 5th percentile for color scale minimum
MAX_BOUND: 0.95, // 95th percentile for color scale maximum
BOUNDS_CLIP_MIN: 0.01, // 1st percentile for bounding box
BOUNDS_CLIP_MAX: 0.99, // 99th percentile for bounding box
} as const;
// Heatmap color gradient stops
export const HEATMAP_COLOR_STOPS: [number, string][] = [
[0, 'rgba(0,185,243,0)'],
[25, 'rgba(0,185,243,0.24)'],
[60, 'rgba(255,223,0,0.3)'],
[100, 'rgba(255,105,0,0.3)'],
];
// Default form values
export const DEFAULT_FORM_VALUES = {
min_bedrooms: 1,
max_bedrooms: 3,
max_price: 3000,
min_price: 2000,
min_sqm: 50,
last_seen_days: 28,
} as const;
// Polling intervals
export const POLLING_INTERVALS = {
TASK_STATUS_MS: 5000, // 5 seconds
} as const;