Giter Site home page Giter Site logo

data_build_tool_payless.health's Introduction

Data build tool for Payless Health

This repository is used to standardize data from the government, hospitals, payors, claims, and electronic health records to the Payless Health Common Data Model, using the data build tool (dbt).

You can see examples here:

https://github.com/onefact/data_build_tool_payless.health/tree/main/notebooks

And the data models here:

https://github.com/onefact/data_build_tool_payless.health/tree/main/payless_health/models/

And the data here:

https://data.payless.health/

For example, this folder in the Amazon simple storage service (S3) bucket, https://data.payless.health/#cms.gov/, corresponds to the following SQL query used to map the data to a standard schema (set of column names and data types using the duckdb engine):

https://github.com/onefact/data_build_tool_payless.health/blob/main/payless_health/models/cms.gov/national_plan_and_provider_identifiers.sql

The data build tool dbt takes this SQL query and compresses the data into a materialized view corresponding to a parquet file using the Apache Parquet compressed representation.

This compressed file can then be queried using the help of ChatGPT, Claude, and other tools to visualize and create analytics, insights, and build machine learning models on top of this national scale health data.

Here is a full example from the datathinking.org course:

https://nbviewer.org/github/onefact/datathinking.org-codespace/blob/main/notebooks/princeton-university/week-1-visualizing-33-million-phone-calls-in-new-york-city.ipynb

Building a data model

  1. Install dbt using pip3 install dbt-duckdb (https://github.com/jwills/dbt-duckdb)
  2. Clone this repo: git clone https://github.com/onefact/data_build_tool_payless.health.git
  3. Navigate to the payless_health directory: cd payless_health
  4. Run a command to build a dataset, such as dbt run --select cms.gov to run the data models in this folder: https://github.com/onefact/data_build_tool_payless.health/blob/main/payless_health/models/cms.gov (you might need to download additional files that are needed as input by the duckdb SQL queries)
  5. Open the materialized parquet file using duckdb: open duckdb on the command line (or use a Jupyter notebook to query the parquet file).

For easier development, we recommend testing your SQL queries first and using Claude and ChatGPT to help construct inital queries based on examples like this:

https://github.com/onefact/data_build_tool_payless.health/blob/main/notebooks/cms.gov-national-plan-and-provider-identifier-database.ipynb

^ see specifically the prompt example for Claude to see how to accelerate this work and make scalable visualizations.

  1. Use environment.yml file
  2. Run dbt run to build the parquet file
  3. Test the parquet file by running dbt test. If the test fails, you can run dbt debug to see the error message.

data_build_tool_payless.health's People

Contributors

jaanli avatar rohanbansal12 avatar reethamg avatar

Stargazers

 avatar  avatar

Watchers

 avatar Kyloon Chuah avatar  avatar

Forkers

rohanbansal12

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.