Coder Social home page Coder Social logo

insight_coding_challange's Introduction

Insight coding challange - by Sergey Shnitkind

Insight coding challenge - analyze the Instacart dataset Submitted July 2019

Purcase analytics

Purchase analytics is a script that takes order and product information from the Instacart 2017 database and outputs a csv file with the number of orders per department, how many orders are new (not a re-order), and percentage of new orders from total orders.

Instracart 2017 data available here:
https://www.instacart.com/datasets/grocery-shopping-2017

Data format is specified here:
https://gist.github.com/jeremystan/c3b39d947d9b88b3ccff3147dbcf6c6b

Original Insight instructions:
https://github.com/InsightDataScience/Purchase-Analytics  

Usage

Navigate to root directory (./insight_shnitkind/) and run run.sh or excecute the following:

python ./src/purchase_analytics.py ./input/order_products.csv ./input/products.csv ./output/report.csv

The script takes 3 arguments:

  1. order information file location
  2. product listing file location
  3. desired output file location

Testing

A simple test is provided that tests the entire script for correct output. To excecute, navigate to root directory (./insight_shnitkind/) and run:

python -m unittest discover -s ./insight_testsuite/tests/test_integration_1/

insight_coding_challange's People

Contributors

trendsci avatar

Watchers

James Cloos avatar

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.