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

have colab and/or github.dev env ready try #206

Open
djay opened this issue Nov 28, 2021 · 5 comments
Open

have colab and/or github.dev env ready try #206

djay opened this issue Nov 28, 2021 · 5 comments

Comments

@djay
Copy link
Owner

djay commented Nov 28, 2021

Would have all the data loaded so you can explore it with some example plots in a notebook
or give you a starter development environment to add new plots or run pytest or add a scraper.

@djay
Copy link
Owner Author

djay commented Nov 28, 2021

@kahnwong is this something you could do?

@kahnwong
Copy link
Contributor

tried out

# Tests Plots
df = scrape_and_combine()
save_tests_plots(df)

from covid_plot.py but got

---------------------------------------------------------------------------
RemoteTraceback                           Traceback (most recent call last)
RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/Users/kahnwong/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/Users/kahnwong/Git/covidthailand/covid_data_dash.py", line 123, in dash_daily
    assert df[df['Recovered'] == 0.0].empty
AssertionError
"""

The above exception was the direct cause of the following exception:

AssertionError                            Traceback (most recent call last)
/var/folders/mc/1bzxsp8x6x1dl12nd62j64s40000gn/T/ipykernel_90632/3364214411.py in <module>
      8 
      9 # Tests Plots
---> 10 df = scrape_and_combine()
     11 save_tests_plots(df)

~/Git/covidthailand/covid_data.py in scrape_and_combine()
    263         en_situation = en_situation.get()
    264 
--> 265         dash_daily = dash_daily.get()
    266         dash_ages = dash_ages.get()
    267         dash_by_province = dash_by_province.get()

~/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/pool.py in get(self, timeout)
    769             return self._value
    770         else:
--> 771             raise self._value
    772 
    773     def _set(self, i, obj):

AssertionError: 

I guess it's better to read from a static dump. Although the "release" link on the readme seems to be broken 🤔

@djay
Copy link
Owner Author

djay commented Dec 3, 2021

@kahnwong I think a notebook is more useful for helping with plotting rather than scraping so downloading the csv release makes sense as thats the fastest way. Scraping I think is best done using an IDE and via pytest? Otherwise you need to get the 1.5G docs download...

I tested the link on https://github.com/djay/covidthailand#running-just-plots-or-latest-files and it seems to work fine for me.
Would it be something people open in colab or they have to check out and run locally?

@kahnwong
Copy link
Contributor

kahnwong commented Dec 3, 2021

I could do both: make a local nb but also make it available on colab too. Code drift should be minimal since it's mostly a wrapper function

@kahnwong
Copy link
Contributor

kahnwong commented Dec 3, 2021

pr: #219

WIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants