Git Product home page Git Product logo

marcusinthesky / zindi-uber-ranrail-movement-challenge Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 1.32 MB

Incident data in Cape Town, South Africa has been provided by SANRAL Freeway Management System and travel times between zones in Cape Town have been provided by Uber Movement. The aim of this challenge is to forecast if an incident will occur for each hour of each day per 500m road segment along the major roadways in Cape Town for 1 January 2019 to 31 March 2019.

License: MIT License

Python 0.26% Jupyter Notebook 99.74%

zindi-uber-ranrail-movement-challenge's Introduction

Zindi-Uber-RANRAIL-Movement-Challenge

Overview

This repo is a competition submission for the Zindi Uber Movement SANRAL Cape Town Challenge . This solution, using Non-negative Matrix Factorization took first place in the competition hackathon and remained top of the public and private leaderboards for 4 months despite is simplicity. Please enjoy.

Incident data in Cape Town, South Africa has been provided by SANRAL Freeway Management System and travel times between zones in Cape Town have been provided by Uber Movement. The aim of this challenge is to forecast if an incident will occur for each hour of each day per 500m road segment along the major roadways in Cape Town for 1 January 2019 to 31 March 2019.

Installing dependencies

Dependencies should be declared in src/requirements.txt for pip installation and src/environment.yml for conda installation.

To install them, run:

kedro install

Running Kedro

You can run your Kedro project with:

kedro run

Working with Kedro from notebooks

In order to use notebooks in your Kedro project, you need to install Jupyter:

pip install jupyter

For using Jupyter Lab, you need to install it:

pip install jupyterlab

After installing Jupyter, you can start a local notebook server:

kedro jupyter notebook

You can also start Jupyter Lab:

kedro jupyter lab

And if you want to run an IPython session:

kedro ipython

Running Jupyter or IPython this way provides the following variables in scope: proj_dir, proj_name, conf, io, parameters and startup_error.

Converting notebook cells to nodes in a Kedro project

Once you are happy with a notebook, you may want to move your code over into the Kedro project structure for the next stage in your development. This is done through a mixture of cell tagging and Kedro CLI commands.

By adding the node tag to a cell and running the command below, the cell's source code will be copied over to a Python file within src/<package_name>/nodes/.

kedro jupyter convert <filepath_to_my_notebook>

Note: The name of the Python file matches the name of the original notebook.

Alternatively, you may want to transform all your notebooks in one go. To this end, you can run the following command to convert all notebook files found in the project root directory and under any of its sub-folders.

kedro jupyter convert --all

Ignoring notebook output cells in git

In order to automatically strip out all output cell contents before committing to git, you can run kedro activate-nbstripout. This will add a hook in .git/config which will run nbstripout before anything is committed to git.

Note: Your output cells will be left intact locally.

Package the project

In order to package the project's Python code in .egg and / or a .wheel file, you can run:

kedro package

After running that, you can find the two packages in src/dist/.

Building API documentation

To build API docs for your code using Sphinx, run:

kedro build-docs

See your documentation by opening docs/build/html/index.html.

Building the project requirements

To generate or update the dependency requirements for your project, run:

kedro build-reqs

This will copy the contents of src/requirements.txt into a new file src/requirements.in which will be used as the source for pip-compile. You can see the output of the resolution by opening src/requirements.txt.

After this, if you'd like to update your project requirements, please update src/requirements.in and re-run kedro build-reqs.

zindi-uber-ranrail-movement-challenge's People

Contributors

marcusinthesky avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

abhinavm24

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.