Giter VIP home page Giter VIP logo

zhukovdm / smartwalk Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.57 MB

🗺️ Web application for keyword-aware route search

Home Page: https://smartwalk.vercel.app

License: MIT License

JavaScript 0.47% Makefile 0.49% C# 23.33% HTML 0.38% TypeScript 73.40% CSS 0.04% Shell 0.22% Dockerfile 0.16% Python 1.51%
mongodb react solid-pods asp-net osrm keyword-aware route-search spatial heuristics open-data search-engine

smartwalk's Introduction

SmartWalk

This repository contains the source code for SmartWalk, a web application for keyword-aware route search. Check out the Demo (although not connected to a backend) to get a sense of how the application might look and feel.

The documentation is hosted at https://zhukovdm.github.io/smartwalk-docs/.

Motivation

Most of the mainstream web mapping applications (Mapy.cz, Google Maps, etc.) implement explicit location-based direction search. A typical workflow involves building a sequence, with the following three steps applied for each waypoint.

  1. Search for places that might satisfy imposed constraints (e.g., a museum free of charge).
  2. Append one of them to the sequence, with possible manual reordering.
  3. New path is presented to the user right after the sequence configuration is altered.

In contrast, SmartWalk enables users to formulate search queries in terms of categories. A category is composed of a keyword (castle, museum, statue, etc.) and attribute filters (has an image, with WiFi, capacity ≥ N, etc.). For a place to be matched by a category, it must satisfy all constraints.

Given a starting point, destination, set of categories, and maximum walking distance, SmartWalk attempts to find routes with a length never longer than the predefined limit that visit at least one place from each category.

Besides routes, the application also supports place and standard location-based direction search.

smartwalk's People

Contributors

zhukovdm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

smartwalk's Issues

Spurious failures of Jest tests

When the computer on which Jest tests are executed performs other parallel tasks, some time-sensitive Jest tests may fail.

Links to Wikidata manuals, guides, and more

`consola` logger occasionally repeats previous message

The problem can be encountered during enrichment from the DbPedia knowledge graph. No further investigation has been done as the correctness of the output is not critical.

Actual output

> Fetched N entities for given 100 identifiers.            11:45:45 PM
> Fetched N entities for given 100 identifiers.            11:45:45 PM

Expected output

> Fetched M entities for given 100 identifiers.            11:45:42 PM
> Enriched N from this batch, enriched total X entities.   11:45:42 PM

[Test] Drag-and-drop functionality does not perform drop in the test

it("should allow the user to move a point to any position in the sequence", async () => {

I was not able to get this test right. All test steps are executed, but actual swap does not happen. Nonetheless, dragging should be possible1 and works as expected.

Footnotes

  1. https://github.com/atlassian/react-beautiful-dnd/issues/162#issuecomment-422461580

[Test] useNavigate does not update the history of a `MemoryRouter`

The following two tests shall be merged into one. For some reasons, useNavigate called from a callback does not update the history of a MemoryRouter, but works well with BrowserRouter.

it("should redirect to the Solid panel upon incoming redirect", async () => {

it("should render Solid session on the panel if the session state is set", async () => {

Potentially slow fetching from Wikidata

This query does not work well for some categories because of the recursive pattern. Furthermore, there is really no reason for not getting all possible points in a bounding box. For example, Prague has ~35000 items with location. So, the amount of transferred data is comparatively small.

/**
* @param cat Wikidata identifier defining category of objects
* @param bbox Bounding box
* @returns query as a string
*/
const wikidataQuery = (cat: string, { w, n, e, s }: Bbox) => (`PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX my: <http://example.com/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
CONSTRUCT {
?wikidataId my:location ?location.
}
WHERE {
?wikidataId wdt:P31/wdt:P279* wd:${cat}.
SERVICE wikibase:box {
?wikidataId wdt:P625 ?location.
bd:serviceParam wikibase:cornerSouthWest "Point(${w} ${s})"^^geo:wktLiteral.
bd:serviceParam wikibase:cornerNorthEast "Point(${e} ${n})"^^geo:wktLiteral.
}
}`);

Expand `shell` environment variables in docker compose

The construction below injects environment variables into a container. However, these variables are not visible in the file, and ${VAR} ends up being undefined. The true value of this particular variable is defined in the ./infra/.env file, while variables for other services are defined in the compose file.

services:
  routing:
    environment:
      - REGION_FILE=...
    entrypoint: ...${REGION_FILE}...

Use IHttpClientFactory for calling external HTTP services

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.