TransWikia.com

How do I force the refresh of a ResourceData object?

Mathematica Asked on December 27, 2020

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*)

2 Answers

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

ResourceSearch["covid"];
covid=ResourceData[...];

Answered by Zviovich on December 27, 2020

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

See ResourceUpdate documentation and Wolfram Data Repository.

Answered by Qbyte on December 27, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP