Git Product home page Git Product logo

radarplot's Introduction

radarplot

A library to read the CIKM AnalaytiCup 2017 dataset.

radarplot is a library intended to read efficiently the dataset released for the CIKM AnalytiCup 2017 competiton (train.txt) and map it to Python objects. The dataset train.txt is 17.1 GB long but this library takes O(1) to read any of the 600,000 radar maps in the dataset. The information of the different Stacks and Layers of each sequence are easily accesible in the Radar object (all the structure within Radar object can be visualized in a plot).

Installation

This library is not published in the pip platform, so if you want to install you can do it manually following these steps:

git clone https://github.com/jpcano/radarplot.git
cd radarplot
pip3 install -e .

Quick Guide

Plot the 2nd layer of the 7th stack of the location number 134 in the dataset:

from radarplot.CIKM import *
cikm = CIKM('train.txt', 'train.index')
cikm.getRadars(134).getStack(6).getLayer(1).plot()

You can save it as a png file in the current directory:

from radarplot.CIKM import *
cikm = CIKM('train.txt', 'train.index')
cikm.getRadars(134).getStack(6).getLayer(1).plot('great_image')

Shows an animated radar map from the radar location 3 in the dataset:

from radarplot.CIKM import *
cikm = CIKM('train.txt', 'train.index')
cikm.getRadar(3).plot()

This saves all the radar maps (as mp4 sequences) in the directory 'vid':

from radarplot.CIKM import *
cikm = CIKM('train.txt', 'train.index')
for radar in cikm.getAllRadars():
	radar.plot('vid/' + radar.getID() + '.mp4')`

It is possible to save the images in reversed sorted order of the labels:

from radarplot.CIKM import *
cikm = CIKM('train.txt', 'train.index')
for radar in cikm.getAllRadars(sorted=True, reversed=True):
	radar.plot('vid/' + radar.getID() + '.mp4')

Notes

The first time that the CIKM constructor is called it will take some time to generate the file train.index. The next calls to that constructor will detect the index file and they will use it to speed up the random access to the images.

More examples

You can have a look at the project radarweb. It implements a client that uses this library to generate this web.

Tests

There is a unitary test suite that can be run with the following command:

make test

TODO

  • Autogenerate the API docummentation.
  • Continuous Integration with Travis.
  • Integrate codecov.io with Travis for automatic test coverage reports.

License

GNU GPLv3, see LICENSE

radarplot's People

Contributors

jpcano avatar

Stargazers

KOKO avatar liuc avatar

Watchers

James Cloos avatar  avatar

radarplot's Issues

how to plot the test data

train data can be plotted but how can i plot test data? when i try to plot test data, it comes

Index Error: List index out of range

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.