-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhypertension_dashboard.Rmd
115 lines (83 loc) · 2.93 KB
/
hypertension_dashboard.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
title: "Hypertension Data Viz"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(readr)
library(ggplot2)
library(plotly)
library(tidyverse)
library(dplyr)
```
# Home
## column {data-width = 500}
### Hypertension
```{r}
```
# Diseases
## Column {data-width=3000, .tabset}
-----------------------------------------------------------------------
### Age Group/Gender
```{r}
```
### Sub-types of Disease
```{r}
hypertension_subtype <- read_csv("C:/Users/Dell/Downloads/hypertension/hypertension_subtype.csv")
subtype <- hypertension_subtype%>%
group_by(label) %>%
plot_ly(labels = ~label,
values = ~count,
marker = list(colors = rainbow)) %>%
add_pie(hole = 0.4) %>%
layout(title = "Hypertension Patients- Subtype", xaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F),yaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F))
subtype
```
### Comorbidities
```{r}
hypertension_comorbidities<-read_csv("C:/Users/Dell/Downloads/hypertension/hypertension_comorbidities.csv")
comorbidities<- hypertension_comorbidities%>%
group_by(label2) %>%
plot_ly(labels = ~label2,
values = ~count,
marker = list(colors = rainbow)) %>%
add_pie(hole = 0.4) %>%
layout(title = "Hypertension Patients- Comorbodities", xaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F),yaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F))
comorbidities
```
### Symptoms
```{r}
hypertension_symptoms <- read_csv("C:/Users/Dell/Downloads/hypertension/hypertension_symptoms.csv")
hypertension_symptoms$label<- reorder(x = hypertension_symptoms$label, X= hypertension_symptoms$count)
hypertension_symptoms$label <- with(hypertension_symptoms, reorder(label, count))
colnames(hypertension_symptoms)[colnames(hypertension_symptoms)== "label"] <- "Symptoms"
data <- hypertension_symptoms %>%
#rename(symp= "label")
ggplot(aes(x = count, y = Symptoms,fill = Symptoms))+
geom_col()+
labs(title = "Symptoms of Patients")
ggplotly(data)
```
### Drug Usage
```{r}
hypertension_drug_usage <-read_csv("C:/Users/Dell/Downloads/hypertension/hypertension_drug_usage.csv")
drug_usage <- hypertension_drug_usage %>%
group_by(label) %>%
plot_ly(labels = ~label,
values = ~count,
marker = list(colors = rainbow)) %>%
add_pie(hole = 0.4) %>%
layout(title = "Hypertension Patients- Drug Usage", xaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F),yaxis = list(zeroline = F,showline = F, showticklabels = F,showgrid = F))
drug_usage
```
### Treatment Phase Drug
```{r}
```
### Treatment Journey
```{r}
```
Column {data-width=350}
-----------------------------------------------------------------------