I’ve wrangled the Google mobility data for USA and Canada, and put it on Wolfram Cloud. Note that the dataset for USA goes down to the county level, and for Canada down to province/state level.
Collecting data
Collecting data
Get dataset:
In[]:=
ds=CloudGetCloudObject;
Show two rows as example:
In[]:=
ds[{2,-1}]
Out[]=
Visualizations
Visualizations
Red fillings in the following graphs correspond to weekends.
Ontario province
Ontario province
Select the Ontario data:
In[]:=
ontario=dsSelectFirst#State==&;
Visualize the data:
In[]:=
MulticolumnKeyValueMapDateListPlot{#2,TimeSeriesResample[#2,"Weekend"]},PlotLabel#1,&[Normal[ontario[4;;]]],2
Out[]=
LA county
LA county
Select the LA county data:
In[]:=
la=dsSelectFirst#County==&;
Visualize the data:
In[]:=
MulticolumnKeyValueMapDateListPlot{#2,TimeSeriesResample[#2,"Weekend"]},PlotLabel#1,&[Normal[la[4;;]]],2
Out[]=
In[]:=
dsSelect#Country==&&#CountyMissing["NotAvailable"]&2;;-1,DateListPlot{#Workplaces,TimeSeriesResample[#Workplaces,"Weekend"]},PlotLabelIfMatchQ#State,,Style["NV",Red,Bold],#State["StateAbbreviation"],Joined{True,False},Filling{1Axis,2{Axis,Directive[Opacity[0.3],Red,Thick]}},AspectRatio,FrameTicksNone,Axes{True,None},ImageSize200,PlotRange{{"Feb 29, 2020","Apr 11, 2020"},{-80,80}},PlotStyle{Automatic,None}&//Normal//Multicolumn[#,3]&
1
4
Out[]=