I have a dataframe that looks something like this:
County 2020-01-22 2020-01-23 2020-01-24
Autauga 0 1 0
Baldwin 0 2 4
Barbour 0 3 1
However, I would like to reformat it so that I get counts per day by county. Something like this:
County year month day value
Autauga 2020 01 22 0
Baldwin 2020 01 22 0
Barbour 2020 01 22 0
Autauga 2020 01 23 1
Baldwin 2020 01 23 2
Barbour 2020 01 23 3
Autauga 2020 01 24 0
Baldwin 2020 01 24 4
Barbour 2020 01 24 1
We could use just
pivot_longerand specify thenames_sep-output
data