GithubHelp home page GithubHelp logo

enigma-coding-challenge's Introduction

Enigma Coding Challege

This repo is my proposed solutions to [Enigma] (http://enigma.io/) coding challenges for their data engineering position.

There are two parts to this:

Part 1. CSV manipulation:

Problems:

  1. String cleaning - The bio field contains text with arbitrary padding, spacing and line breaks. Normalize these values to a space-delimited string.
  2. Code swap - There is a supplementary CSV file for download here: state_abbreviations.csv. This "data dictionary" contains state abbreviations alongside state names. For the state field of the input CSV, replace each state abbreviation with its associated state name from the data dictionary.
  3. Date offset (bonus) - The start_date field contains data in a variety of formats. These may include e.g., "June 23, 1912" or "5/11/1930" (month, day, year). But not all values are valid dates. Invalid dates may include e.g., "June 2018", "3/06" (incomplete dates) or even arbitrary natural language. Add a start_date_description field adjacent to the start_date column to filter invalid date values into. Normalize all valid date values in start_date to ISO 8601 (i.e., YYYY-MM-DD).

My proposed solutions

  1. cleaning.py this file cleans the bio field in the csv file test.csv and produces output file output.csv
  2. swap.py this file repaces abbreviations with the appropriate state names and produces output file fixed_state.csv
  3. bonus.py this file filters uses the custom validation class I wrote validate.py to validate and normalize date strings. It also filters bad balues into start_date_description to the output file bonus.csv

Part 2. Scraping:

Problem:

  1. Write a script to scrape a [sample site] (http://data-interview.enigmalabs.org/companies/) and output its data in JSON

Proposed Solution:

  1. scraper.py scrapes the site using Beautiful soup and requests, and outputs its results to solution.json

enigma-coding-challenge's People

Contributors

faiq avatar

Stargazers

 avatar

Watchers

 avatar  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.