1. 22
  1. 6

    See also, xsv.

    1. 1

      …and csvkit.

    2. 3

      Although it’s not as pretty, the column(1) (core?)util does something similar. Given the example input from the README for Miller, throwing it through column -s ',' -t produces this output:

      county      tiv_2011    tiv_2012    line         construction
      SEMINOLE    22890.55    20848.71    Residential  Wood
      MIAMI DADE  1158674.85  1076001.08  Residential  Masonry
      PALM BEACH  1174081.5   1856589.17  Residential  Masonry
      MIAMI DADE  2850980.31  2650932.72  Commercial   Reinforced Masonry
      HIGHLANDS   23006.41    19757.91    Residential  Wood
      HIGHLANDS   49155.16    47362.96    Residential  Wood
      DUVAL       1731888.18  2785551.63  Residential  Masonry
      ST. JOHNS   29589.12    35207.53    Residential  Wood
      

      Of course, you don’t get the processing language that Miller appears to provide for more complex data mangling. It looks like a very nice tool for that sort of thing.

      1. 2

        It is a really nice tool. However, when the authors say it is complementary to R, I wonder what miller can do that can’t be done with the same ease in R using hadleyverse. Here is the equivalent of the initial example.

        read.csv(‘flins.csv’) %>% mutate(tiv_delta=tiv_2012-tiv_2011) %>% select(-one_of(‘tiv_2011’,‘tiv_2012’)) %>% arrange(tiv_delta)

        compared to

        mlr –icsv –opprint –barred
        put ‘$tiv_delta = $tiv_2012 - $tiv_2011; unset $tiv_2011, $tiv_2012’
        then sort -nr tiv_delta flins.csv