0
$\begingroup$

The facility I am working in can be assessed a number of violations. I have a list of the violations and the date of the violation. The violations range from 1 (least severe) to 7 (most severe). We've only ever received one "7" violation.

What I'm trying to do is visualize that the bulk of the category "6" violations were in the past and that the frequency of them has been decreasing with time. The point is to show a trend where frequency of of violations, particularly for the severe (category six) violations is decreasing with time. We only have one category 7.

Thanks for your help!

Here is the data I am working with:

Date Violation Code
2/8/2023 1
2/2/2023 3
12/18/2022 6
9/27/2022 6
6/30/2022 7
12/15/2021 3
6/17/2021 3
5/26/2021 3
5/9/2021 3
4/28/2021 3
3/22/2021 6
3/16/2021 4
1/12/2021 3
12/5/2020 6
6/26/2020 6
2/19/2020 6
2/19/2020 4
2/10/2020 6
10/7/2019 6
8/12/2019 3
6/25/2019 4
6/14/2019 3
4/23/2019 5
3/29/2019 3
3/11/2019 3
2/26/2019 4
2/11/2019 3
2/6/2019 6
12/30/2018 3
11/30/2018 3
11/20/2018 3
11/15/2018 6
11/15/2018 3
10/24/2018 6
9/12/2018 4
8/26/2018 6
6/20/2018 3
6/17/2018 3
6/17/2018 3
6/16/2018 3
6/11/2018 4
1/5/2018 6
1/4/2018 4
$\endgroup$
0

1 Answer 1

1
$\begingroup$

You could do something like a faceted histogram, where each facet is the violation code, and on the x axis is the time. The height of the histogram at each particular time would reflect the number of violations in that time bin (e.g. in a month or something).

$\endgroup$
2
  • 1
    $\begingroup$ thank you - i appreciate your answer $\endgroup$
    – Kayla
    Commented Mar 31, 2023 at 5:26
  • 1
    $\begingroup$ Exactly. Just use seven barplots/histograms/simple line charts, on top of each other, making sure the horizontal axes with the timestamps are identical. (Then you can also omit six of the seven horizontal axes with no loss of information, to make the plot less cluttered.) The vertical axes could also have a common scale, or be scaled differently, depending on your data and what you want to portray. $\endgroup$ Commented Mar 31, 2023 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.