| Title: | Daily Vegetable Prices of Sri Lanka |
|---|---|
| Description: | 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. |
| Authors: | Thiyanga S. Talagala [aut, cre] (ORCID: <https://orcid.org/0000-0002-0656-9789>), Thisuri Jayarathne [aut] (ORCID: <https://orcid.org/0009-0004-3011-4364>), Priyanga Dilini Talagala [aut] (ORCID: <https://orcid.org/0000-0003-2870-7449>) |
| Maintainer: | Thiyanga S. Talagala <[email protected]> |
| License: | GPL-3 |
| Version: | 1.1.0 |
| Built: | 2026-06-05 06:20:23 UTC |
| Source: | https://github.com/cran/vegetablesSriLanka |
Fill missing gaps with NA. The function filters the dataset based on the selected item, market, and type, converts the data into a tsibble, and generates a regular time series filling the gaps with NA.
fillgaps_vegetable_prices(data, item, market, type)fillgaps_vegetable_prices(data, item, market, type)
data |
A data frame containing vegetable price data.
The dataset must contain the columns |
item |
Character string specifying the vegetable item. |
market |
Character string specifying the market. |
type |
Character string specifying the price type
(e.g., |
A ggplot object showing the time series of vegetable prices.
fillgaps_vegetable_prices( data = vegetables.srilanka, item = "Carrot", market = "Dambulla", type = "Retail" )fillgaps_vegetable_prices( data = vegetables.srilanka, item = "Carrot", market = "Dambulla", type = "Retail" )
Visualize retail or wholesale vegetable prices over time for selected items and markets in Sri Lanka. The function filters the dataset based on the selected item, market, and type, converts the data into a tsibble, and generates a time series plot.
plot_vegetable_prices(data, item, market, type)plot_vegetable_prices(data, item, market, type)
data |
A data frame containing vegetable price data.
The dataset must contain the columns |
item |
Character string specifying the vegetable item. |
market |
Character string specifying the market. |
type |
Character string specifying the price type
(e.g., |
A ggplot object showing the time series of vegetable prices.
plot_vegetable_prices( data = vegetables.srilanka, item = "Carrot", market = "Dambulla", type = "Retail" )plot_vegetable_prices( data = vegetables.srilanka, item = "Carrot", market = "Dambulla", type = "Retail" )
Daily wholesale and retail vegetable prices at Dambulla and Petta markets in Sri Lanka
vegetables.srilankavegetables.srilanka
A tibble with 62908 rows and 5 variables:
Date
Vegetable name
Wholesale or Retail price
Pettah or Dambulla market
Price in LKR per kg
Accessed from Daily Reports - Central Bank of Sri Lanka
head(vegetables.srilanka)head(vegetables.srilanka)
Generates a set of visual summaries to inspect data structure and missing values in the dataset. The function returns: (1) data type visualization, (2) missingness map, and (3) missing percentage by grouping variable.
visualize_missingness(data, group_var = "Item", target_var = "Price")visualize_missingness(data, group_var = "Item", target_var = "Price")
data |
A data frame. |
group_var |
Character string specifying the grouping variable for missing percentage visualization (e.g., "Item"). |
target_var |
Character string specifying the variable to assess missingness (e.g., "Price"). |
A named list containing:
data_structure: Data type visualization.
missing_map: Missingness heatmap.
missing_by_group: Bar plot of missing percentages.
visualize_missingness( data = vegetables.srilanka, group_var = "Item", target_var = "Price" )visualize_missingness( data = vegetables.srilanka, group_var = "Item", target_var = "Price" )