Reputation: 93
I have about 150 rainfall stations in the following format; The first row is years and the second row is months 1-12 repeating for each year.
Data Frame:
1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1989,1990,1990,1990,1990,1990,1990,1990,1990,1990,1990,1990,1990
1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12
11.8,0,0,3.3,0,0,0,0,0,0,0,0,1.8,0,0,0,0,0,0,0,0,0,0,0
4.4,0,2.1,4.5,0,0,0,0,47.9,3.6,15.1,45.3,3,0,36.8,0,0,0,0,0,1.3,0,0,10
5.2,0,0,0,2.2,0,0,0,0,2.7,0,0,0,3.2,0,3.9,0,0,0,0,0,0,5.8,12.8
7.1,0,0,11.3,4,0,0,0,0,8.2,0,0.9,0,0,47.2,11.1,0,0,0,0,0,0,0,10.9
0,0,0,0,0,0,0,0,31.7,8.3,0,5.3,0,40.4,0,0,0,0,0,0,0,3.4,11.7,0
0,0,0,12,0,0,0,0,3.3,6.1,0,6.9,0,1.5,2.3,5.6,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,5.1,0,0,0,7,4.6,0,0,26.6,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,6.5,0,0,0,0,2.7,0,33.1,0,0,0,0,0,0,0,0
0,0,0,25,0,0,0,0,0,0,2.2,0,0,0,0,4,0,0,0,0,0,0,0,37.3
0,0,0,12,7.3,0,0,0,0,0,8.5,0,0,1.8,0,1.9,0,0,0,0,0,0,0,3.3
0,0,0,5.2,1.6,0,0,6.7,0,0,0,8.6,0,0,17.2,3.7,0,0,0,0,0,0,7.3,0
0,0,12,24.9,12,0,0,0,0,3.3,0,3.2,0,2.5,0,0,0,0,0,0,0,0,0,4.3
0,0,0,0,0,0,0,0,0,2,0,2.4,0,5.8,0,0,11,0,0,0,0,0,11.7,42
0,0,0,3.2,0,0,0,17.6,0,0,0,0,0,7.3,0,0,0,0,0,0,0,9.1,15,0
0,0,2.2,0,7,0,0,0,0,5.8,48.8,0,0,0,0,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,0,0,47.9,3.6,15.1,45.3
1989,3,5.2,0,0,0,2.2,0,0,0,0,2.7,0,0
1989,4,7.1,0,0,11.3,4,0,0,0,0,8.2,0,0.9
1989,5,0,0,0,0,0,0,0,0,31.7,8.3,0,5.3
1989,6,0,0,0,12,0,0,0,0,3.3,6.1,0,6.9
1989,7,0,0,0,0,0,0,0,0,5.1,0,0,0
1989,8,0,0,0,0,0,0,0,0,6.5,0,0,0
1989,9,0,0,0,25,0,0,0,0,0,0,2.2,0
1989,10,0,0,0,12,7.3,0,0,0,0,0,8.5,0
1989,11,0,0,0,5.2,1.6,0,0,6.7,0,0,0,8.6
1989,12,0,0,12,24.9,12,0,0,0,0,3.3,0,3.2
1989,13,0,0,0,0,0,0,0,0,0,2,0,2.4
1989,14,0,0,0,3.2,0,0,0,17.6,0,0,0,0
1989,15,0,0,2.2,0,7,0,0,0,0,5.8,48.8,0
1989,16,0,0,29.6,9.7,4,0,0,3,0,0,3.6,0
1989,17,2.1,0,2,0,0,0,0,1.8,8.7,3,0,0
1989,18,6.3,0,0,0,0,0,0,0,0,0.6,0,2
1989,19,0,0,0,0,0,0,0,0,0,0,12.2,0
1989,20,0,0,0,8,0,0,0,0,0,0,0,0
1989,21,0,0,7.6,0,0,0,0,0,0,0,25.4,0
1989,22,0,0,28.5,0,0,0,0,0,0,0,1.8,12
1989,23,0,8,0,20.6,0,0,0,0,0,0,1.9,0
1989,24,0,0,0,0,0,0,0,0,0,0,6.2,2.4
1989,25,0,0,0,0,0,0,0,0,0,23.9,1.6,1.8
1989,26,0,0,0,15,7.1,0,0,0,0,10.4,0,0
1989,27,0,0,16.1,0,0,0,0,0.9,0,7.3,14.5,0
1989,28,0,0,0,0,0,0,0,14.3,28.8,12.7,19.2,0
1989,29,0,,0,32.3,0,0,0,0,0,15.3,0,5.1
1989,30,0,,0,3.3,0,0,0,0.9,0,1.8,7.1,18.5
1989,31,0,,0,,0,,0,0,,7.4,,4.3
1990,1,1.8,0,0,0,0,0,0,0,0,0,0,0
1990,2,3,0,36.8,0,0,0,0,0,1.3,0,0,10
1990,3,0,3.2,0,3.9,0,0,0,0,0,0,5.8,12.8
1990,4,0,0,47.2,11.1,0,0,0,0,0,0,0,10.9
1990,5,0,40.4,0,0,0,0,0,0,0,3.4,11.7,0
1990,6,0,1.5,2.3,5.6,0,0,0,0,0,0,0,0
1990,7,7,4.6,0,0,26.6,0,0,0,0,0,1,0
1990,8,0,2.7,0,33.1,0,0,0,0,0,0,0,0
1990,9,0,0,0,4,0,0,0,0,0,0,0,37.3
1990,10,0,1.8,0,1.9,0,0,0,0,0,0,0,3.3
1990,11,0,0,17.2,3.7,0,0,0,0,0,0,7.3,0
1990,12,0,2.5,0,0,0,0,0,0,0,0,0,4.3
1990,13,0,5.8,0,0,11,0,0,0,0,0,11.7,42
1990,14,0,7.3,0,0,0,0,0,0,0,9.1,15,0
1990,15,0,0,0,0,0,0,0,0,0,0,6.2,0
1990,16,0,0,0,0,0,0,0,0,0,0,0,0
1990,17,0,42.7,0,0,0,0,0,0,5,9.8,0,0
1990,18,0,0,22.8,9,0,0,0,0,0,4,0,0
1990,19,0,0,0,4.4,0,0,0,0,0,0,0,16.5
1990,20,21.9,0,0,0,0,0,0,0,0,0,0,0
1990,21,0,43.5,3.9,0,0,0,0,0,0,0,0,0
1990,22,0,0,17.7,0,0,0,0,0,0,0,0,0
1990,23,1.7,0,0,0,0,0,0,0,0,0,0,0
1990,24,0,0,7.2,7.5,0,0,0,0,0,0,0,0
1990,25,0,3.2,0,8.1,0,0,0,0,0,0,0,0
1990,26,0,15.9,0,14.3,0,0,0,0,0,3.3,0,0
1990,27,0,0,7,0,0,0,0,0,0,0,0,0
1990,28,0,0,0,0,0,0,0,0,6.1,0,7.2,0
1990,29,0,,0,0,4.1,0,0,0,0,10.9,27.8,0
1990,30,0,,0,0,0,0,0,39,7.8,0,19.3,10
1990,31,5,,0,,0,,0,0,,25.4,,0
I have created this format manually in the spreadsheet but the process is very tedious and time consuming I will need a month to prepare all the data. The required format may not necessarily contain the naming "Jan","Feb" etc it may remain with the original Numbers 1-12 will be enough. Thanks in advance.
Upvotes: 1
Views: 29
Reputation: 388817
After reading your data without header, you can transpose it, get the data in long format, convert to month names, create a day number and get the data in wide format.
library(dplyr)
library(tidyr)
t(df) %>%
as.data.frame() %>%
pivot_longer(cols = V3:V33, names_to = 'day') %>%
mutate(V2 = month.abb[V2],
day = match(day, unique(day))) %>%
pivot_wider(names_from = V2, values_from = value)
# A tibble: 62 x 14
# V1 day Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
# <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 1989 1 11.8 0 0 3.3 0 0 0 0 0 0 0 0
# 2 1989 2 4.4 0 2.1 4.5 0 0 0 0 47.9 3.6 15.1 45.3
# 3 1989 3 5.2 0 0 0 2.2 0 0 0 0 2.7 0 0
# 4 1989 4 7.1 0 0 11.3 4 0 0 0 0 8.2 0 0.9
# 5 1989 5 0 0 0 0 0 0 0 0 31.7 8.3 0 5.3
# 6 1989 6 0 0 0 12 0 0 0 0 3.3 6.1 0 6.9
# 7 1989 7 0 0 0 0 0 0 0 0 5.1 0 0 0
# 8 1989 8 0 0 0 0 0 0 0 0 6.5 0 0 0
# 9 1989 9 0 0 0 25 0 0 0 0 0 0 2.2 0
#10 1989 10 0 0 0 12 7.3 0 0 0 0 0 8.5 0
# … with 52 more rows
data
df <- structure(list(V1 = c(1989, 1, 11.8, 4.4, 5.2, 7.1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2.1, 6.3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0), V2 = c(1989L, 2L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 8L,
0L, 0L, 0L, 0L, 0L, NA, NA, NA), V3 = c(1989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0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L), V20 = c(1990L, 8L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 39L, 0L), V21 = c(1990,
9, 0, 1.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 6.1, 0, 7.8, NA), V22 = c(1990,
10, 0, 0, 0, 0, 3.4, 0, 0, 0, 0, 0, 0, 0, 0, 9.1, 0, 0, 9.8,
4, 0, 0, 0, 0, 0, 0, 0, 3.3, 0, 0, 10.9, 0, 25.4), V23 = c(1990,
11, 0, 0, 5.8, 0, 11.7, 0, 1, 0, 0, 0, 7.3, 0, 11.7, 15,
6.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.2, 27.8, 19.3,
NA), V24 = c(1990, 12, 0, 10, 12.8, 10.9, 0, 0, 0, 0, 37.3,
3.3, 0, 4.3, 42, 0, 0, 0, 0, 0, 16.5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 10, 0)), class = "data.frame", row.names = c(NA,
-33L))
Upvotes: 0
Reputation: 886938
We could read the data with read.csv
and specify header = FALSE
. Then, create a grouping column based on the second rows i.e. month row for split
ting the dataset into a list
of data.frames. Loop over the list
, change the column names with the second row (row_to_names
- from janitor
), create 'Year' column as the first
value from any of the column, remove the first row (slice(-1)
), create the 'Day' column as 'row_numberand then bind the
list elements (
bind_rows`)
library(dplyr)
library(purrr)
library(janitor)
grp <- cumsum(c(TRUE, diff(unlist(df1[2,])) < 0))
out <- split.default(df1, grp) %>%
map(~ .x %>%
row_to_names(2, remove_rows_above = FALSE) %>%
rename_all(~ month.abb[as.integer(.)]) %>%
mutate(Year = first(.[[1]])) %>%
slice(-1) %>%
mutate(Day = row_number())) %>%
bind_rows %>%
select(Year, Day, everything())
head(out)
# Year Day Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
#1 1989 1 11.8 0 0.0 3.3 0.0 0 0 0 0.0 0.0 0.0 0.0
#2 1989 2 4.4 0 2.1 4.5 0.0 0 0 0 47.9 3.6 15.1 45.3
#3 1989 3 5.2 0 0.0 0.0 2.2 0 0 0 0.0 2.7 0.0 0.0
#4 1989 4 7.1 0 0.0 11.3 4.0 0 0 0 0.0 8.2 0.0 0.9
#5 1989 5 0.0 0 0.0 0.0 0.0 0 0 0 31.7 8.3 0.0 5.3
#6 1989 6 0.0 0 0.0 12.0 0.0 0 0 0 3.3 6.1 0.0 6.9
df1 <- read.csv('file.csv', header = FALSE)
df1 <- structure(list(V1 = c(1989, 1, 11.8, 4.4, 5.2, 7.1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2.1, 6.3, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0), V2 = c(1989L, 2L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 8L,
0L, 0L, 0L, 0L, 0L, NA, NA, NA), V3 = c(1989, 3, 0, 2.1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 2.2, 29.6, 2, 0, 0, 0, 7.6, 28.5,
0, 0, 0, 0, 16.1, 0, 0, 0, 0), V4 = c(1989, 4, 3.3, 4.5, 0, 11.3,
0, 12, 0, 0, 25, 12, 5.2, 24.9, 0, 3.2, 0, 9.7, 0, 0, 0, 8, 0,
0, 20.6, 0, 0, 15, 0, 0, 32.3, 3.3, NA), V5 = c(1989, 5, 0, 0,
2.2, 4, 0, 0, 0, 0, 0, 7.3, 1.6, 12, 0, 0, 7, 4, 0, 0, 0, 0,
0, 0, 0, 0, 0, 7.1, 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