2
$\begingroup$

The following code will read the cases of COVID around the world to be used later for analysis. This is in a notebook that I use to check the status of the pandemic on a daily basis.

When opening the file the following day, the ResourceData is not updated with the latest data.

covid = ResourceData[ResourceObject[
Association[Rule["Name","Epidemic Data for Novel Coronavirus COVID-19"],Rule["UUID","dba89a96-2b3a-4254-8824cb1f9e01a94b"],
Rule["ResourceType","DataResource"],Rule["Version","112.0.0"],Rule["Description","Tracking the Novel Coronavirus (COVID-19) Global Cases"],
Rule["RepositoryLocation",
URL["https://www.wolframcloud.com/objects/resourcesystem/api/1.0"]],
Rule["WolframLanguageVersionRequired","10.0"],Rule["ContentSize",Quantity[2.935288`,"Megabytes"]],Rule["ContentElements",
List["AustraliaProvinces","CanadaProvinces","ChinaProvinces","Dataset","USCounties","USStates","WorldCountries"]]]]

covid[1]
(*values from previous day*)
$\endgroup$
2
$\begingroup$

I was able to force the refresh by searching for the resource first.

ResourceSearch["covid"];
covid=ResourceData[...];
$\endgroup$
2
$\begingroup$

According to the documentation you can use the ResourceUpdate function which updates the ResourceObject.

See ResourceUpdate documentation and Wolfram Data Repository.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.