The province of Ontario does weekly Covid data updates which I
summarize and post on the DSLReports Canchat subforum, e.g.
https://www.dslreports.com/forum/r33854514-#google_vignette  Note the
data gap in the pink and brown lines on the 3rd and 4th graphs.  That's
actual missing data.  In the underlying spreadsheet page those gaps
initially show up as zeros.  I manually blank out region B1258:C1299
(i.e. 2023/09/09 to 2023/10/20) every week when I update so that it
doesn't show up as zero hospitalizations.  How do I set up and execute a
macro to to zap the contents of region B1258:C1299 on a page?

  I've recently solved another problem with the COVID data that I
mentioned in the past.  The data files could be downloaded by a browser
but "wget" was being rejected.  The data keepers seem to be filtering
based on the default "wget" user agent.  I've bypassed that by faking
a valid browser user agent... any valid browser user agent.


#!/bin/bash
rm -rf conposcovidloc.csv
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) 
Gecko/20100101 Firefox/83.0" 
https://data.ontario.ca/dataset/f4112442-bdc8-45d2-be3c-12efae72fb27/resource/455fd63b-603d-4608-8216-7d8647f43350/download/conposcovidloc.csv


#!/bin/bash
rm -rf region_hospital_icu_covid_data.csv
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) 
Gecko/20100101 Firefox/83.0" 
https://data.ontario.ca/dataset/8f3a449b-bde5-4631-ada6-8bd94dbc7d15/resource/e760480e-1f95-4634-a923-98161cfb02fa/download/region_hospital_icu_covid_data.csv


  Note that I have to first remove the previous week's file, because wget
won't overwrite it, and skips the download altogether.

-- 
Roses are red
Roses are blue
Depending on their velocity
Relative to you

Reply via email to