curvePlot()
Visualize Temporal Evolution of Keyword Frequencies
The curvePlot()
function creates multi-line plots showing how keyword frequencies change over time. It displays all keywords in your corpus simultaneously, with colors and line weights indicating frequency zones, providing a comprehensive view of temporal dynamics.
πΉ Function Definition
curvePlot(
data,keywords = NULL,
r = 1,
themety = "light",
size_class = NULL,
x_leg = 0.85,
x_lab = "years"
)
π― Purpose
Understanding how terms evolve over time is fundamental to temporal corpus analysis. The curvePlot()
function helps you:
- Explore temporal patterns β See how keywords rise, fall, or remain stable over time
- Identify trends β Spot emerging, declining, or persistent concepts
- Compare trajectories β Observe relationships between different keywords
- Detect events β Find spikes or drops that correspond to historical events
- Visualize zones β See how different frequency zones behave temporally
- Assess data quality β Identify anomalies or irregularities in the data
- Generate insights β Discover unexpected patterns for further investigation
- Create publication figures β Produce high-quality visualizations for papers
This function can display either all keywords (comprehensive overview) or selected keywords (focused analysis), making it versatile for both exploration and presentation.
βοΈ Arguments
Argument | Type | Default | Description |
---|---|---|---|
data | List | required | A list object returned by importData() or normalization() , containing the TDM and corpus metadata. |
keywords | Character vector | NULL |
Specific keywords to plot. If NULL , plots all keywords in the corpus. Use this to focus on specific terms of interest. |
r | Integer | 1 |
Interval for x-axis label thinning. r = 1 shows all years, r = 2 shows every 2nd year, etc. Useful for long time series. |
themety | Character | "light" |
Visual theme: β’ "light" : Light background (default)β’ "dark" : Dark background (better for presentations) |
size_class | Numeric vector | NULL |
Custom line thickness for each frequency zone. If NULL , uses theme-appropriate defaults. Vector length must match number of zones. |
x_leg | Numeric | 0.85 |
Horizontal legend position (0 = left, 1 = right). Adjust if legend overlaps with curves. |
x_lab | Character | "years" |
Label for x-axis (e.g., "Years" , "Time Period" , "Publication Year" ). |
π Plot Components
Visual Elements
Lines: - Each keyword is represented by one line - Line color indicates frequency zone - Line thickness can vary by zone importance
X-axis: - Time periods (years) from corpus metadata - Labels can be thinned for long time series
Y-axis: - Frequency values (raw or normalized) - Scale depends on normalization applied
Legend: - Shows frequency zones with corresponding colors - Position adjustable via x_leg
parameter
Theme: - Light: White background, dark text (publications) - Dark: Dark background, light text (presentations)
π‘ Usage Examples
Basic Usage - All Keywords
library(cccc)
# Import data
<- importData("tdm.csv", "corpus_info.csv")
corpus
# Plot all keyword trajectories
curvePlot(corpus)
Plot Specific Keywords
# Import and normalize
<- importData("tdm.csv", "corpus_info.csv")
corpus <- normalization(corpus, normty = "nc")
corpus_norm
# Plot specific keywords of interest
curvePlot(
corpus_norm, keywords = c("algorithm", "network", "data", "cloud")
)
Long Time Series
# Show every 5th year on x-axis
curvePlot(corpus_norm, r = 5)
# Show every 10th year
curvePlot(corpus_norm, r = 10, x_lab = "Decade")
π Interpreting Temporal Patterns
Common Trajectory Types
1. Emerging Terms π
Frequency
| β±βββ
| β±
| β±
|_____β±________Time
- Start low, increase over time
- Indicate new concepts or growing importance
- Examples: βcloud computingβ, βdeep learningβ
2. Declining Terms π
Frequency
|ββββ²
| β²
| β²
| β²___Time
- Start high, decrease over time
- Indicate obsolescence or reduced relevance
- Examples: βfloppy diskβ, βmainframeβ
3. Stable Terms β‘οΈ
Frequency
|βββββββββββββ
|
|
|______________Time
- Consistent frequency over time
- Indicate core, persistent concepts
- Examples: βcomputerβ, βdataβ, βsystemβ
4. Peaked Terms ποΈ
Frequency
| β±β²
| β± β²
| β± β²
|β±____________β²_Time
- Rise and fall within time period
- May indicate temporary trends or events
- Examples: βY2Kβ, specific technology buzzwords
5. Cyclical Terms π
Frequency
| β±β² β±β²
| β± β² β± β²
|β± β²β± β²_Time
- Periodic fluctuations
- May indicate recurring themes or seasonal patterns
- Examples: Conference-related terms, annual events
6. Volatile Terms π
Frequency
| β±β²β±β²β±β²β±β²
|β± β²Time
- Highly irregular patterns
- May indicate noise or inconsistent usage
- Consider smoothing or filtering
π¨ Visual Interpretation
Zone-Based Patterns
High-frequency zones (typically darker colors): - Represent core vocabulary of the corpus - Trajectories often more stable - Changes indicate major conceptual shifts
Low-frequency zones (typically lighter colors): - Represent specialized or emerging terms - More volatile trajectories - May show sharper rises/falls
Density and Overlap
Dense clustering: - Many terms with similar temporal patterns - May indicate coherent topical evolution
Spread trajectories: - Diverse temporal behaviors - Suggests heterogeneous corpus or multiple themes
π Use Cases
1. Initial Exploration
Get a first look at temporal dynamics before detailed analysis.
2. Hypothesis Generation
Identify unexpected patterns that merit further investigation.
3. Trend Validation
Verify expected temporal patterns (e.g., βinternetβ should rise after 1990s).
4. Comparative Analysis
Compare trajectories of related terms (e.g., βanalogβ vs βdigitalβ).
5. Event Detection
Find spikes or drops corresponding to historical events.
6. Normalization Assessment
Compare raw vs. normalized frequencies to see normalization effects.
7. Publication Figures
Create visualizations for papers, presentations, or reports.
8. Teaching/Communication
Show collaborators or students how terms evolve in your corpus.
π‘ Tips & Best Practices
- Start with all keywords β Get overview before focusing
- Use normalization β Compare normalized trajectories for fair comparison
- Focus selectively β After overview, plot specific keywords of interest
- Match theme to context β Light for publications, dark for presentations
- Thin x-axis for long series β Prevent label overlap (use
r
parameter) - Save high resolution β Use
dpi = 300
or higher for publications - Compare before/after normalization β Understand normalization effects
- Document patterns β Keep notes on interesting trajectories for later analysis
- Cross-reference with history β Match patterns to known events/developments
- Use with other plots β Combine with
rowMassPlot()
andcolMassPlot()
for full picture
π See Also
importData()
β Import corpus datanormalization()
β Normalize frequencies for fair comparisonrowMassPlot()
β Visualize keyword frequency distributioncolMassPlot()
β Visualize temporal corpus structurecurveCtuPlot()
β Plot curves with example keywords by zonefacetPlot()
β Create faceted visualizations by zone