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


MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00000nmm##2200000uu#4500</leader>
  <controlfield tag="005">20191101071434.0</controlfield>
  <controlfield tag="001">2593716</controlfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Zhian N. Kamvar</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Tsinghua University</subfield>
    <subfield code="a">Jun Cai</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Stellenbosch University</subfield>
    <subfield code="a">Juliet Pulliam</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Public Health England</subfield>
    <subfield code="a">Sarah Chisholm</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="a">Rich FitzJohn</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="a">Jakob Schumacher</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Sangeeta Bhatia</subfield>
  </datafield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">5525679</subfield>
    <subfield code="z">md5:9a25688c650c72848663f898dbcd6944</subfield>
    <subfield code="u">https://zenodo.org/record/2593716/files/reconhub/incidence-1.7.0.zip</subfield>
  </datafield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2019-03-14</subfield>
  </datafield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="o">oai:zenodo.org:2593716</subfield>
  </datafield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Thibaut Jombart</subfield>
  </datafield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">reconhub/incidence: Incidence version 1.7.0</subfield>
  </datafield>
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="a">Other (Open)</subfield>
  </datafield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2">opendefinition.org</subfield>
  </datafield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">Incidence can now handle standardised weeks starting on any day thanks to the &lt;a href="https://www.repidemicsconsortium.org/aweek"&gt;&lt;code&gt;aweek&lt;/code&gt;&lt;/a&gt; package :tada:
&lt;pre&gt;&lt;code class="lang-r"&gt;library(incidence)
library(ggplot2)
library(cowplot)
d &amp;lt;- as.Date(&amp;quot;2019-03-11&amp;quot;) + -7:6
setNames(d, weekdays(d))
#&amp;gt;       Monday      Tuesday    Wednesday     Thursday       Friday 
#&amp;gt; &amp;quot;2019-03-04&amp;quot; &amp;quot;2019-03-05&amp;quot; &amp;quot;2019-03-06&amp;quot; &amp;quot;2019-03-07&amp;quot; &amp;quot;2019-03-08&amp;quot; 
#&amp;gt;     Saturday       Sunday       Monday      Tuesday    Wednesday 
#&amp;gt; &amp;quot;2019-03-09&amp;quot; &amp;quot;2019-03-10&amp;quot; &amp;quot;2019-03-11&amp;quot; &amp;quot;2019-03-12&amp;quot; &amp;quot;2019-03-13&amp;quot; 
#&amp;gt;     Thursday       Friday     Saturday       Sunday 
#&amp;gt; &amp;quot;2019-03-14&amp;quot; &amp;quot;2019-03-15&amp;quot; &amp;quot;2019-03-16&amp;quot; &amp;quot;2019-03-17&amp;quot;
imon &amp;lt;- incidence(d, &amp;quot;mon week&amp;quot;) # also ISO week
itue &amp;lt;- incidence(d, &amp;quot;tue week&amp;quot;)
iwed &amp;lt;- incidence(d, &amp;quot;wed week&amp;quot;)
ithu &amp;lt;- incidence(d, &amp;quot;thu week&amp;quot;)
ifri &amp;lt;- incidence(d, &amp;quot;fri week&amp;quot;)
isat &amp;lt;- incidence(d, &amp;quot;sat week&amp;quot;)
isun &amp;lt;- incidence(d, &amp;quot;sun week&amp;quot;) # also MMWR week and EPI week

pmon &amp;lt;- plot(imon, show_cases = TRUE, labels_week = FALSE)
ptue &amp;lt;- plot(itue, show_cases = TRUE, labels_week = FALSE)
pwed &amp;lt;- plot(iwed, show_cases = TRUE, labels_week = FALSE)
pthu &amp;lt;- plot(ithu, show_cases = TRUE, labels_week = FALSE)
pfri &amp;lt;- plot(ifri, show_cases = TRUE, labels_week = FALSE)
psat &amp;lt;- plot(isat, show_cases = TRUE, labels_week = FALSE)
psun &amp;lt;- plot(isun, show_cases = TRUE, labels_week = FALSE)
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;s &amp;lt;- scale_x_date(limits = c(as.Date(&amp;quot;2019-02-26&amp;quot;), max(d) + 7L))
plot_grid(
pmon + s,
ptue + s,
pwed + s,
pthu + s,
pfri + s,
psat + s,
psun + s)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
multi-weeks/months/years can now be handled
&lt;pre&gt;&lt;code class="lang-r"&gt;library(incidence)
library(outbreaks)
d &amp;lt;- ebola_sim_clean$linelist$date_of_onset
h &amp;lt;- ebola_sim_clean$linelist$hospital
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;plot(incidence(d, interval = &amp;quot;1 epiweek&amp;quot;, group = h))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;plot(incidence(d, interval = &amp;quot;2 epiweeks&amp;quot;, group = h))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;plot(incidence(d, interval = &amp;quot;3 epiweeks&amp;quot;, group = h))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;plot(incidence(d, interval = &amp;quot;2 months&amp;quot;, group = h))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;sup&amp;gt;Created on 2019-03-14 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)&amp;lt;/sup&amp;gt;&lt;/p&gt;
Full set of changes
NEW FEATURES
&lt;ul&gt;
&lt;li&gt;Any interval &lt;code&gt;seq.Date()&lt;/code&gt; can handle (e.g. "5 weeks") can be handled by
&lt;code&gt;incidence()&lt;/code&gt; (see &lt;a href="https://github.com/reconhub/incidence/issues/67"&gt;https://github.com/reconhub/incidence/issues/67&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Weekly intervals can start on any day of the week by allowing things like 
"epiweek", "isoweek", "wednesday week", "2 Saturday weeks", etc.
(see &lt;a href="https://github.com/reconhub/incidence/issues/55#issuecomment-405297526"&gt;https://github.com/reconhub/incidence/issues/55#issuecomment-405297526&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;the item &lt;code&gt;$weeks&lt;/code&gt; is now added to the incidence object, which contains an
"aweek" class&lt;/li&gt;
&lt;li&gt;plotting will now force the first tick to be the starting point of the
incidence curve&lt;/li&gt;
&lt;/ul&gt;
NEW FUNCTIONS
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;make_breaks()&lt;/code&gt; will automatically calculate breaks from an incidence object
for plotting. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;scale_x_incidence()&lt;/code&gt; will produce a ggplot2 "ScaleContinuous" object to add
to a ggplot.&lt;/li&gt;
&lt;/ul&gt;
DEPRECATED
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;plot.incidence()&lt;/code&gt; argument &lt;code&gt;labels_iso&lt;/code&gt; is deprecated in favor of 
&lt;code&gt;labels_week&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Incidence objects will still have &lt;code&gt;$isoweeks&lt;/code&gt; if the weeks are ISO 8601
standard, but users should rely intead on &lt;code&gt;$weeks&lt;/code&gt; instead. The &lt;code&gt;$isoweeks&lt;/code&gt;
element will be removed in a future version of incidence.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;as.incidence()&lt;/code&gt; argument &lt;code&gt;isoweeks&lt;/code&gt; has been deprecated in favour of 
&lt;code&gt;standard&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
DEPENDENCIES
&lt;ul&gt;
&lt;li&gt;ISOweek import changed to &lt;a href="https://www.repidemicsconsortium.org/aweek"&gt;aweek&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Documentation
&lt;ul&gt;
&lt;li&gt;Vignettes have been updated with examples.&lt;/li&gt;
&lt;/ul&gt;</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">url</subfield>
    <subfield code="i">isSupplementTo</subfield>
    <subfield code="a">https://github.com/reconhub/incidence/tree/1.7.0</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isVersionOf</subfield>
    <subfield code="a">10.5281/zenodo.1404718</subfield>
  </datafield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.5281/zenodo.2593716</subfield>
    <subfield code="2">doi</subfield>
  </datafield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">software</subfield>
  </datafield>
</record>
79
47
views
downloads
All versions This version
Views 7912
Downloads 472
Data volume 245.6 MB11.1 MB
Unique views 5912
Unique downloads 211

Share

Cite as