Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
covid19
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
numeroteca
covid19
Commits
d8c0d712
Commit
d8c0d712
authored
Feb 15, 2021
by
numeroteca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix daily cases charts in CCAA dashboard
parent
df149cc9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
40 deletions
+42
-40
analysis/charts_spain_ccaa.R
analysis/charts_spain_ccaa.R
+2
-1
dashboard/ccaa.Rmd
dashboard/ccaa.Rmd
+8
-7
dashboard/ccaa.html
dashboard/ccaa.html
+32
-32
No files found.
analysis/charts_spain_ccaa.R
View file @
d8c0d712
...
...
@@ -830,7 +830,8 @@ dev.off()
# PCR+------
png
(
filename
=
paste
(
"img/spain/ccaa/covid19_casos-PCR-por-dia-ccaa-media-superpuesto-lineal_media.png"
,
sep
=
""
),
width
=
1200
,
height
=
800
)
data_cases_sp_provinces
%>%
mutate
(
daily_cases_PCR_avg7
=
ifelse
(
province
==
"Galicia"
|
province
==
"Andalucía"
|
province
==
"Aragón"
|
province
==
"País Vasco"
|
province
==
"C. Valenciana"
,
daily_cases_avg7
,
daily_cases_PCR_avg7
)
daily_cases_PCR_avg7
=
ifelse
(
province
==
"Galicia"
|
province
==
"Andalucía"
|
province
==
"Aragón"
|
province
==
"País Vasco"
|
province
==
"C. Valenciana"
,
daily_cases_avg7
,
daily_cases_PCR_avg7
)
)
%>%
ggplot
()
+
# geom_smooth(aes(date, daily_cases_avg7,group=ccaa, color=ccaa), size= 1, se = FALSE, span = 0.6 ) +
...
...
dashboard/ccaa.Rmd
View file @
d8c0d712
...
...
@@ -250,10 +250,10 @@ Row {.tabset .tabset-fade}
### Casos / día
```{r}
interactive_dp <- data_cases_sp_provinces
%>%
mutate(
daily_cases_PCR_avg7 = ifelse( date > as.Date("2020-10-02") & is.na(daily_cases_PCR_avg7), daily_cases_avg7, daily_cases_PCR_avg7
)
) %>%
filter( !(is.na(daily_cases_PCR_avg7) & date > as.Date("2020-08-10") ) ) %>%
interactive_dp <- data_cases_sp_provinces
%>% mutate(
daily_cases_PCR_avg7 = ifelse( province =="Galicia" | province =="Andalucía" | province =="Aragón" | province =="País Vasco" |
province =="C. Valenciana", daily_cases_avg7, daily_cases_PCR_avg7
)
) %>%
ggplot() +
geom_line(aes(date, daily_cases_PCR_avg7, group = province, color=ccaa,
text = paste0("<b>", province, " (", ccaa, ")</b><br>", format( round(daily_cases_PCR_avg7, digits = 1),
...
...
@@ -383,9 +383,10 @@ Se usan casos PCR+, menos las CCAA que empezaron a usar test de antígenos a par
### Casos / día Log
```{r}
interactive_dp <- data_cases_sp_provinces %>% mutate(
daily_cases_PCR_avg7 = ifelse( date > as.Date("2020-10-02") & is.na(daily_cases_PCR_avg7), daily_cases_avg7, daily_cases_PCR_avg7 )
) %>% filter( !(is.na(daily_cases_PCR_avg7) & date > as.Date("2020-08-10") ) ) %>%
interactive_dp <- data_cases_sp_provinces %>% mutate(
daily_cases_PCR_avg7 = ifelse( province =="Galicia" | province =="Andalucía" | province =="Aragón" | province =="País Vasco" |
province =="C. Valenciana", daily_cases_avg7, daily_cases_PCR_avg7)
) %>%
ggplot() +
geom_line(aes(date, daily_cases_PCR_avg7, group = province, color=ccaa,
text = paste0("<b>", province, " (", ccaa, ")</b><br>", format( round(daily_cases_PCR_avg7, digits = 1),
...
...
dashboard/ccaa.html
View file @
d8c0d712
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment