Python Sorting Algorithms OOP OpenStreetMap

DataDine

A console-based Vienna restaurant finder: live venue data from OpenStreetMap, search and filtering with truth-table-style AND/OR logic, three sorting algorithms, and a built-in algorithm benchmark. Built as my FCSP course final project.

Overview

This was my final project for a computer-science course focused on complex data sorting and truth tables. The assignment required building an object-oriented tool that sorts complex data objects by numerical properties, applies logical-proposition evaluation as a secondary criterion, and analyzes the performance of loop-based versus recursive algorithms.

I chose a Vienna restaurant dataset pulled live from OpenStreetMap. DataDine reverse-geocodes addresses through Vienna's open-data service, parses real opening hours (including overnight and 24:00 ranges), and lets a user search, filter, and sort venues by cuisine, district, open status, outdoor seating, and wheelchair accessibility.

Features

  • Live data pull from OpenStreetMap (restaurants, pubs, cafes, fast food, bars, biergartens, ice cream).
  • Address normalization via Vienna's OGD reverse-geocoding API with retry + rate-limit handling.
  • Opening-hours parsing supporting overnight ranges and 24:00 end times.
  • Search & filter with AND/OR truth-table-style logical evaluation (2+ conditional variables).
  • Three hand-written sort algorithms · bubble, insertion, merge · with a benchmark mode that runs loop-based vs. recursive sorting live.
  • Distance-aware sorting from a user-entered address (geodesic math).
  • PrettyTable output and CSV export of results.

Tech & Approach

Pure Python, using osmnx and shapely to pull venue geometry from OpenStreetMap, pandas for dataset handling, geopy for geodesic distance, pyproj for coordinate-system transforms (WGS84 ↔ EPSG:31256), requests for the Vienna OGD address service, prettytable for console output, and tqdm progress visualization. The code is organized around an abstract Place base class with Restaurant and Chain subclasses, plus DataBase, Location, OpenHours, and a custom MenuBreak exception. The design demonstrates inheritance, abstraction, polymorphism, and error handling.

Outcome

The tool processes roughly 6,200 Viennese venues, filters them with logical criteria, and benchmarks three sorting algorithms on live objects. It covers every written rubric category · object-oriented design, data types, loop & recursion, sorting, searching, truth-table logical complexity, performance analysis, functions, CSV data handling, and error handling. A full rubric mapping lives in the repository README.