bokeh-notebooks icon indicating copy to clipboard operation
bokeh-notebooks copied to clipboard

Spelling mistakes in the tutorials

Open ashwanirathee opened this issue 5 years ago • 7 comments

Hey @ghltshubh ,I was going through the tutorials in bokeh...there are around 50 spelling mistakes(not including bad formatting,comma issues,phrasing..just plain spelling mistakes) @bryevdv pointed me to here to make the neccessary change request.. I am quite new to open source contribution or programming..but I can read:)...I read the guidelines for contributing...I created the environment and installed the requirements..

(bokeh-notebooks) ashwani@afj:~/bokeh-notebooks$ conda info

     active environment : bokeh-notebooks
    active env location : /home/ashwani/miniconda3/envs/bokeh-notebooks
            shell level : 2
       user config file : /home/ashwani/.condarc
 populated config files : 
          conda version : 4.8.2
    conda-build version : not installed
         python version : 3.7.6.final.0
       virtual packages : __glibc=2.27
       base environment : /home/ashwani/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/ashwani/miniconda3/pkgs
                          /home/ashwani/.conda/pkgs
       envs directories : /home/ashwani/miniconda3/envs
                          /home/ashwani/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/4.15.0-101-generic ubuntu/18.04.4 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

But I am stuck at this point when I run the 3) point on running the notebooks I used the command for running

git ls-files -z \*.ipynb | xargs -0 jupyter nbconvert --to notebook --inplace --execute
------------------

--------------------------------------------------------------------------
KeyError                                 Traceback (most recent call last)
<ipython-input-2-f97db1205866> in <module>
      6 
      7 # Replace the value below with your personal API key:
----> 8 api_key = os.environ["GOOGLE_API_KEY"]
      9 
     10 p = gmap(api_key, map_options, title="Austin")

~/miniconda3/envs/bokeh-notebooks/lib/python3.7/os.py in __getitem__(self, key)
    677         except KeyError:
    678             # raise KeyError with the original key value
--> 679             raise KeyError(key) from None
    680         return self.decodevalue(value)
    681 

KeyError: 'GOOGLE_API_KEY'
KeyError: 'GOOGLE_API_KEY'

details about system:

(bokeh-notebooks) ashwani@afj:~/bokeh-notebooks$ screenfetch
                          ./+o+-       ashwani@afj
                  yyyyy- -yyyyyy+      OS: Ubuntu 18.04 bionic
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 4.15.0-101-generic
           .++ .:/++++++/-.+sss/`      Uptime: 3h 3m
         .:++o:  /++++++++/:--:/-      Packages: 2798
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 4.4.20
       .:+o:+o/.          `+sssoo+/    Resolution: 1920x1080
  .++/+:+oo+o:`             /sssooo.   DE: GNOME 
 /+++//+:`oo+o               /::--:.   WM: GNOME Shell
 \+/+o+++`o++o               ++////.   WM Theme: Adwaita
  .++.o+++oo+:`             /dddhhh.   GTK Theme: Ambiance [GTK2/3]
       .+.o+oo:.          `oddhhhh+    Icon Theme: ubuntu-mono-dark
        \+.++o+o``-````.:ohdhhhhh+     Font: Ubuntu 11
         `:o+++ `ohhhhhhhhyo++os:      CPU: Intel Core i5-8250U @ 8x 3.4GHz [0°C]
           .o:`.syhhhhhhh/.oo++o`      GPU: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
               /osyyyyyyo++ooo+++/     RAM: 2040MiB / 7880MiB
                   ````` +oo+++o\:    
                          `oo++.      

What is the possible solution??I asked @bryevdv about giving more context on how to make the changes here but he is little busy :) with his work..can you give me more context :) on how to go about making changes here??

ashwanirathee avatar May 30 '20 05:05 ashwanirathee

@ashwani-rathee Google requires that an API key be specified in order to create a Google map. So the notebook that demonstrates the gmap function has to read a Google API key from a GOOGLE_API_KEY environment variable. That will need to be set before the notebook with the gmap examples can be executed.

I would say for now, just execute with some bogus value set e.g. GOOGLE_API_KEY="junk" and get the PR up and I will have to go back an fix up that one notebook in a follow on PR with the project API key in our secrets locker.

bryevdv avatar Jun 01 '20 02:06 bryevdv

@bryevdv I made all the necessary changes and saved them in the branch then The first eight were directly created using the original code

of (bokeh-notebooks) ashwani@afj:~/bokeh-notebooks/tutorial$ git ls-files -z \*.ipynb | xargs -0 jupyter nbconvert --to notebook --inplace --execute
[NbConvertApp] WARNING | Config option `template_path` not recognized by `NotebookExporter`.
[NbConvertApp] Converting notebook 00 - Introduction and Setup.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: python3
[NbConvertApp] Writing 67186 bytes to 00 - Introduction and Setup.ipynb
[NbConvertApp] Converting notebook 01 - Basic Plotting.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: python3
[NbConvertApp] Writing 2816544 bytes to 01 - Basic Plotting.ipynb

It all stopped at '09 - Geographic Plots.ipynb' and I tried the method(perhaps i didn't understand it well) you told and my own too...they still showed the same error(A litttle diff from original one though).. I skipped converting it and then went on converting using code(because I didn't know how to skip 09-file):

jupyter nbconvert --to notebook --inplace --execute  '10 - Exporting and Embedding.ipynb'

Tutorial-10,11,A1,A2,A3,A4--seemed to have been converted-all six looked like this..\

(bokeh-notebooks) ashwani@afj:~/bokeh-notebooks/tutorial$ jupyter nbconvert --to notebook --inplace --execute '11 - Running Bokeh Applications.ipynb'
[NbConvertApp] WARNING | Config option `template_path` not recognized by `NotebookExporter`.
[NbConvertApp] Converting notebook 11 - Running Bokeh Applications.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: python3
[NbConvertApp] Writing 36641 bytes to 11 - Running Bokeh Applications.ipynb

[NbConvertApp] WARNING | Config option template_path not recognized by NotebookExporter. this issue is pretty new in nbconvert: https://github.com/jupyter/nbconvert/issues/1229 What should I do about tutorial 09 and are final tutorials(10,11,A1,A2,A3,A4) converted properly??

ashwanirathee avatar Jun 01 '20 18:06 ashwanirathee

@ashwani-rathee I'm actually afraid I can't offer much help regarding using nbconvert --- when i do this I always go through the notebooks in an actual running notebook session, and then save the evaluated notebook manually.

Some of the appendices use outside libraries, and may not be up to date. I would suggest skipping them for now and making a separate issue to update them.

bryevdv avatar Jun 01 '20 18:06 bryevdv

@ashwani-rathee just a heads up that I am going to be modifying that Exporting and Embedding notebook tonight in order to close #86 before the next release.

bryevdv avatar Jun 03 '20 01:06 bryevdv

@bryevdv okay!!I would remove it from the request..there is only 1 spelling mistake in it,below header-What can I do with bokeh intearctive

# Plot a complex chart with **intearctive**   hover in a few lines of code
​
from bokeh.models import ColumnDataSource, HoverTool
from bokeh.plotting import figure
from bokeh.sampledata.autompg import autompg_clean as df
from bokeh.transform import factor_cmap

ashwanirathee avatar Jun 03 '20 03:06 ashwanirathee

@ashwani-rathee you can include, the changes actually ended up being to the environment.yml file, not the notebook

bryevdv avatar Jun 03 '20 15:06 bryevdv

Hey @bryevdv ,I have made the changes and submitted a PR regarding it,check it when you find time.:)

ashwanirathee avatar Jun 09 '20 17:06 ashwanirathee

I am going to close this simply because it is old/stale, and there will be a top-to-bottom review and overhaul of the tutorials at some point soon. FYI @ashwani-rathee I don't think your PR ever made it to this repo, I don't see a link here or anything in the history of the PR tab. Sorry for not noticing that sooner, we'd certainly love to have any contributions you can make in future PRs.

bryevdv avatar Oct 31 '22 16:10 bryevdv