Skip to content

Commit

Permalink
Merge pull request #12 from paulheider/i2_screenshots_in_readme
Browse files Browse the repository at this point in the history
Issue #2: screenshots in readme
  • Loading branch information
paulheider authored Apr 6, 2017
2 parents 450035f + 898fe6a commit 1813c6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ShinyBudgetAnalysis

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
-------------
Expand All @@ -26,6 +27,9 @@ Running this Shiny app requires a few configuration steps.
3. Find all the `CHANGEME` entries in the R files and update them with your preferred values
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" )

Expand All @@ -35,4 +39,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 )
```

12 changes: 12 additions & 0 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) %>%
Expand All @@ -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 )
})

Expand All @@ -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 ) ) )
)

Expand Down

0 comments on commit 1813c6c

Please sign in to comment.