-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Chapter 1 download data code isn't working #57
Comments
Which file is this in? |
This is in chap01.ipynb (https://github.com/AllenDowney/ThinkBayes2/blob/master/notebooks/chap01.ipynb) |
This notebook runs on Colab without problems: https://colab.research.google.com/github/AllenDowney/ThinkBayes2/blob/master/notebooks/chap01.ipynb I recommend running the notebooks on Colab. I think I don't understand what you are asking. |
What I was trying to say was that the notebook I linked doesn't retrieve the For extra context, here is the error I was getting when running the non-Collab notebook:
|
It's intentional that it's coming from a different repo. But maybe that's causing something in your development environment to object. Anyway, if Colab works, you are all set! |
I found that the original code seems to be outdated since it seems to use a different repository name (BiteSizeBayes) and it uses a csv file whereas the current data is in a gss_bayes folder which I don't know how to read/use (normally I use csv files). Can anyone give guidance on how to read in this data (e.g. docs) or a pointer on where to find the original GSS data? Thanks in advance.
Here's the original code for context:
`# Load the data file
from os.path import basename, exists
def download(url):
filename = basename(url)
if not exists(filename):
from urllib.request import urlretrieve
local, _ = urlretrieve(url, filename)
print('Downloaded ' + local)
download('https://github.com/AllenDowney/BiteSizeBayes/raw/master/gss_bayes.csv')`
The text was updated successfully, but these errors were encountered: