Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically updating README.md #3

Closed
Arinerron opened this issue Mar 2, 2020 · 9 comments
Closed

Automatically updating README.md #3

Arinerron opened this issue Mar 2, 2020 · 9 comments

Comments

@Arinerron
Copy link

@Arinerron Arinerron commented Mar 2, 2020

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!

@AaronWard AaronWard pinned this issue Mar 2, 2020
@AaronWard

This comment has been minimized.

Copy link
Owner

@AaronWard AaronWard commented Mar 2, 2020

@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

@Arinerron

This comment has been minimized.

Copy link
Author

@Arinerron Arinerron commented Mar 2, 2020

@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.

@Arinerron

This comment has been minimized.

Copy link
Author

@Arinerron Arinerron commented Mar 3, 2020

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.

@AaronWard AaronWard unpinned this issue Mar 4, 2020
@AaronWard

This comment has been minimized.

Copy link
Owner

@AaronWard AaronWard commented Mar 11, 2020

@Arinerron any update on this?

@piyush-kgp

This comment has been minimized.

Copy link

@piyush-kgp piyush-kgp commented Mar 16, 2020

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.

@AaronWard

This comment has been minimized.

Copy link
Owner

@AaronWard AaronWard commented Mar 19, 2020

@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

@piyush-kgp

This comment has been minimized.

Copy link

@piyush-kgp piyush-kgp commented Mar 19, 2020

@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.

@AaronWard

This comment has been minimized.

Copy link
Owner

@AaronWard AaronWard commented Mar 19, 2020

@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

@AaronWard

This comment has been minimized.

Copy link
Owner

@AaronWard AaronWard commented Mar 25, 2020

Closing due to inactivity

@AaronWard AaronWard closed this Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.