I am trying to plot a line graph that shows the frequency of different types of crime committed from Jan 2019 to Oct 2020 in each region in England.
Here's the structure: please imagine there were 9 different regions and, obviously, enough months to cover the time period mentioned above.
structure(list(Month = c("2019-01", "2019-01", "2019-01", "2019-01",
"2019-01", "2019-01", "2019-01", "2019-01", "2019-01", "2019-01"
), Region = c("South West", "South West", "South West", "South West",
"South West", "South West", "South West", "South West", "South West",
"South West"), Crime = c("Anti social behaviour and sex offences",
"Criminal damage and arson", "Criminal damage and arson", "Theft and burglary",
"Theft and burglary", "Anti social behaviour and sex offences",
"Anti social behaviour and sex offences", "Anti social behaviour and sex offences",
"Other crime", "Anti social behaviour and sex offences")), row.names = c(NA,
-10L), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x000002d9ecd91ef0>)
It should look something like this:
I realised that there are no numbers in my data frame, so ggplot probably doesn't know how to plot the number of, for example, Theft and burglary occurrencies for each month.
Any idea how to fix this issue?
Thanks in advance for any help you can give!
P.s. Since there are 9 regions I need to analyse, I was thinking of creating a plot for each separate region, unless there's a visually acceptable way to plot all the regions in the same graph?