I've a combination of two difficult (I'm naive) requirements :(
Consider the Weather data as example. Let's say I've dataset with following information.
Visualization: I want to see change in frequency of a word over time and at temperature.
- X-axis shows the time series(date)
- Y-axis has the frequency scale(0 to max freq).
Requirements: 1. I need to draw frequencies of several words(Column "word") over the time. 2. Correlate the frequency with temperature.
I started with
ggplot(TemperatureData, aes(x=timeId, y=termFrequency)) + geom_line() + facet_wrap(~Keyword) + geom_line(data = TemperatureData, aes(y = temperature)) + labs(x="Time Series over X days", y = "Term Frequency")
The above approach results in overlapping y axis (frequency, temperature). And, a separate bin for each
"Word" (facet for
ggplot). i.e plot has 3 bin's for each keyword. Each bin shows temperature over time, and frequency of a word over time.
1. I want to be able to separate y-axis for temperature, and frequency. Also, I do not want to normalize these y-axis as it gets tough to understand what are the high/low values of each axis over days. Plot Loses readability. I learned that two y-axis is not possible using
Separate bin for each keyword is not required. One horizontal line per keyword is what I'm looking for.
The plot should have only one appearance (line graph) of temperature to reflect change over time.
I tried using PAR, but could not succeed.
Example solution using plotrix package