I have some data for false crawls (FA) on certain dates. On some days there were no false crawls such 22-05-08.
activity | activity_date |
---|---|
FA | 2022-05-06 |
FA | 2022-05-07 |
FA | 2022-05-09 |
FA | 2022-05-15 |
FA | 2022-05-16 |
FA | 2022-05-16 |
FA | 2022-05-16 |
FA | 2022-05-16 |
FA | 2022-05-16 |
FA | 2022-05-17 |
FA | 2022-05-17 |
If a count is performed such as
data_count <-data |> count(activity_date, name = ("crawls"))
the expected results are:
activity_date | crawls |
---|---|
2022-05-06 | 1 |
2022-05-07 | 1 |
2022-05-09 | 1 |
2022-05-15 | 1 |
2022-05-16 | 5 |
2022-05-17 | 2 |
I want to be able to show that there were zero false crawls on the missing days such that a table such as this results:
activity_date | crawls |
---|---|
2022-05-06 | 1 |
2022-05-07 | 1 |
2022-05-08 | 0 |
2022-05-09 | 1 |
2022-05-10 | 0 |
2022-05-11 | 0 |
2022-05-12 | 0 |
2022-05-13 | 0 |
2022-05-14 | 0 |
2022-05-15 | 1 |
2022-05-16 | 5 |
2022-05-17 | 2 |
How can I do this, add in those missing days for which there were no false crawls?
Thanks,
Jeff