Giter VIP home page Giter VIP logo

scraper-data-ingestion-pipelines-template's Introduction

Data Ingestion Pipeline Template

This repository consists of boilerplate folder structure to write and organize scripts for a data ingestion pipeline

Folder Structure

The tree diagram below represents a general file structure

|--- data_source_name                      
     |--- deploy                            # pipeline orchestration and configuration of DAGs
     |    |---dev              
     |    |---prod
     |--- src
          |--- dependencies
          |    |--- cleaning
          |    |    |--- __init__.py
          |    |    |--- cleaner.py         ## Cleaning script here
          |    |--- geocoding
          |    |    |--- __init__.py
          |    |    |--- geocoder.py        ## Geocoding script here
          |    |--- scraping                # This folder contains all data harvesting scipts
          |    |    |--- __init__.py
          |    |    |--- scraper.py         ## Harvesting script here
          |    |--- standardization
          |    |    |--- __init__.py
          |    |    |--- standardizer.py    ## Standardization script here
          |    |--- utils                   # Utility and helper scipts to be placed here
          |         |--- __init__.py
          |--- .dockerignore
          |--- Dockerfile
          |--- client.py                    # Master script that connects all the above blocks
          |--- requirements.txt

Different Blocks of ETL pipeline

  1. Scraping/Data Harvesting
    • Contains all the scripts that extracts metadata and raw data to be processed further from database, websites, webservices, APIs, etc.
  2. Cleaning
    • Treatment missing fields and values
    • Conversion of amounts to USD
    • Treatment of duplicate entries
    • Convert country codes to ISO 3166-1 alpha3 i.e. 3 letter format
    • Identify region name and region code using the country code
  3. Geocoding
    • Based upon location information available in the data
      • Location label
      • Geo-spatial coordinates
    • Missing field can be found either by using geocoding or reverse geocoding with max precision available
  4. Standardization
    • Fields to be strictly in lower snake casing
    • Taking care of data types and consistency of fields
    • Standardize fields like sector and subsector
    • Mapping of status and stage
    • Renaming of field names as per required standards
    • Manipulation of certain fields and values to meet up the global standards for presentation, analytics and business use of data
    • Refer to the Global Field Standards spreadsheet for the standards to be followed

Note

Depending upon what fields are already available in the data GEOCODING step may or may not be required.

It is recommended that the resultant data after each and every step is stored and backed up for recovery purpose.

Apart from the primary fields listed down in Global Field Standards spreadsheet, there are several other secondary fields that are to be scraped; given by the data provider for every document that holds significant business importance.

Get started with

  • Fork the repository by clicking the Fork button on top right-hand side corner of the page.
  • After creating fork repo, create a branch in that repo and finally create a PULL REQUEST from fork repo branch to the main branch in upstream branch of root repo.

scraper-data-ingestion-pipelines-template's People

Watchers

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