MyNixOS website logo
Description

Daily Vegetable Prices of Sri Lanka.

Provides retail and wholesale vegetable price data from two major market hubs in Sri Lanka, Dambulla and Pettah. Includes tools for analyzing, visualizing, and comparing vegetable prices across markets.

vegetablesSriLanka

Installation

You can install the development version of vegetablesSriLanka from GitHub with:

# install.packages("pak")
pak::pak("thiyangt/vegetablesSriLanka")

Load data

library(vegetablesSriLanka)
#> Registered S3 method overwritten by 'tsibble':
#>   method               from 
#>   as_tibble.grouped_df dplyr
data("vegetables.srilanka")
head(vegetables.srilanka)
#> # A tibble: 6 × 5
#>   Date       Item  Type   Market   Price
#>   <date>     <chr> <chr>  <chr>    <dbl>
#> 1 2016-08-01 Beans Retail Dambulla   165
#> 2 2016-08-02 Beans Retail Dambulla   190
#> 3 2016-08-03 Beans Retail Dambulla   190
#> 4 2016-08-04 Beans Retail Dambulla   190
#> 5 2016-08-05 Beans Retail Dambulla   190
#> 6 2016-08-08 Beans Retail Dambulla   190
tail(vegetables.srilanka)
#> # A tibble: 6 × 5
#>   Date       Item   Type      Market Price
#>   <date>     <chr>  <chr>     <chr>  <dbl>
#> 1 2026-03-03 Tomato Wholesale Pettah   120
#> 2 2026-03-04 Tomato Wholesale Pettah   120
#> 3 2026-03-05 Tomato Wholesale Pettah    80
#> 4 2026-03-06 Tomato Wholesale Pettah    90
#> 5 2026-03-09 Tomato Wholesale Pettah   120
#> 6 2026-03-10 Tomato Wholesale Pettah   120

Example

Fill missing gaps

filled <- fillgaps_vegetable_prices(
   data = vegetables.srilanka,
   item = "Carrot",
   market = "Dambulla",
   type = "Retail"
 )
filled
#> # A tsibble: 3,509 x 5 [1D]
#>    Date       Item   Type   Market   Price
#>    <date>     <chr>  <chr>  <chr>    <dbl>
#>  1 2016-08-01 Carrot Retail Dambulla   155
#>  2 2016-08-02 Carrot Retail Dambulla   155
#>  3 2016-08-03 Carrot Retail Dambulla   150
#>  4 2016-08-04 Carrot Retail Dambulla   145
#>  5 2016-08-05 Carrot Retail Dambulla   145
#>  6 2016-08-06 <NA>   <NA>   <NA>        NA
#>  7 2016-08-07 <NA>   <NA>   <NA>        NA
#>  8 2016-08-08 Carrot Retail Dambulla   125
#>  9 2016-08-09 Carrot Retail Dambulla   135
#> 10 2016-08-10 Carrot Retail Dambulla   150
#> # ℹ 3,499 more rows

Plot data

plot_vegetable_prices(
   data = vegetables.srilanka,
   item = "Carrot",
   market = "Dambulla",
   type = "Retail"
 )

Data Quality Analysis

visualize_missingness(
  data = vegetables.srilanka,
  group_var = "Item",
  target_var = "Price"
 )
#> $data_structure
#> 
#> $missing_map
#> 
#> $missing_by_group
Metadata

Version

1.1.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows