AaronWard / covidify

Covidify - corona virus report and dataset generator for python 📈 [no longer being updated]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically updating README.md

Arinerron opened this issue · comments

Could you please host the images on a remote server and setup a cron job to update these images often (every hour perhaps?) then load the images from the remote server in the README? That way I can just check the README.md here to keep up to date.

Thanks!

commented

@Arinerron Great idea, I was actually thinking about automating the job on heroku.

(every hour perhaps?)

The JHU dataset only gets updated once per day. So every hour is not needed. but I do have it on the backlog to automate the pipeline

@AaronWard Thanks for the update, fellow Aaron. 😉

I haven't looked into the code at all to see what information it requires, but Wikipedia has several (less reliable) tables with information that are updated nearly immediately when news is released. I'll look into possible integration with it as a secondary (configurable) data source tonight or tomorrow.

I don't mind temporarily hosting this. I set up a cron job to update every hour. Files are hosted at this base endpoint: https://romania.arinerron.com/covid/reports/images/ (i.e. just append the jpg filenames). I'll add this in PR #4.

commented

@Arinerron any update on this?

Hi all, I want to take this up. I think a much cleaner data source could be this CSV from a JHU repository which gets updated every day (even if it is not every hour).
https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv

I can write an app and host on Heroku that will give us an image link which we can then embed in readme.md. Of course, I will also create a PR here containing all of this.
Considering most people here speak python, I'll keep everything as pythonic possible.

commented

@piyush-kgp Heroku doesn't allow you to write to the file system, so there is no way to save the output images. I have tried already unfortunately

@AaronWard If we have a flask server, we can put files in a "static folder" and that gets served.
For example:

import flask
app = flask.Flask("test app", static_url_path="/static")
app.run("0.0.0.0", 5000)

Any file located at "static" folder can be accssible to you.

I was looking at libraries to create map. I found bokeh to be not very useful (requires selenium library, webdrivers etc. to generate static plots). cartopy or basemap might be good choices.

Expect a PR on this by today/tomorrow.

commented

@piyush-kgp I have tried this already and couldn't get it to work, seen in this repo: https://github.com/AaronWard/covid-19-analysis-hosting. But if you could get it to work that would be great

As for the map, i had some installation issues for cartopy so i gave up lol

commented

Closing due to inactivity