Git Product home page Git Product logo

maritime-benchmark's Introduction

Maritime Benchmark

Quick start (MonetDB only)

At first you need to install pymonetdb the monetdb driver for python. Optionally you can install it in a python virtual environment.

Download only the benchmark dataset

download-data.py --benchmark-set-only

If you would like to operate on scaled (down) version of the dataset you can simply do

scale.py --scale 0.01 --target scaled-data-0.01/

Note that the scaling script is not scaling shapefiles.

To load the data on a running instance of monetdb (for instruction check the official docs) execute the load.py script

load.py --system monet \
    --database <DB-NAME> \
    --data <DATA-DIR> \
    --scale<SCALE> \
    --benchmark-set-only 

Additionally, if the database is not running locally or it is using a different port append the hostname and port --hostname <HOST> --port <PORT>.

To execute the benchmark

execute.py --database <DB-NAME> --no-drop --single-system monet

The hostname and port can be specified as with the load.py script.

Loading datasets into MonetDB/Postgres

This repo contains scripts to download and load datasets from the 'Guide to Maritime Informatics' book into MonetDB and PostgreSQL.

NOTES:

  • In order to load geo data into MonetDB, the geo-update branch must be used. For Postgres, you must have the PostGIS extension installed.
  • The default name of the database where the data is loaded into is maritime, but you can change it through load.py arguments.
  • The database servers must be running before running the loading script: you must start the server and create the database yourself).

How to download and load data

  1. Use the download_data.py script to download all the datasets to the data/ directory
./download_data
  1. After getting the datasets, use the load.py script to load the data into either MonetDB or Postgres (or both)

Loading data into both MonetDB and Postgres (with default database name "maritime"):

./load.py

Loading data only into MonetDB:

./load.py --system monet

Loading data into Postgres:

./load.py --system postgres

Loading data into a MonetDB database with the database name "test":

./load.py --system monet --database test
  1. You have the data loaded in the database!
$ mclient -d maritime

sql> \dn
SCHEMA  ais_data
SCHEMA  environment_data
SCHEMA  geographic_data
SCHEMA  vessel_data

Comparison between MonetDB and Postgres (run.py script)

TODO

maritime-benchmark's People

Contributors

smavros avatar bernardom29 avatar yzchang avatar mitchellweg avatar

Stargazers

 avatar

Watchers

 avatar

maritime-benchmark's Issues

call shpload crashes the database when user has insufficient privileges

Log in a a user other than the administrator (monetdb/monetdb by default) will result in a crash of the database.

Example:

call shpload('/home/dameko/Desktop/host/shared/data/C1_Ports_of_Brittany/port.shp','sys','port');

will result in unexpected end of file and crash the database.

Existing approach on other calls:

call sys.analyze(0, 4000)
SELECT: insufficient privileges for binary operator 'sys'.'analyze'(smallint,smallint)

Call shpload does not accept capital letters for database name

MonetDB accepts capital letters when creating - quering a database, but it seems to alter everything to lower case.

In the contrary this example will not work:

call shpload('/home/dameko/Desktop/host/shared/data/C1_Ports_of_Brittany/port.shp','sys','PortsBrittany');

with error:
Table 'sys.PortsBrittany' missing

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.