@@ -64,31 +64,31 @@ parse_source <- function(source, base_url) {
6464as.data.frame.covidcast_data_signal_list <- function (x , ... ) {
6565 as.data.frame(
6666 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+ )
9292}
9393
9494# ' @export
@@ -157,21 +157,26 @@ covidcast_epidata <- function(base_url = global_base_url, timeout_seconds = 30)
157157as.data.frame.covidcast_data_source_list <- function (x , ... ) {
158158 as.data.frame(
159159 do.call(
160- rbind ,
160+ rbind ,
161161 lapply(
162- x ,
162+ x ,
163163 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+ )
166168 sub <- z [cols ]
167169 sub $ signals <- paste0(
168- sapply(z $ signals , function (y ) y $ signal ), collapse = " ,"
170+ sapply(z $ signals , function (y ) y $ signal ),
171+ collapse = " ,"
169172 )
170173 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+ )
175180}
176181
177182print.covidcast_epidata <- function (x , ... ) {
0 commit comments