From bb7fb02b33b3c0f1c13708f4c981dac362e8e190 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 18 Dec 2025 18:57:58 +0100 Subject: [PATCH 1/4] feat: :sparkles: post on publishing osdc --- posts/published-osdc/index.qmd | 75 ++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 posts/published-osdc/index.qmd diff --git a/posts/published-osdc/index.qmd b/posts/published-osdc/index.qmd new file mode 100644 index 0000000..3eaeb65 --- /dev/null +++ b/posts/published-osdc/index.qmd @@ -0,0 +1,75 @@ +--- +title: "Published our first, externally collaborated R package called `osdc`" +description: | + We've been collaborating with a researcher at Steno Aarhus on building an + R package called `osdc` over the last 2 years. This package, titled + *Open Source Diabetes Classifier*, classifies diabetes status in the + Danish registers. And finally, we've published it to CRAN! :tada: +author: +- Luke W. Johnston +date: "2025-12-18" +categories: + - packaging + - publishing + - programming +--- + +On December 10th, 2025, we finally published our first R package to +[CRAN](https://cran.r-project.org/)! :tada: + +The package is called +[`osdc`](https://cran.r-project.org/web/packages/osdc/index.html), or +"Open Source Diabetes Classifier", and it is our first package that +we've built in collaboration with an external researcher, [Anders Aasted +Isaksen](https://www.stenoaarhus.dk/kontakt/anders-aasted-isaksen/). He +developed an algorithm to classify type 1 and type 2 diabetes using +Danish registers as data sources, and we worked together to turn this +algorithm into an R package that others can use. We started the +collaboration back in 2023, and after a lot of work and iterations and +designing, we finally got it to a stage that we could publish a first +version to CRAN. + +The package has two aims (as described in the package +[documentation](https://steno-aarhus.github.io/osdc/)): + +1. To provide an open-source, code-based algorithm to classify type 1 + and type 2 diabetes using Danish registers as data sources. There + are other diabetes algorithms developed in Denmark for the + registers, but they are not open source nor packaged into a reusable + format. +2. To inspire discussions within the Danish register-based research + space on the openness and ease of use on the existing tooling and + registers, and on the need for an official process for updating or + contributing to existing data sources. + +## Who is it for and why use it? + +The main reason for building the `osdc` package was to provide a tool +for researchers doing diabetes research with Danish register data. There +are no Danish registers that fully captures the different ways that a +person could be classified with diabetes, as administrative diagnosis +data is not always complete nor accurate. So researchers have had to +develop different algorithms to get a better idea of who has diabetes in +the Danish registers. + +However, these algorithms have not been open source, and they have not +been packaged into reusable tools. Which has lead to many researchers +having "in-house" solutions for their group or organisation, but that +other groups can't really use effectively. We wanted to change that. + +So we built the `osdc` package with all the necessary details for +researchers to easily classify diabetes status in their own Danish +register data. That includes providing a list of which registers and +variables are needed with the use of the `registers()` function. Other +that a few other helper functions, the main function of the package is +`classify_diabetes()`, which takes all the required registers and +outputs a data frame with a list of individuals, their diabetes status, +and the date when the classification was made. + +Aside from those functions, there's also a function that lists all the +specific criteria used in the algorithm in the function `algorithm()`. +This makes it very easy for others to assess how exactly we classified +diabetes. + +Anyway, next step is to start using them in collaborating projects that +use Denmark Statistics and register data :tada: From 6ad61d6830905578325ae7dd5bcd0686cdad6a25 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Fri, 19 Dec 2025 16:24:27 +0100 Subject: [PATCH 2/4] fix: :pencil2: edits from review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Signe Kirk Brødbæk --- posts/published-osdc/index.qmd | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/posts/published-osdc/index.qmd b/posts/published-osdc/index.qmd index 3eaeb65..61447ab 100644 --- a/posts/published-osdc/index.qmd +++ b/posts/published-osdc/index.qmd @@ -1,10 +1,10 @@ --- -title: "Published our first, externally collaborated R package called `osdc`" +title: "Published our first externally collaborated R package, osdc" description: | - We've been collaborating with a researcher at Steno Aarhus on building an - R package called `osdc` over the last 2 years. This package, titled + Over the last two year, we've collaborated with a researcher at Steno Aarhus on building an + R package called osdc. This package, titled *Open Source Diabetes Classifier*, classifies diabetes status in the - Danish registers. And finally, we've published it to CRAN! :tada: + Danish registers. And finally, we've published it to CRAN! author: - Luke W. Johnston date: "2025-12-18" @@ -25,8 +25,8 @@ Isaksen](https://www.stenoaarhus.dk/kontakt/anders-aasted-isaksen/). He developed an algorithm to classify type 1 and type 2 diabetes using Danish registers as data sources, and we worked together to turn this algorithm into an R package that others can use. We started the -collaboration back in 2023, and after a lot of work and iterations and -designing, we finally got it to a stage that we could publish a first +collaboration back in 2023, and after a lot of work, +we finally got it to a stage that we could publish a first version to CRAN. The package has two aims (as described in the package @@ -45,31 +45,31 @@ The package has two aims (as described in the package ## Who is it for and why use it? The main reason for building the `osdc` package was to provide a tool -for researchers doing diabetes research with Danish register data. There +for researchers doing diabetes research with Danish register data to classify diabetes. There are no Danish registers that fully captures the different ways that a person could be classified with diabetes, as administrative diagnosis -data is not always complete nor accurate. So researchers have had to +data is not always complete nor accurate. So, researchers have had to develop different algorithms to get a better idea of who has diabetes in the Danish registers. However, these algorithms have not been open source, and they have not been packaged into reusable tools. Which has lead to many researchers -having "in-house" solutions for their group or organisation, but that +having different "in-house" solutions for their group or organisation that other groups can't really use effectively. We wanted to change that. -So we built the `osdc` package with all the necessary details for -researchers to easily classify diabetes status in their own Danish -register data. That includes providing a list of which registers and +So, we built the `osdc` package with all the necessary details for +researchers to classify diabetes status in their own Danish +register data. For example, the package provides a list of which registers and variables are needed with the use of the `registers()` function. Other -that a few other helper functions, the main function of the package is +than a few other helper functions, the main function of the package is `classify_diabetes()`, which takes all the required registers and outputs a data frame with a list of individuals, their diabetes status, and the date when the classification was made. -Aside from those functions, there's also a function that lists all the -specific criteria used in the algorithm in the function `algorithm()`. -This makes it very easy for others to assess how exactly we classified +Aside from those functions, the package provides an `algorithm()` function that lists all the +specific criteria used in the algorithm. +This makes it easier for others to assess how exactly the algorithm classifies diabetes. -Anyway, next step is to start using them in collaborating projects that +The next step is to start using the osdc package in collaborating projects that use Denmark Statistics and register data :tada: From b5fa5b196df3391b8b017a4152c5b02459754d67 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Fri, 19 Dec 2025 16:25:25 +0100 Subject: [PATCH 3/4] fix: :pencil2: don't use backticks for osdc --- posts/published-osdc/index.qmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posts/published-osdc/index.qmd b/posts/published-osdc/index.qmd index 61447ab..f3d8cf6 100644 --- a/posts/published-osdc/index.qmd +++ b/posts/published-osdc/index.qmd @@ -18,7 +18,7 @@ On December 10th, 2025, we finally published our first R package to [CRAN](https://cran.r-project.org/)! :tada: The package is called -[`osdc`](https://cran.r-project.org/web/packages/osdc/index.html), or +[osdc](https://cran.r-project.org/web/packages/osdc/index.html), or "Open Source Diabetes Classifier", and it is our first package that we've built in collaboration with an external researcher, [Anders Aasted Isaksen](https://www.stenoaarhus.dk/kontakt/anders-aasted-isaksen/). He @@ -44,7 +44,7 @@ The package has two aims (as described in the package ## Who is it for and why use it? -The main reason for building the `osdc` package was to provide a tool +The main reason for building the osdc package was to provide a tool for researchers doing diabetes research with Danish register data to classify diabetes. There are no Danish registers that fully captures the different ways that a person could be classified with diabetes, as administrative diagnosis @@ -57,7 +57,7 @@ been packaged into reusable tools. Which has lead to many researchers having different "in-house" solutions for their group or organisation that other groups can't really use effectively. We wanted to change that. -So, we built the `osdc` package with all the necessary details for +So, we built the osdc package with all the necessary details for researchers to classify diabetes status in their own Danish register data. For example, the package provides a list of which registers and variables are needed with the use of the `registers()` function. Other From a1e4ebf69760ffa91359b50ce5e0ccc560c76a05 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Fri, 19 Dec 2025 16:26:05 +0100 Subject: [PATCH 4/4] style: :art: format Markdown --- posts/published-osdc/index.qmd | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/posts/published-osdc/index.qmd b/posts/published-osdc/index.qmd index f3d8cf6..959b6b4 100644 --- a/posts/published-osdc/index.qmd +++ b/posts/published-osdc/index.qmd @@ -25,9 +25,8 @@ Isaksen](https://www.stenoaarhus.dk/kontakt/anders-aasted-isaksen/). He developed an algorithm to classify type 1 and type 2 diabetes using Danish registers as data sources, and we worked together to turn this algorithm into an R package that others can use. We started the -collaboration back in 2023, and after a lot of work, -we finally got it to a stage that we could publish a first -version to CRAN. +collaboration back in 2023, and after a lot of work, we finally got it +to a stage that we could publish a first version to CRAN. The package has two aims (as described in the package [documentation](https://steno-aarhus.github.io/osdc/)): @@ -44,32 +43,33 @@ The package has two aims (as described in the package ## Who is it for and why use it? -The main reason for building the osdc package was to provide a tool -for researchers doing diabetes research with Danish register data to classify diabetes. There -are no Danish registers that fully captures the different ways that a -person could be classified with diabetes, as administrative diagnosis -data is not always complete nor accurate. So, researchers have had to -develop different algorithms to get a better idea of who has diabetes in -the Danish registers. +The main reason for building the osdc package was to provide a tool for +researchers doing diabetes research with Danish register data to +classify diabetes. There are no Danish registers that fully captures the +different ways that a person could be classified with diabetes, as +administrative diagnosis data is not always complete nor accurate. So, +researchers have had to develop different algorithms to get a better +idea of who has diabetes in the Danish registers. However, these algorithms have not been open source, and they have not been packaged into reusable tools. Which has lead to many researchers -having different "in-house" solutions for their group or organisation that -other groups can't really use effectively. We wanted to change that. +having different "in-house" solutions for their group or organisation +that other groups can't really use effectively. We wanted to change +that. So, we built the osdc package with all the necessary details for -researchers to classify diabetes status in their own Danish -register data. For example, the package provides a list of which registers and +researchers to classify diabetes status in their own Danish register +data. For example, the package provides a list of which registers and variables are needed with the use of the `registers()` function. Other than a few other helper functions, the main function of the package is `classify_diabetes()`, which takes all the required registers and outputs a data frame with a list of individuals, their diabetes status, and the date when the classification was made. -Aside from those functions, the package provides an `algorithm()` function that lists all the -specific criteria used in the algorithm. -This makes it easier for others to assess how exactly the algorithm classifies -diabetes. +Aside from those functions, the package provides an `algorithm()` +function that lists all the specific criteria used in the algorithm. +This makes it easier for others to assess how exactly the algorithm +classifies diabetes. -The next step is to start using the osdc package in collaborating projects that -use Denmark Statistics and register data :tada: +The next step is to start using the osdc package in collaborating +projects that use Denmark Statistics and register data :tada: