[Stacomir-commits] r566 - / pkg/stacomir/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 3 13:59:22 CEST 2020
Author: briand
Date: 2020-08-03 13:59:22 +0200 (Mon, 03 Aug 2020)
New Revision: 566
Modified:
/
pkg/stacomir/R/report_mig_interannual.R
Log:
ticket#57 problem of number in seaonal graph report_mig_interannual
-------------------------------------------------------------------
fixed #57. The sum was performed on all terms of the t_bilamigrationjournalier_bjo instead of only selecting the
Effectif_total rows. This problem has been fixed, the report_mig_mult interannual seasonal graph now reports the right numbers.
Index:
===================================================================
--- 2020-08-03 10:18:50 UTC (rev 565)
+++ 2020-08-03 11:59:22 UTC (rev 566)
Property changes on:
___________________________________________________________________
Added: svn:global-ignores
## -0,0 +1 ##
+.dbeaver
Modified: pkg/stacomir/R/report_mig_interannual.R
===================================================================
--- pkg/stacomir/R/report_mig_interannual.R 2020-08-03 10:18:50 UTC (rev 565)
+++ pkg/stacomir/R/report_mig_interannual.R 2020-08-03 11:59:22 UTC (rev 566)
@@ -985,11 +985,11 @@
dat3<-fn_getbacktodate(dat=dat3,
col=c("Q0","Q5","Q50","Q95","Q100","d90"),
timesplit_=timesplit)
- datadic1<-dplyr::select_(datadic,timesplit,"bjo_annee","bjo_valeur")
- datadic1<-dplyr::group_by_(datadic1, "bjo_annee",timesplit)
+ datadic1<-dplyr::select_(datadic,timesplit,"bjo_annee","bjo_valeur","bjo_labelquantite")
+ datadic1<-dplyr::group_by_(datadic1, "bjo_annee",timesplit,"bjo_labelquantite")
datadic1<-dplyr::summarize(datadic1,bjo_valeur=sum(bjo_valeur))
- datadic1<-dplyr::ungroup(datadic1)
- g<-ggplot(data=datadic1)+
+ datadic1<-dplyr::ungroup(datadic1) %>% dplyr::filter(bjo_labelquantite=="Effectif_total")
+ g <- ggplot(data=datadic1)+
geom_rect(aes(xmin = Q0,xmax = Q100,ymin=year-0.5,ymax=year+0.5),fill="grey90",data=dat3)+
geom_tile(aes_string(x=timesplit,y="bjo_annee", fill = "bjo_valeur"),color=ifelse(timesplit=="jour","transparent","grey80"))+
scale_fill_distiller(palette = "Spectral", name="Effectif")+
More information about the Stacomir-commits
mailing list