kimpham54 / jekyll

static site version of Programming Historian
http://programminghistorian.org
0 stars 0 forks source link

comments from @shawngraham #7

Open kimpham54 opened 8 years ago

kimpham54 commented 8 years ago

I think though there may be a fundamental issue in that this tutorial is trying to do too much. The author has I think at least 3 separate tutorials, each one of which would be valuable to Programming Historian readers. If the Geocoding, the ogr2ogr, and leaflet sections were spun into separate lessons, the author could go into the greater detail that both Jim and I are looking for.

Perhaps show the reader how to grab with curl etc from command line?

`curl https://raw.githubusercontent.com/Robinlovelace/Creating-maps-in-R/master/data/census-historic-population-borough.csv > census.csv `

File "geocoder.py", line 17, in <module>
    main()
  File "geocoder.py", line 12, in main
    io['latitude'] = io['Area_Name'].apply(geolocator.geocode).apply(lambda x: (x.latitude))
  File "/Library/Python/2.7/site-packages/pandas/core/frame.py", line 1969, in __getitem__
    return self._getitem_column(key)
  File "/Library/Python/2.7/site-packages/pandas/core/frame.py", line 1976, in _getitem_column
    return self._get_item_cache(key)
  File "/Library/Python/2.7/site-packages/pandas/core/generic.py", line 1091, in _get_item_cache
    values = self._data.get(item)
  File "/Library/Python/2.7/site-packages/pandas/core/internals.py", line 3211, in get
    loc = self.items.get_loc(item)
  File "/Library/Python/2.7/site-packages/pandas/core/index.py", line 1759, in get_loc
    return self._engine.get_loc(key)
  File "pandas/index.pyx", line 137, in pandas.index.IndexEngine.get_loc (pandas/index.c:3979)
  File "pandas/index.pyx", line 157, in pandas.index.IndexEngine.get_loc (pandas/index.c:3843)
  File "pandas/hashtable.pyx", line 668, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12265)
  File "pandas/hashtable.pyx", line 676, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12216)
KeyError: 'Area_Name'
kimpham54 commented 8 years ago

agreed that ogr2ogr could probably be another lesson, it's probably not necessary to describe it here, just to allude to it as a possibility when there are clearly other easier options

kimpham54 commented 8 years ago

pandas error moved to new issue #8