GithubHelp home page GithubHelp logo

ggtimeseries's People

Contributors

dasather avatar davidtedfordholt avatar jessevent avatar marcusvolz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ggtimeseries's Issues

Change Tile Border Size for Days and Month

Hi,
great package! I am using the function stat_calendar_heatmap and want to configure the size of a) the daily tiles and b) size of monthly tiles, i.e. the stroke width of the heatmaps / lines. Is this possible, if yes, how?
I have seen that this is possible in ggplot_calendar_heatmap but this function is not flexible enough for me.

Thanks

ggplot_calendar_heatmap() modifies data without warning

Hello, thank you for the helpful package.

Calling ggplot_calendar_heatmap() on a dataframe coerces it to class data.table permanently. This is surprising and unexpected behavior.

This also breaks code, because data.table overrides magritter / dplyr pipes, and completely changes the way the "." placeholder is treated.

Please make it so that ggplot_calendar_heatmap() does not modify data (as it shouldn't), or at a minimum, warn users with a message() that their data is being modified, or require them to convert to a data.table themselves.

Citation info

Would be better if available BibTeX citation info could be provided.

merge() creates NA values if date is POSIXct formatted

If date column is formatted as POSIXct, seq() function produces dates with daylight saving applied. This results in a sequence of days with hour components 23:00:00. When merge happens here

  dtDateValue = merge(dtDateValue, setnames(dtDateValue[ ,list(DateCol = seq(min(get(cDateColumnName)), max(get(cDateColumnName)),"days")), vcGroupingColumnNames], "DateCol", cDateColumnName),  c(vcGroupingColumnNames, cDateColumnName),  all = T)

dtDateValue is updated with NA values for days that have the daylight savings are applied.
2018-01-19 15_38_19- _gitlab_bike auckland - master - rstudio
Adding na.value = "white" to scale_fill_continuous() reveals those NA values like below.
rplot04
One solutions is that user formats the dates with as.Date() before plotting. Or, you might consider using as.POSIXct() with tz set to UTC in seq() and then merge.

Plotting "N/A" year when no values for that year exist

There are no NA values in the dataset, however this is plotting an N/A year.

require(ggTimeSeries)
#> Loading required package: ggTimeSeries
#> Loading required package: ggplot2
require(tidyverse)
#> Loading required package: tidyverse

x <- structure(list(year = c(2017, 2017, 2017, 2017, 2017, 2018, 2018, 
                             2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 
                             2018, 2018, 2018, 2018), 
                    date = structure(c(17479, 17480, 17483, 
                                       17505, 17528, 17534, 17569, 17581, 17591, 17611, 17639, 17640, 
                                       17644, 17655, 17694, 17701, 17702, 17704, 17709, 17714, 17715, 
                                       17735), class = "Date"), 
                    n = c(23L, 22L, 24L, 5L, 19L, 2L, 5L, 
                          10L, 5L, 6L, 13L, 2L, 1L, 6L, 2L, 13L, 1L, 32L, 17L, 1L, 3L, 
                          14L)), 
               class = c("tbl_df", "tbl", "data.frame"), 
               row.names = c(NA, -22L))
x
#> # A tibble: 22 x 3
#>     year date           n
#>    <dbl> <date>     <int>
#>  1  2017 2017-11-09    23
#>  2  2017 2017-11-10    22
#>  3  2017 2017-11-13    24
#>  4  2017 2017-12-05     5
#>  5  2017 2017-12-28    19
#>  6  2018 2018-01-03     2
#>  7  2018 2018-02-07     5
#>  8  2018 2018-02-19    10
#>  9  2018 2018-03-01     5
#> 10  2018 2018-03-21     6
#> # ... with 12 more rows

x %>% 
  ggTimeSeries::ggplot_calendar_heatmap(cDateColumnName = "date", cValueColumnName = "n") + 
  facet_grid(year ~ .)

Created on 2018-08-13 by the reprex
package
(v0.2.0).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.