@@ -64,31 +64,31 @@ parse_source <- function(source, base_url) {
64
64
as.data.frame.covidcast_data_signal_list <- function (x , ... ) {
65
65
as.data.frame(
66
66
do.call(rbind , lapply(x , function (z ) {
67
- sub <- z [c(
68
- " source" ,
69
- " signal" ,
70
- " name" ,
71
- " active" ,
72
- " short_description" ,
73
- " description" ,
74
- " time_type" ,
75
- " time_label" ,
76
- " value_label" ,
77
- " format" ,
78
- " category" ,
79
- " high_values_are" ,
80
- " is_smoothed" ,
81
- " is_weighted" ,
82
- " is_cumulative" ,
83
- " has_stderr" ,
84
- " has_sample_size"
85
- )]
86
- sub $ geo_types <- paste0(names(z $ geo_types ), collapse = " ," )
87
- sub
88
- })
89
- ),
90
- row.names = sapply( x , function ( y ) y $ key ),
91
- ... )
67
+ sub <- z [c(
68
+ " source" ,
69
+ " signal" ,
70
+ " name" ,
71
+ " active" ,
72
+ " short_description" ,
73
+ " description" ,
74
+ " time_type" ,
75
+ " time_label" ,
76
+ " value_label" ,
77
+ " format" ,
78
+ " category" ,
79
+ " high_values_are" ,
80
+ " is_smoothed" ,
81
+ " is_weighted" ,
82
+ " is_cumulative" ,
83
+ " has_stderr" ,
84
+ " has_sample_size"
85
+ )]
86
+ sub $ geo_types <- paste0(names(z $ geo_types ), collapse = " ," )
87
+ sub
88
+ })),
89
+ row.names = sapply( x , function ( y ) y $ key ),
90
+ ...
91
+ )
92
92
}
93
93
94
94
# ' @export
@@ -157,21 +157,26 @@ covidcast_epidata <- function(base_url = global_base_url, timeout_seconds = 30)
157
157
as.data.frame.covidcast_data_source_list <- function (x , ... ) {
158
158
as.data.frame(
159
159
do.call(
160
- rbind ,
160
+ rbind ,
161
161
lapply(
162
- x ,
162
+ x ,
163
163
FUN = function (z ) {
164
- cols <- c(" source" , " name" , " description" , " reference_signal" ,
165
- " license" )
164
+ cols <- c(
165
+ " source" , " name" , " description" , " reference_signal" ,
166
+ " license"
167
+ )
166
168
sub <- z [cols ]
167
169
sub $ signals <- paste0(
168
- sapply(z $ signals , function (y ) y $ signal ), collapse = " ,"
170
+ sapply(z $ signals , function (y ) y $ signal ),
171
+ collapse = " ,"
169
172
)
170
173
sub
171
- })
172
- ),
173
- row.names = sapply(x , function (z ) z $ source ),
174
- ... )
174
+ }
175
+ )
176
+ ),
177
+ row.names = sapply(x , function (z ) z $ source ),
178
+ ...
179
+ )
175
180
}
176
181
177
182
print.covidcast_epidata <- function (x , ... ) {
0 commit comments