-
Notifications
You must be signed in to change notification settings - Fork 20
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
JSON in iPython Notebook #3
Comments
I think you are doing it correctly - I got the same error on my VM too. It appears that the >>> import pandas as pd
>>> pd.version.version to check your version of pandas. We could probably install pandas via |
I updated my pandas to the most recent version, and that seems to work in getting iPython to read the data! Thanks @kqdtran! There still seems to be an error in reading the JSON data in iPython notebook: I keep getting |
@reenashah Yep! I got the same error too. There is probably a way to get import urllib
import json
import pandas as pd
url = 'http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_week.geojson'
d = json.loads(urllib.urlopen(url).read())
data = pd.DataFrame(d.items())
data In the docs, |
@kqdtran you rock!! Thanks!! 👍 |
@kqdtran thanks! |
I installed pandas since I didn't have it previously, as well as the other packages from the preliminary set up steps.
I was able to reproduce the iPython Notebook when we read as a csv file, but I'm also having trouble in reading in JSON format. I chose the following feed:
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_week.geojson
But when running the cell with code
There was an
The instructions say
but I'm not sure why the error is occurring. Also as I was searching online, there seem to be differences between the urllib and urllib2 packages, and sometimes people have been importing json directly and then using json.loads
Am I using the wrong feed or importing the wrong packages or using the wrong functions?
Thanks!
The text was updated successfully, but these errors were encountered: