I adapted the python script to download on my laptop the latest data file from Fuel Watch into a folder which is defined as a datasource for Power BI desktop.
In order to get daily data from Fuel Watch I used Windows task scheduler so that this script is run every day.
My own script (GetLastestFuelData) in on Github as https://github.com/ozivier/FuelWatch
The next step was to set up also an automatic refresh of the data in Power BI. It is possible to do automatic refresh in Power BI service (but not in my Power BI desktop – as far as I know). To get daily refresh I set up a gateway connection with my own laptop.
Voila, fuel data should now automatically refresh every day on this website.
In practice the process is a but clunky as it seems that
- The windows task scheduler does not run at night when my laptop is on sleep. There is an option to wake the laptop in windows scheduler however I have not figure out to make it work effectively.
- Furthermore my laptop session needs also to be open at the scheduled refresh time in order for the Power Bi app daily refresh to proceed.
