Software Open Access

reconhub/incidence: Incidence version 1.7.0

Thibaut Jombart; Zhian N. Kamvar; Jun Cai; Juliet Pulliam; Sarah Chisholm; Rich FitzJohn; Jakob Schumacher; Sangeeta Bhatia


JSON Export

{
  "files": [
    {
      "links": {
        "self": "https://zenodo.org/api/files/8e2d4688-d1cb-4d75-bbce-6cd3d782bbb6/reconhub/incidence-1.7.0.zip"
      }, 
      "checksum": "md5:9a25688c650c72848663f898dbcd6944", 
      "bucket": "8e2d4688-d1cb-4d75-bbce-6cd3d782bbb6", 
      "key": "reconhub/incidence-1.7.0.zip", 
      "type": "zip", 
      "size": 5525679
    }
  ], 
  "owners": [
    7498
  ], 
  "doi": "10.5281/zenodo.2593716", 
  "stats": {
    "version_unique_downloads": 21.0, 
    "unique_views": 12.0, 
    "views": 12.0, 
    "downloads": 2.0, 
    "unique_downloads": 1.0, 
    "version_unique_views": 55.0, 
    "volume": 11051358.0, 
    "version_downloads": 47.0, 
    "version_views": 75.0, 
    "version_volume": 245629981.0
  }, 
  "links": {
    "doi": "https://doi.org/10.5281/zenodo.2593716", 
    "conceptdoi": "https://doi.org/10.5281/zenodo.1404718", 
    "bucket": "https://zenodo.org/api/files/8e2d4688-d1cb-4d75-bbce-6cd3d782bbb6", 
    "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.1404718.svg", 
    "html": "https://zenodo.org/record/2593716", 
    "latest_html": "https://zenodo.org/record/2593716", 
    "badge": "https://zenodo.org/badge/doi/10.5281/zenodo.2593716.svg", 
    "latest": "https://zenodo.org/api/records/2593716"
  }, 
  "conceptdoi": "10.5281/zenodo.1404718", 
  "created": "2019-03-14T17:11:52.314555+00:00", 
  "updated": "2019-03-15T01:33:01.489664+00:00", 
  "conceptrecid": "1404718", 
  "revision": 3, 
  "id": 2593716, 
  "metadata": {
    "access_right_category": "success", 
    "doi": "10.5281/zenodo.2593716", 
    "description": "Incidence can now handle standardised weeks starting on any day thanks to the <a href=\"https://www.repidemicsconsortium.org/aweek\"><code>aweek</code></a> package :tada:\n<pre><code class=\"lang-r\">library(incidence)\nlibrary(ggplot2)\nlibrary(cowplot)\nd &lt;- as.Date(&quot;2019-03-11&quot;) + -7:6\nsetNames(d, weekdays(d))\n#&gt;       Monday      Tuesday    Wednesday     Thursday       Friday \n#&gt; &quot;2019-03-04&quot; &quot;2019-03-05&quot; &quot;2019-03-06&quot; &quot;2019-03-07&quot; &quot;2019-03-08&quot; \n#&gt;     Saturday       Sunday       Monday      Tuesday    Wednesday \n#&gt; &quot;2019-03-09&quot; &quot;2019-03-10&quot; &quot;2019-03-11&quot; &quot;2019-03-12&quot; &quot;2019-03-13&quot; \n#&gt;     Thursday       Friday     Saturday       Sunday \n#&gt; &quot;2019-03-14&quot; &quot;2019-03-15&quot; &quot;2019-03-16&quot; &quot;2019-03-17&quot;\nimon &lt;- incidence(d, &quot;mon week&quot;) # also ISO week\nitue &lt;- incidence(d, &quot;tue week&quot;)\niwed &lt;- incidence(d, &quot;wed week&quot;)\nithu &lt;- incidence(d, &quot;thu week&quot;)\nifri &lt;- incidence(d, &quot;fri week&quot;)\nisat &lt;- incidence(d, &quot;sat week&quot;)\nisun &lt;- incidence(d, &quot;sun week&quot;) # also MMWR week and EPI week\n\npmon &lt;- plot(imon, show_cases = TRUE, labels_week = FALSE)\nptue &lt;- plot(itue, show_cases = TRUE, labels_week = FALSE)\npwed &lt;- plot(iwed, show_cases = TRUE, labels_week = FALSE)\npthu &lt;- plot(ithu, show_cases = TRUE, labels_week = FALSE)\npfri &lt;- plot(ifri, show_cases = TRUE, labels_week = FALSE)\npsat &lt;- plot(isat, show_cases = TRUE, labels_week = FALSE)\npsun &lt;- plot(isun, show_cases = TRUE, labels_week = FALSE)\n</code></pre>\n<pre><code class=\"lang-r\">s &lt;- scale_x_date(limits = c(as.Date(&quot;2019-02-26&quot;), max(d) + 7L))\nplot_grid(\npmon + s,\nptue + s,\npwed + s,\npthu + s,\npfri + s,\npsat + s,\npsun + s)\n</code></pre>\n<p></p>\nmulti-weeks/months/years can now be handled\n<pre><code class=\"lang-r\">library(incidence)\nlibrary(outbreaks)\nd &lt;- ebola_sim_clean$linelist$date_of_onset\nh &lt;- ebola_sim_clean$linelist$hospital\n</code></pre>\n<pre><code class=\"lang-r\">plot(incidence(d, interval = &quot;1 epiweek&quot;, group = h))\n</code></pre>\n<p></p>\n<pre><code class=\"lang-r\">plot(incidence(d, interval = &quot;2 epiweeks&quot;, group = h))\n</code></pre>\n<p></p>\n<pre><code class=\"lang-r\">plot(incidence(d, interval = &quot;3 epiweeks&quot;, group = h))\n</code></pre>\n<p></p>\n<pre><code class=\"lang-r\">plot(incidence(d, interval = &quot;2 months&quot;, group = h))\n</code></pre>\n<p></p>\n<p>&lt;sup&gt;Created on 2019-03-14 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)&lt;/sup&gt;</p>\nFull set of changes\nNEW FEATURES\n<ul>\n<li>Any interval <code>seq.Date()</code> can handle (e.g. \"5 weeks\") can be handled by\n<code>incidence()</code> (see <a href=\"https://github.com/reconhub/incidence/issues/67\">https://github.com/reconhub/incidence/issues/67</a>)</li>\n<li>Weekly intervals can start on any day of the week by allowing things like \n\"epiweek\", \"isoweek\", \"wednesday week\", \"2 Saturday weeks\", etc.\n(see <a href=\"https://github.com/reconhub/incidence/issues/55#issuecomment-405297526\">https://github.com/reconhub/incidence/issues/55#issuecomment-405297526</a>)</li>\n<li>the item <code>$weeks</code> is now added to the incidence object, which contains an\n\"aweek\" class</li>\n<li>plotting will now force the first tick to be the starting point of the\nincidence curve</li>\n</ul>\nNEW FUNCTIONS\n<ul>\n<li><code>make_breaks()</code> will automatically calculate breaks from an incidence object\nfor plotting. </li>\n<li><code>scale_x_incidence()</code> will produce a ggplot2 \"ScaleContinuous\" object to add\nto a ggplot.</li>\n</ul>\nDEPRECATED\n<ul>\n<li><code>plot.incidence()</code> argument <code>labels_iso</code> is deprecated in favor of \n<code>labels_week</code></li>\n<li>Incidence objects will still have <code>$isoweeks</code> if the weeks are ISO 8601\nstandard, but users should rely intead on <code>$weeks</code> instead. The <code>$isoweeks</code>\nelement will be removed in a future version of incidence.</li>\n<li><code>as.incidence()</code> argument <code>isoweeks</code> has been deprecated in favour of \n<code>standard</code></li>\n</ul>\nDEPENDENCIES\n<ul>\n<li>ISOweek import changed to <a href=\"https://www.repidemicsconsortium.org/aweek\">aweek</a></li>\n</ul>\nDocumentation\n<ul>\n<li>Vignettes have been updated with examples.</li>\n</ul>", 
    "license": {
      "id": "other-open"
    }, 
    "title": "reconhub/incidence: Incidence version 1.7.0", 
    "relations": {
      "version": [
        {
          "count": 8, 
          "index": 7, 
          "parent": {
            "pid_type": "recid", 
            "pid_value": "1404718"
          }, 
          "is_last": true, 
          "last_child": {
            "pid_type": "recid", 
            "pid_value": "2593716"
          }
        }
      ]
    }, 
    "version": "1.7.0", 
    "publication_date": "2019-03-14", 
    "creators": [
      {
        "affiliation": "Imperial College London", 
        "name": "Thibaut Jombart"
      }, 
      {
        "affiliation": "Imperial College London", 
        "name": "Zhian N. Kamvar"
      }, 
      {
        "affiliation": "Tsinghua University", 
        "name": "Jun Cai"
      }, 
      {
        "affiliation": "Stellenbosch University", 
        "name": "Juliet Pulliam"
      }, 
      {
        "affiliation": "Public Health England", 
        "name": "Sarah Chisholm"
      }, 
      {
        "name": "Rich FitzJohn"
      }, 
      {
        "name": "Jakob Schumacher"
      }, 
      {
        "affiliation": "Imperial College London", 
        "name": "Sangeeta Bhatia"
      }
    ], 
    "access_right": "open", 
    "resource_type": {
      "type": "software", 
      "title": "Software"
    }, 
    "related_identifiers": [
      {
        "scheme": "url", 
        "identifier": "https://github.com/reconhub/incidence/tree/1.7.0", 
        "relation": "isSupplementTo"
      }, 
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.1404718", 
        "relation": "isVersionOf"
      }
    ]
  }
}
75
47
views
downloads
All versions This version
Views 7512
Downloads 472
Data volume 245.6 MB11.1 MB
Unique views 5512
Unique downloads 211

Share

Cite as