viewof view_line_plote = embed({
title: "Subway Ridership by Bike Sharing Intensity",
data: {values: addMean},
layer:[{
mark:"line",
encoding:{
x: {timeUnit: "yearmonth", field: "Date", type: "temporal",
axis: {title: "Date"}},
y:{aggregate: "mean",field: "mean", type: "quantitative"},
color: {field: "high", type: "nominal"}
}
},
{
mark:"line",
encoding:{
x: {timeUnit: "yearmonth", field: "Date", type: "temporal",
axis: {title: "Date"}},
y:{aggregate: "mean",field: "mean", type: "quantitative"},
color: {field: "high", type: "nominal"}
}
},
{
mark: "line",
encoding: {
x: {timeUnit: "yearmonth", field: "Date", type: "temporal",
axis: {title: "Date"}},
y: {
aggregate: "mean",field: "meanDaily", type: "quantitative",scale: {"domain": [40,100]}},
color: {field: "high", type: "nominal"}
}},
{
mark: {type: "errorband", extent: "stdev", opacity: 0.2},
encoding: {
x: {timeUnit: "yearmonth", field: "Date", type: "temporal",
axis: {title: "Date"}},
y: {
field: "meanDaily", type: "quantitative",scale: {"domain": [40,100]},
title:"Mean of Subway Ridership (95% CIs)"
},
color: {field: "high", type: "nominal"}
}}
]
})