mvlazy provides quick, pre-configured visualizations for common macroeconomic analysis workflows within the macroverse ecosystem. It offers ready-to-use templates for balance of payments, real effective exchange rates, credit analysis, trade patterns, and other key economic indicators.
You can install the development version of mvlazy from GitHub with:
# install.packages("devtools")
devtools::install_github("macroverse-r/mvlazy")The mvlazy package streamlines the creation of complex economic visualizations through a single interface. Instead of manually combining multiple data series and configuring plots, you can generate publication-ready figures with minimal code.
The package provides one main function:
ml_quick(): Generate pre-configured economic visualizations
mvlazy supports the following analysis types:
- bop: Balance of Payments decomposition
- reer: Real Effective Exchange Rate analysis
- credit: Credit and lending indicators
- trade: Trade balance and patterns
- fiscal: Government finance indicators
- investment: Investment flows and stocks
- integration: Economic integration measures
- labour: Labor market indicators
- bubble: Asset price and credit bubbles
- impact: Economic impact assessments
- production: Production and output measures
- monetary: Monetary policy indicators
library(mvlazy)
# Simple balance of payments visualization for the United States
ml_quick("USA", c(2010, 2023), graph = "bop")
# Compare multiple countries with GDP normalization
ml_quick(c("USA", "CHN", "DEU"), c(2010, 2023),
graph = "bop",
theme = list(normalization = "GDP"))# REER analysis with key event markers
key_dates <- rbind(
c("GFC", "2008-09-15"),
c("COVID", "2020-03-01")
)
ml_quick("JPN", c(2000, 2023),
graph = "reer",
theme = list(key_dates = key_dates))# Trade balance decomposition
ml_quick("KOR", c(2015, 2023),
graph = "trade",
option = 2, # Detailed breakdown
theme = list(sea_adj = TRUE)) # Seasonal adjustmentThe theme parameter allows extensive customization:
ml_quick("MEX", c(2010, 2023),
graph = "fiscal",
theme = list(
normalization = "GDP", # Normalize to GDP
sea_adj = TRUE, # Apply seasonal adjustment
with_title = TRUE, # Include descriptive title
dim = c(12, 8), # Figure dimensions
base_size = 14, # Font size
explanation = TRUE # Include explanatory notes
))Most graph types support multiple visualization options through the
option parameter:
option = 1: Standard view with main componentsoption = 2: Detailed breakdown with subcomponentsoption = 3+: Graph-specific alternative views
mvlazy builds on other macroverse packages:
- Uses macrodata for data access
- Leverages pplot for visualization engine
- Applies isomapper for country code handling
- Utilizes mvcommon for shared utilities
A typical workflow might combine multiple analyses:
library(mvlazy)
# Define countries and period
countries <- c("USA", "EUR", "CHN", "JPN")
period <- c(2015, 2023)
# Generate multiple analyses
ml_quick(countries, period, graph = "bop", filename = "bop_analysis")
ml_quick(countries, period, graph = "trade", filename = "trade_flows")
ml_quick(countries, period, graph = "credit", filename = "credit_conditions")
# Custom bubble analysis for emerging markets
ml_quick(c("BRA", "IND", "IDN", "MEX"), period,
graph = "bubble",
theme = list(normalization = "GDP", dim = c(16, 10)))mvlazy is under active development. Current priorities include:
- Expanding visualization templates
- Adding more customization options
- Improving documentation and examples
- Performance optimization for large datasets
This package is part of the macroverse ecosystem and is licensed under AGPL-3.0.
Other macroverse packages:
- macroverse: Meta-package for the ecosystem
- macrodata: Core data access functionality
- pplot: Plotting engine
- isomapper: ISO code mapping utilities
- mvcommon: Shared utilities