{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# 2 | SOURCES OF HEALTH DATA" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

This chapter of an Introduction to Health Data Science by Dr JH Klopper is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International

" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Python packages used in this notebook" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas\n", "import wbgapi as wb" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%config InlineBackend.figure_format = 'retina'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from plotly import express, io" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "io.templates.default = 'gridon'" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Data has become a vital compass guiding our understanding and decision-making processes. From busy hospitals to the office of research laboratories, and even in our own homes, health data is being generated, collected, and analyzed. But where does all this data come from? What are the sources feeding this complex informational ecosystem?" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In this chapter we explore the diverse sources of health data, examining the electronic health records that capture our interactions with the healthcare system, delving into the world of public health surveys that paint a picture of our collective health, and even exploring the data captured by wearable devices that monitor our every step and heartbeat." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We showcase the World Bank as source of open data and see how easy it can be to use Python to access this data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The chapter concludes with a discussion the importance of these data sources in improving patient care, informing public health policies, and advancing medical research." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Access to health data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Any data science or research projects requires data. Information about the health of individuals and populations is no exception. Access to health data is underscored by a fundamental question: _How do we access health data?_." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Health data, pertaining specifically to access, is often divided into two categories, namely __open data__ and __restricted data__. Open data is data that is freely available to the public, whereas restricted data is data that is not freely available to the public." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Restricted health data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "__Restricted health data__ refers to health-related information that has limitations or restrictions on its access, use, or distribution. These restrictions are often in place to protect the privacy and confidentiality of individuals, to ensure data security, and to comply with legal and ethical guidelines." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Restricted health data often includes identifiable or potentially identifiable information. This could be direct identifiers, like names or social security numbers, or indirect identifiers, like dates of birth or geographic information, which could potentially be used to identify an individual when combined with other data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Examples of restricted health data include certain types of electronic health records (EHRs), detailed insurance claims data, and certain types of research data. For instance, data from clinical trials often has restrictions on its use to protect the privacy of the trial participants." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Access to restricted health data typically requires approval from a data access committee or a similar governing body. This process often involves a review of the proposed use of the data to ensure it is in line with the data use agreement, which outlines the terms and conditions for accessing and using the data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In addition, those granted access to restricted health data are usually required to implement specific data security measures. This could include encrypting the data, storing it on secure servers, and limiting who has access to the data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "While the restrictions on this type of data can pose challenges for researchers and others who wish to use the data, they play a crucial role in protecting the privacy and confidentiality of individuals, which is of paramount importance in healthcare." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Open health data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "__Open health data__ refers to health-related data that is freely available for anyone to use, reuse, and redistribute. It's a concept that stems from the broader open data movement, which advocates for the availability of data that is free from restrictions on copyright, patents, or other mechanisms of control." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In the context of healthcare, open health data can encompass a wide variety of data types. This includes, but is not limited to, clinical data from electronic health records, demographic and epidemiological data from public health surveys, genomic data from research studies, and health expenditure data from insurance claims." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "One of the key characteristics of open health data is that it is machine-readable. This means that the data is structured in a way that can be easily processed by a computer. This is important because it enables the data to be analyzed and used in applications, algorithms, and models." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Open health data has the potential to drive innovation and improve outcomes in healthcare. For example, researchers can use open health data to study patterns and trends in health conditions, healthcare providers can use it to benchmark their performance against others, and policymakers can use it to inform decisions about healthcare services and interventions." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "However, while open health data has many benefits, it also presents challenges. One of the main challenges is ensuring the privacy and confidentiality of individuals. Health data often contains sensitive information, and it's important that this information is protected. This means that open health data must be de-identified or anonymized to remove any information that could be used to identify individuals." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Another challenge is ensuring the quality and accuracy of open health data. The data must be reliable and valid to be useful. This requires robust data collection and management processes, as well as mechanisms for users to provide feedback and corrections." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Open health data is a powerful resource that can drive innovation and improve outcomes in healthcare. However, it's important that it is used responsibly, with careful consideration of privacy, confidentiality, and data quality." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Electronic Health Records" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "__Electronic Health Records__ (EHRs) are digital versions of a patient's paper charts. They are real-time, patient-centered records that make information available instantly and securely to authorized users. EHRs contain a patient's medical history, diagnoses, medications, treatment plans, immunization dates, allergies, radiology images, and laboratory and test results." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The advent of EHRs marked a significant shift in healthcare information management. Before EHRs, patient information was largely stored in paper records, which made it difficult to manage and share information. EHRs have transformed the way that healthcare providers access and use information. They have the potential to provide a more holistic and up-to-date view of a patient's health, improve the quality of care, and enhance patient safety." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "For instance, EHRs can help reduce errors by providing healthcare providers with accurate and complete information about a patient's health. This can help providers diagnose problems earlier and improve the overall quality of care. EHRs can also facilitate coordination of care among different healthcare providers, as they can easily share information about a patient's health." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "While EHRs offer many benefits, they also present challenges. These include issues related to data privacy and security, the interoperability of different EHR systems, and the usability of EHR software. Addressing these challenges is crucial for realizing the full potential of EHRs." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Looking ahead, the future of EHRs is likely to be shaped by advancements in areas like artificial intelligence, machine learning, and predictive analytics. These technologies have the potential to further enhance the capabilities of EHRs, enabling even more personalized and effective care." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "EHRs have revolutionized healthcare information management, providing a more efficient and effective way to store, access, and use health information. They offer numerous benefits, from improving the quality of care to enhancing patient safety. However, challenges related to data privacy, interoperability, and usability need to be addressed to fully leverage the potential of EHRs. With advancements in technology, the future of EHRs looks promising, with the potential for even more personalized and effective care." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Examples of EHRs" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "There are numerous EHR software systems available today, each with its own set of features, capabilities, and specialties. Some of the most widely used EHR systems include are listed below.\n", "\n", "1. **Epic Systems**: Epic is one of the most well-known EHR systems and is used by many large hospitals and health systems. It offers a wide range of features, including care management, patient engagement, and population health management.\n", "\n", "2. **Cerner**: Cerner's EHR system is used by healthcare organizations of all sizes. It offers solutions for clinical, financial, and operational needs.\n", "\n", "3. **Allscripts**: Allscripts offers EHR solutions for practices of all sizes. It provides features like practice management, revenue cycle management, and population health management.\n", "\n", "4. **Meditech**: Meditech's EHR system is used by a wide range of healthcare organizations, from small rural hospitals to large multi-site health systems. It offers a fully integrated suite of solutions, including clinical, financial, and administrative applications." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Public health surveys" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Public health surveys are a critical instrument in the field of public health, providing valuable data on the health status, behaviors, and needs of populations. These surveys are designed to collect information from a representative sample of a population, and the data collected is used to infer conclusions about the health of the entire population." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Understanding the importance of public health surveys" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Public health surveys play a pivotal role in informing health policies, planning health services, and monitoring and evaluating health interventions. They provide insights into the prevalence and distribution of health conditions, risk factors, health behaviors, and the utilization of health services in a population." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "For instance, public health surveys can help identify health disparities among different population groups, track changes in health behaviors over time, and evaluate the impact of public health interventions. The data collected through these surveys can guide decision-making and resource allocation in public health, helping to ensure that efforts are targeted where they are most needed." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Examples of public health survey" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "There are numerous public health surveys conducted on a regular basis. Three are listed below." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "1. **Behavioral Risk Factor Surveillance System (BRFSS)**: Conducted by the Centers for Disease Control and Prevention (CDC), the BRFSS is the largest continuously conducted health survey system in the world. It collects data on health-related behaviors, chronic health conditions, and use of preventive services from adults in the United States.\n", "\n", "2. **National Health and Nutrition Examination Survey (NHANES)**: Also conducted by the CDC, NHANES combines interviews and physical examinations to assess the health and nutritional status of adults and children in the United States.\n", "\n", "3. **Health Survey for England (HSE)**: The HSE is a series of annual surveys designed to monitor trends in the nation’s health. It provides data on a range of health and care issues." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Challenges and future direction" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "While public health surveys are a valuable tool, they also present challenges. These include issues related to survey design, data collection, and data analysis. For instance, ensuring that the survey sample is representative of the population is crucial for the validity of the findings. There are also challenges related to response rates and the accuracy of self-reported data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Looking ahead, advancements in technology offer new opportunities for public health surveys. For example, digital technologies can enable more efficient data collection and analysis, and the use of mobile devices can facilitate the collection of real-time data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Public health surveys are a vital tool in the field of public health, providing valuable data on the health status, behaviors, and needs of populations. While they present challenges, they also offer immense potential for informing health policies, planning health services, and monitoring and evaluating health interventions. As technology continues to advance, the future of public health surveys looks promising, with the potential for even more efficient and timely data collection and analysis." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Wearable devices" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Wearable devices, such as smartwatches, fitness trackers, and health monitors, have become increasingly popular in recent years. These devices offer a new and exciting way to collect health data, providing insights into individual and population health that were previously difficult or impossible to obtain." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Wearable devices can continuously monitor a variety of health-related parameters, including heart rate, sleep patterns, and physical activity. For example, a smartwatch might track a user's steps, heart rate, and sleep, while a wearable glucose monitor can provide real-time information on a diabetic patient's blood glucose levels." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This data can be incredibly valuable. On an individual level, it can help people monitor their own health and fitness, track changes over time, and make informed decisions about their lifestyle. For healthcare providers, the data can provide a more comprehensive view of a patient's health, supplementing traditional clinical data and potentially improving the quality of care." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Positive Uses of Wearable Device Data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "1. The data collected by wearable devices has a wide range of potential uses. In healthcare, it can be used to monitor patients with chronic conditions, track the progress of rehabilitation programs, or even predict health problems before they occur. For example, a recent study found that data from a smartwatch could be used to predict episodes of atrial fibrillation, a common heart rhythm disorder." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "2. In research, wearable device data can provide valuable insights into population health. For instance, researchers have used data from fitness trackers to study patterns of physical activity and sleep in different populations." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "3. In public health, wearable device data could be used to track and manage the spread of diseases. During the COVID-19 pandemic, some researchers have been exploring whether data from wearable devices could help detect early signs of the virus." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### Concerns with Wearable Device Data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "1. Despite the potential benefits, the use of wearable device data also raises important concerns. One of the main concerns is privacy. Health data is sensitive, and there are legitimate concerns about how this data is stored, who has access to it, and how it is used." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "2. Another concern is data accuracy. While wearable devices can provide a wealth of data, the accuracy of this data can vary. For instance, a fitness tracker might not be as accurate in measuring physical activity as more sophisticated equipment in a laboratory." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "3. Finally, there is the issue of data interpretation. The data from wearable devices can be complex and difficult to interpret, and there is a risk that it could be misinterpreted or misused without appropriate expertise." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Wearable devices offer a new and exciting way to collect health data, with a wide range of potential uses in healthcare, research, and public health. However, it's important to address the challenges and concerns associated with this data, including privacy, data accuracy, and data interpretation. With careful management and appropriate safeguards, wearable devices have the potential to revolutionize the way we collect and use health data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Sources of open health data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "There are numerous open online health data repositories that provide access to a wide range of health-related data. These repositories are often maintained by government agencies, research institutions, or other organizations. They typically provide data in a variety of formats, including spreadsheets, databases, and APIs." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Note that while these repositories provide open access to their data, they may still require users to agree to certain terms and conditions to ensure the responsible use of the data." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "1. [ClinicalStudyDataRequest.com](https://www.clinicalstudydatarequest.com/): This is a generalist repository that offers researchers managed access to clinical trial data. It operates on a managed access or gatekeeper model, requiring a research proposal, agreement to data use, and undergoing a review process for data access." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "2. [HealthData.gov](https://www.healthdata.gov/): This is a U.S. government's open data site that provides access to numerous datasets related to health. The data is collected from various agencies and is available for public use." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "3. [Global Health Observatory data repository](https://www.who.int/data/gho): This is the World Health Organization's (WHO) gateway to health-related statistics for more than 1000 indicators for its 194 Member States. The data covers themes such as mortality and burden of diseases, the Millennium Development Goals (child nutrition, child health, maternal and reproductive health, immunization, HIV/AIDS, tuberculosis, malaria, neglected diseases, water and sanitation), non-communicable diseases and risk factors, epidemic-prone diseases, health systems, environmental health, violence and injuries, equity among others." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "4. [Humanitarian Data Exchange (HDX)](https://data.humdata.org/): This is an open platform for sharing data across crises and organizations. The site offers access to datasets covering health and other sectors from numerous countries around the world." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "5. [CDC's National Center for Health Statistics](https://www.cdc.gov/nchs/index.htm): This is the U.S. government's principal health statistics agency. It provides data on a wide range of health indicators such as birth and death rates, infant mortality, health insurance coverage, vaccination, mental health, and many others." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "6. [European Union Open Data Portal](https://data.europa.eu/euodp/en/data/): This portal provides access to open data published by EU institutions and bodies. The health section includes data on public health, health care, pharmaceuticals, and other topics." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "7. [UK's NHS Digital](https://digital.nhs.uk/data-and-information): NHS Digital is the national provider of information, data, and IT systems for health and social care in the UK. It offers a wide range of data and reports on health and social care." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "8. [The Cancer Imaging Archive (TCIA)](https://www.cancerimagingarchive.net/): TCIA is a service that de-identifies and hosts a large archive of medical images of cancer accessible for public download. The data are organized as “collections”; typically patients’ imaging related by a common disease (e.g. lung cancer), image modality or type (MRI, CT, digital histopathology, etc) or research focus. Supporting data related to the images such as patient outcomes, treatment details, genomics, pathology, and expert analyses are also provided when available." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## World Bank Open Data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The World Bank Open Data repositories serves as a good example of accessing and using open data. The World Bank Open Data Repositories provides free and open access to data about development in countries around the globe. It is a comprehensive source of data about development, including data on population, health, education, the environment, and much more." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "The World Bank provides an application programming interface for their data. Many language, including Python, have packages that can be used to access the World Bank data. Once such Python package is `wbgapi`. More information about this package can be found at the [World Bank Blogs page](https://blogs.worldbank.org/opendata/introducing-wbgapi-new-python-package-accessing-world-bank-data)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Dowlnoad all the World Bank indicators as a pandas dataframe assigned to the variable series\n", "series = wb.series.Series()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "AG.AGR.TRAC.NO Agricultural machinery, tractors\n", "AG.CON.FERT.PT.ZS Fertilizer consumption (% of fertilizer produc...\n", "AG.CON.FERT.ZS Fertilizer consumption (kilograms per hectare ...\n", "AG.LND.AGRI.K2 Agricultural land (sq. km)\n", "AG.LND.AGRI.ZS Agricultural land (% of land area)\n", "Name: SeriesName, dtype: object" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# View the first 5 rows of the series dataframe\n", "series.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Dowload all the World Bank topics as a pandas dataframe assigned to the variable topics\n", "topics = wb.topic.Series()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1 Agriculture & Rural Development\n", "2 Aid Effectiveness\n", "3 Economy & Growth\n", "4 Education\n", "5 Energy & Mining\n", "Name: TopicName, dtype: object" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# List the first 5 rows of the topics dataframe\n", "topics.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1478,)" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Display the number of rows and columns in the series dataframe\n", "series.shape" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Download the 15 most recent data points for the US population as a pandas dataframe assigned to the variable us_population\n", "us_population = wb.data.DataFrame('SP.POP.TOTL', 'USA', mrv=15) # The dataframe object that is returned is in wide format" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Transpose the us_population dataframe\n", "us_population = us_population.T" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
economyUSA
YR2007301231207.0
YR2008304093966.0
YR2009306771529.0
YR2010309327143.0
YR2011311583481.0
\n", "
" ], "text/plain": [ "economy USA\n", "YR2007 301231207.0\n", "YR2008 304093966.0\n", "YR2009 306771529.0\n", "YR2010 309327143.0\n", "YR2011 311583481.0" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# View the first 5 rows of the us_population dataframe\n", "us_population.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Remove the first two letters from each index\n", "us_population.index = us_population.index.str[2:]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set the index as a datetime index\n", "us_population.index = pandas.to_datetime(us_population.index)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
economyUSA
2007-01-01301231207.0
2008-01-01304093966.0
2009-01-01306771529.0
2010-01-01309327143.0
2011-01-01311583481.0
\n", "
" ], "text/plain": [ "economy USA\n", "2007-01-01 301231207.0\n", "2008-01-01 304093966.0\n", "2009-01-01 306771529.0\n", "2010-01-01 309327143.0\n", "2011-01-01 311583481.0" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Display the first 5 rows of the us_population dataframe\n", "us_population.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "economy=USA
Year=%{x}
Population=%{y}", "legendgroup": "USA", "line": { "color": "#1F77B4", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines", "name": "USA", "orientation": "v", "showlegend": true, "type": "scatter", "x": [ "2007-01-01T00:00:00", "2008-01-01T00:00:00", "2009-01-01T00:00:00", "2010-01-01T00:00:00", "2011-01-01T00:00:00", "2012-01-01T00:00:00", "2013-01-01T00:00:00", "2014-01-01T00:00:00", "2015-01-01T00:00:00", "2016-01-01T00:00:00", "2017-01-01T00:00:00", "2018-01-01T00:00:00", "2019-01-01T00:00:00", "2020-01-01T00:00:00", "2021-01-01T00:00:00" ], "xaxis": "x", "y": [ 301231207, 304093966, 306771529, 309327143, 311583481, 313877662, 316059947, 318386329, 320738994, 323071755, 325122128, 326838199, 328329953, 331501080, 331893745 ], "yaxis": "y" } ], "layout": { "legend": { "title": { "text": "economy" }, "tracegroupgap": 0 }, "showlegend": false, "template": { "data": { "pie": [ { "automargin": true, "type": "pie" } ] }, "layout": { "xaxis": { "showgrid": true, "title": { "standoff": 15 } }, "yaxis": { "showgrid": true, "title": { "standoff": 15 } } } }, "title": { "text": "US Population" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Year" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Population" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Create a line plot of the US population using the plotly express line function\n", "express.line(\n", " us_population,\n", " title='US Population',\n", " labels={'index': 'Year', 'value': 'Population'}\n", ").update_layout(\n", " showlegend=False\n", ").show()" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## The benefits of open health data" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Data has become a powerful tool that can drive significant changes in various sectors, including healthcare. Open health data, which refers to health-related data that is freely available for anyone to use, reuse, and redistribute, is playing an increasingly important role in healthcare. It has the potential to improve patient care, inform public health policies, and advance medical research." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "When it comes to patient care, open health data can provide healthcare providers with a wealth of information that can help them make better decisions. For example, data from electronic health records can give providers a comprehensive view of a patient's health history, helping them diagnose conditions more accurately and prescribe treatments that are more likely to be effective. Similarly, data from wearable devices can provide real-time insights into a patient's health status, enabling providers to monitor patients remotely and intervene promptly when necessary. By providing a more complete and up-to-date picture of a patient's health, open health data can enhance the quality of care and improve patient outcomes." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Open health data can also play a crucial role in informing public health policies. By providing insights into the health status, behaviors, and needs of populations, it can help policymakers identify public health issues, understand their causes, and develop strategies to address them. For instance, data from public health surveys can reveal trends in health behaviors, such as smoking or physical activity, which can inform the development of public health campaigns. Similarly, data on the prevalence and distribution of diseases can help policymakers allocate resources more effectively, targeting areas with the greatest need." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In medical research, open health data is a valuable resource that can fuel new discoveries and innovations. Researchers can use this data to study patterns and trends in health conditions, identify risk factors for diseases, and investigate the effectiveness of treatments. For example, genomic data can help researchers understand the genetic basis of diseases, paving the way for the development of personalized treatments. Similarly, clinical trial data can provide insights into the safety and efficacy of new drugs and interventions. By making health data openly available, we can accelerate the pace of medical research and bring about advances that can benefit patients around the world." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "While the potential benefits of open health data are immense, it's important to use this data responsibly. Issues related to data privacy, security, and quality need to be addressed to ensure that the use of open health data is ethical and that the data is reliable. With appropriate safeguards in place, open health data can be a powerful tool that can transform healthcare, benefiting patients, providers, policymakers, and researchers alike." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Open health data is a transformative force in healthcare. It has the potential to improve patient care, inform public health policies, and advance medical research. As we continue to generate and collect more health-related data, the role of open health data in healthcare will only become more important. The future of healthcare is data-driven, and open health data will be at the forefront of this transformation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "datascience", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.1" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }