emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: OSiUX <xuiso@osiux.com.ar>
To: emacs-orgmode@gnu.org
Subject: Re: Generating burndown charts using org mode
Date: Sat, 31 Dec 2011 08:40:24 -0300	[thread overview]
Message-ID: <20111231114024.GA7146@merlot.gcoop.coop> (raw)
In-Reply-To: <1325292994.28295.94.camel@lorenz>

[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]

El sáb, 31 dic 2011, Marco Craveiro decía:

> Hi Org-Moders,
>
> I've been using Org-Mode quite a bit, but I'm afraid I'm not an advanced
> user. I'm trying to generate burndown charts [1] which basically follow
> coding progress over a bounded period of time (an iteration).
>
> I started by generating a file for each iteration:
>
> <snippet_of_org_file>
> * Tasks in iteration
> - [[file:list_1.org]]
> - [[file:list_2.org]]
>
> #+tblname: test_chart
> | Day | Expected | Actual |
> |-----+----------+--------|
> |   0 |        4 |      4 |
> |   1 |        3 |      4 |
> |   2 |        2 |      1 |
> |   3 |        1 |      0 |
> |   4 |        0 |      0 |
> </snippet_of_org_file>

Marco, try this:

<snippet_of_org_file>
*** burndown

    #+srcname: burndown
    #+begin_src sh :session
    cd ~/org
    MONTH=$(date +%m)
    DAYS_DONE=$(egrep -A1 "\* DONE" gca.org | egrep -o "CLOSED: \[[0-9]{4}-$MONTH-[0-9]{2}" | cut -c 10- | sort -u)
    echo "day expected actual"
    for DAY in $DAYS_DONE
    do
      NEXT_BY_DAY=$(egrep -A1 "\* NEXT" gca.org | egrep -o "SCHEDULED: <$DAY" | wc -l)
      DONE_BY_DAY=$(egrep -A1 "\* DONE" gca.org | egrep -o "CLOSED: \[$DAY" | wc -l)
      echo $DAY $NEXT_BY_DAY $DONE_BY_DAY
    done
    #+end_src

    #+results: burndown
    |        day | expected | actual |
    | 2011-12-01 |        5 |      1 |
    | 2011-12-05 |        3 |      1 |
    | 2011-12-12 |        4 |      2 |
    | 2011-12-13 |        2 |      1 |
    | 2011-12-14 |        2 |      2 |
    | 2011-12-15 |        2 |      2 |
    | 2011-12-16 |        2 |      1 |
    | 2011-12-19 |        1 |      2 |
    | 2011-12-20 |        0 |      4 |
    | 2011-12-21 |        0 |      6 |
    | 2011-12-22 |        0 |      1 |
    | 2011-12-26 |        0 |      2 |
    | 2011-12-27 |        0 |      3 |

    #+begin_src gnuplot :var data=burndown :file burdown.png
    reset
    set xdata time
    set timefmt "%Y-%m-%d"
    set format x "%d"
    set title "burndown"
    set xlabel "days"
    set ylabel "taks"
    set xtics nomirror
    set ytics nomirror
    plot data using 1:2 with lines lw 2 lt 3 title col(2), \
         data using 1:3 with lines lw 2 lt 1 title col(3)
    #+end_src

    #+results:
    file:burdown.png
</snippet_of_org_file>

--

::

  Osiris Alejandro Gomez (OSiUX) osiux@osiux.com.ar
  AA70 93FD B6EF EB42 6920 7530 A799 B226 74C8 A3FE
  http://osiux.com http://wiki.buenosaireslibre.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2011-12-31 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-31  0:56 Generating burndown charts using org mode Marco Craveiro
2011-12-31 11:40 ` OSiUX [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111231114024.GA7146@merlot.gcoop.coop \
    --to=xuiso@osiux.com.ar \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).