Skip to content

infowijs/mapitout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapItOut

MapitOut is a tool to calculate how far you can travel with certain types of transport within a specified traveltime within the Amsterdam Area. It also shows POIs such as educational institutes.


This is a public copy of the MapitOut web application.

This repository can be cloned and used by other parties, under the conditions of the GNU Lesser General Public License 3.0. The following conditions apply:

  • Do not utilize the name MapItOut or the logo, or any of the related assets (branding, videos, FAQs, blog)
  • Provide references to the original source material (this repository and URL), with the text: "Based on the open-source MapItOut application of the Metropolitan Region Amsterdam"

The current tech stack provides coverage within The Netherlands but contains some "bias" towards the Amsterdam region. Such as the starting coordinates on launch, and the Google Places search targeted towards the Amsterdam region.

Screenshot of the application in a browser window

Getting started

This app uses a few services in order to run:

Both API keys can be requested by following the guides provided by said provider (check the links).

Tech stack

Back-end

The only backend component to this application is a simple AWS Lambda (written in JavaScript) to proxy the Travel Time Platform's API. By proxying this request the API token can be injected into the request and remain hidden from the user.

It is deployed via Serverless.

Front-end

The frontend is a React application generated with the Create React App project. It's written in TypeScript, TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

The frontend specific documentation can be found inside the web directory, nearly all the code is self explanatory when your are familiar with React.

Importer tool

The frontend requires a schools.json file (src/assets/schools.json) which contains the addresses of all schools (depending on configuration), it can be generated using the import scripts and appropriate CSV files.

The generation of this file can be done using this command:

cd importer && yarn start

The main script merges the data from three CSV files, geocodes the addresses and saves the data as a JSON file.

All three CSV files will be used to determine certain properties and must therefore adhere to certain standards, mainly the column names and the fact that the application assumes all required fields to be filled in correctly. The naming convention used in the process are based on the default column names as presented in the documents provided by DUO.

column name description required in
VESTIGINGSNAAM or INSTELLINGSNAAM title all
INTERNETADRES URL all
STRAATNAAM street all
HUISNUMMER-TOEVOEGING house number all
POSTCODE postal code all
PLAATSNAAM city all
TYPE "primary", "secondary" or "mixed" international