Coder Social home page Coder Social logo

medicine_pricing's Introduction

Medicine Pricing Project

This project fetches Iceland's medicine pricing over time from their website. It uses the ngods stack for end-to-end processing.

Overview

This project demonstrates creating a complete data stack using only open-source tools from ngods.

It leverages the following technologies:

  • Python: Used for scripting and data processing.
  • dbt: Handles the transformation of data within the data warehouse.
  • dagster-dbt: Orchestrates and schedules the dbt jobs.
  • DuckDB: An in-process SQL OLAP database management system.
  • Minio: Provides S3-compatible object storage.
  • Cube.js: Enables data modeling and analytics.
  • Trino: A distributed SQL query engine for big data analytics.

This stack allows for efficient, scalable, and fully open-source data processing and analysis.

Growth of wholesale price for selected medicine over the years

File Structure

  • .vscode: VS Code settings.
  • common: Shared modules and utilities.
  • dagster_etl: Dagster ETL pipelines.
  • dagster_etl_tests: Tests for Dagster ETL.
  • dbt_project: dbt models and configurations.
  • images: Project-related images.
  • infrastructure: Infrastructure as code.
  • model: Data models.
  • example_env: Environment variable examples.
  • docker-compose.yml: Docker Compose configuration.
  • Makefile: Automation tasks.
  • setup.py, pyproject.toml, setup.cfg: Python package configuration.

Getting Started

Prerequisites

  • Docker
  • Python 3.8+

Installation

  1. Clone the repository:

    git clone https://github.com/Rafno/medicine_pricing.git
    cd medicine_pricing
  2. Install python and DBT dependencies:

    pip install -e ".[dev]"
    cd dbt_project
    dbt deps 
    
  3. Start Dagster UI:

    dagster dev
    
  4. Start Minio and Cuble with Docker Compose:

    docker-compose up
    
  5. Apply Terraform infrastructure:

    cd infrastructure
    terraform apply
    
  6. Open the project in your browser:
    localhost:3000 - Dagster
    localhost:4000 - Cube
    localhost:9000 - Minio

Passwords

Minio user: youraccesskey
Minio password: yoursecretkey

This can be changed in docker compose.

Environment Variables

Use values directly from example_env, and create a .env file in your project with those values.

Adding Dependencies

Specify new dependencies in setup.py.

Testing

Run tests using pytest:

pytest dagster_etl_tests

Infrastructure

Apache Iceberg: Data storage format (TODO)
Trino: Federated data query (TODO)
dbt: ELT
Dagster: Data orchestration
Cube.dev: Data analysis and semantic model Metabase: Self-service data visualization (TODO)
Minio: Local S3 storage

Learn More

Dagster Tutorials
dbt + Dagster tutorial

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.