JCS Analytics
JCS Analytics
  • Home
  • About
  • Privacy

JCS Analytics - We are analysts. We Ask. We Automate. We Discover.

Details
By J. Smith
J. Smith
Articles
November 23,2024
Last Updated: 21 December 2025
Hits: 889
  • Python
  • CGM Data Management
  • Glucose Data Analysis
  • Continuous Glucose Monitor
  • Data Preparation

Working with CGM Data: Part 1 – Building the Base Dataset with Python

# Import packages

# For data manipulation
import numpy as np
import pandas as pd

# for displaying and modifying the working directory
import os as os

# For working with datetime objects
from datetime import datetime

Abstract

Managing continuous glucose monitor (CGM) data efficiently becomes increasingly challenging as datasets grow larger. This post details a streamlined approach for preparing a base dataset to facilitate CGM data analysis. Key steps include optimizing the data download process, filtering relevant information, formatting and enriching the dataset, and preparing it for visualization. By implementing these methods, you can reduce redundancy, ensure data integrity, and create a foundation for meaningful analysis and visualization.

Key Points

  • Challenge: Daily downloads of the full dataset became impractical as the dataset grew larger.
  • Solution: Store historical data in a CSV file and append only new data, reducing download time and storage needs.
  • Filtering: Retain only relevant columns and rows (e.g., glucose readings) while discarding unnecessary metadata and non-glucose entries.
  • Formatting: Standardize columns, extract additional fields, and add a Treatment column to enrich the dataset.
  • Validation: Check for missing dates, remove duplicates, and ensure data consistency.
  • Output: Save processed data in two formats—complete history for records and a 90-day subset for visualization in Tableau.

Read more: Working with CGM Data: Part 1 – Building the Base Dataset with Python

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

Page 9 of 9

Recent Activity

June 2026

  • Novo Nordisk IT Incident Shows Why Pseudonymized Data Still Requires Serious Protection

May 2026

  • Lundbeck’s AI Days Show How Companies Can Make AI Adoption Practical
  • Sovereign AI Infrastructure and the New Shape of AI Strategy
  • Why I Take Medical Courses as a Data Analyst

April 2026

  • Novo Nordisk Expands Its AI Strategy Through New OpenAI Partnership

Articles

  • 5K@EASD Race Results: Trends from 2023 and 2024
  • Adapting the 5K@ADA Race Results Project for 2025
  • Advanced Data Retrieval with Python
  • Aligning CGM and BGM Readings Using Python and Tableau
  • Analysis and Visualization of Public Health Agency of Canada COVID Cases
  • Bridging Data and Healthcare in the Nordics
  • Complex Web Scraping with Python
  • Creating a Calculated Field in Tableau to Get Get Data Aggregated by Month in the Correct Order
  • Data Analyst vs. Business Analyst: Similarities and Differences
  • Data Analytics for Type 2 Diabetes
  • Data Science and Responsible AI in the Pharmaceutical Industry: A Case Study of Novo Nordisk
  • Denmark's Leap into AI Innovation: A Model for Future Research and Development
  • Denmark’s Gefion AI Supercomputer Revolutionizes AI-driven Research
  • Eli Lilly’s AI Strategy: Opening High-Value Drug Discovery Models to the Biotech Ecosystem
  • Embracing AI: Balancing Augmentation, Ethics, and Environmental Impact
  • Enhancing Data Analysis and Visualization Workflows with AI
  • Exploring the 2023 5K@EASD Virtual Run: A Tableau Analysis
  • Exploring the Growth of GLP-1 RA Sales
  • How Novo Nordisk is Utilizing AI for Drug Discovery
  • How TELUS Transformed Data Analysis with Contact Center AI

Top Subjects

  • Tableau
  • Python
  • Data Analytics
  • Novo Nordisk
  • Tableau Visualizations
  • AI
  • 5K@EASD
  • Data Analysis
  • Data Visualization
  • 5K@ADA
  • Type 2 Diabetes
  • Data Cleaning
  • Data Analyst
  • Drug Discovery
  • AI Innovation
  • Quantum Computing
  • Diabetes Management
  • Race Results
  • Diabetes Awareness
  • Virtual 5K
  • SQLite
  • SQLite Database Management
  • Continuous Glucose Monitoring
  • Artificial Intelligence
  • AI in Healthcare
  • Healthcare Analytics
  • Healthcare Data
  • AI in Drug Discovery
  • NVIDIA
  • Responsible AI

Contact Me

Search

End Diabetes Stigma

5K@ADA

5K@EASD

World Diabetes Day

Rochen Web Hosting

Bluesky Social

  • You are here:  
  • Home
  • Articles
 
Copyright © 2026 JCS Analytics. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.