From 7538aaab289967d862110421f2e7164a90584557 Mon Sep 17 00:00:00 2001 From: "Paul M. Heider" Date: Thu, 6 Apr 2017 11:37:15 -0400 Subject: [PATCH 1/2] updated the README to reference wiki screens; added CHANGEME comments The CHANGEME comments are tied to bugs introduced by not having all categories present in the data that we expect (see issue #10). --- README.md | 6 +++++- server.R | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98d572a..2edc4ca 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ ShinyBudgetAnalysis A [https://shiny.rstudio.com](Shiny app) ([https://www.r-project.org](R)-based dashboard) that gives insight into your [https://www.gnucash.org/](GnuCash) budget habits over time. +Check the [https://github.com/paulheider/ShinyBudgetAnalysis/wiki](wiki) for sample screenshots. + Configuration ------------- @@ -32,6 +34,9 @@ Running this Shiny app requires a few configuration steps. 4. Launch the Shiny server from within your favorite R shell or program ```R + ## Load the shiny librar + library( "shiny" ) + ## Start the server and automatically launch my default browser to show the app runApp( "$SBA_DIR" ) @@ -41,4 +46,3 @@ Running this Shiny app requires a few configuration steps. ## As above but I'll open the app myself in an browser runApp( "$SBA_DIR" , display.mode = "showcase" , launch.browser = FALSE ) ''' - diff --git a/server.R b/server.R index c6760b4..713619e 100644 --- a/server.R +++ b/server.R @@ -25,6 +25,10 @@ shinyServer( group_by( Year , Month , AccountName , numMonth ) %>% summarise( Expenses = round( sum( In ) , 0 ) ) %>% spread( AccountName , Expenses ) %>% + ## CHANGEME: Consumables consist of the three categories 'booze', + ## 'groceries', and 'restaurants'. If you have different + ## category names for your consumables, add/replace as + ## required here and below. select( Month , Year , Booze , Groceries , Restaurants , numMonth ) %>% mutate( Total = sum( Booze , Groceries , Restaurants , na.rm = TRUE ) ) %>% arrange( Year , numMonth ) %>% @@ -34,6 +38,10 @@ shinyServer( plottable_consumables <- reactive({ per_month_consumables() %>% select( -Total ) %>% + ## CHANGEME: Consumables consist of the three categories 'booze', + ## 'groceries', and 'restaurants'. If you have different + ## category names for your consumables, add/replace as + ## required here, above, and below. gather( Type , Amount , Booze:Restaurants ) }) @@ -53,6 +61,10 @@ shinyServer( output$monthlyConsumablesTable <- renderDataTable( per_month_consumables() %>% select( -numMonth ) %>% + ## CHANGEME: Consumables consist of the three categories 'booze', + ## 'groceries', and 'restaurants'. If you have different + ## category names for your consumables, add/replace as + ## required here and above. rbind( c( "" , "" , sum( .$Booze ) , sum( .$Groceries ) , sum( .$Restaurants ) , sum( .$Total ) ) ) ) From fb7539939c2f8974da025c2d304daea22cf0e31a Mon Sep 17 00:00:00 2001 From: "Paul M. Heider" Date: Thu, 6 Apr 2017 11:41:08 -0400 Subject: [PATCH 2/2] I switched the order of the URLs in the markdown --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2edc4ca..d9ba480 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ ShinyBudgetAnalysis =================== -A [https://shiny.rstudio.com](Shiny app) ([https://www.r-project.org](R)-based dashboard) that gives insight into your [https://www.gnucash.org/](GnuCash) budget habits over time. - -Check the [https://github.com/paulheider/ShinyBudgetAnalysis/wiki](wiki) for sample screenshots. +A [Shiny app](https://shiny.rstudio.com) ([R](https://www.r-project.org)-based dashboard) that gives insight into your [GnuCash](https://www.gnucash.org/) budget habits over time. +Check the [wiki](https://github.com/paulheider/ShinyBudgetAnalysis/wiki) for sample screenshots. Configuration -------------