Coder Social home page Coder Social logo

data-8 / textbook Goto Github PK

View Code? Open in Web Editor NEW
762.0 66.0 269.0 166.9 MB

The textbook Computational and Inferential Thinking: The Foundations of Data Science

Home Page: http://www.inferentialthinking.com

Jupyter Notebook 100.00% CSS 0.01% Shell 0.01%

textbook's Introduction

Computational and Inferential Thinking

This repository holds the Jupyter Book source for Computational and Inferential Thinking: The Foundations of Data Science.

To make a change to the book and update inferentialthinking.com

  1. Get your copy of this repository:

    git clone https://github.com/data-8/textbook
    
  2. Change the file you wish and commit it to the repository.

  3. Push your change back to the data-8/textbook repository (ideally via a pull request).

  4. That's it a GitHub Action will build the book and deploy it to inferentialthinking.com

How this repository is deployed to inferentialthinking.com

Build and preview the text locally

To build locally, pip install -r requirements.txt and then jupyter-book build .

Follow the build instructions on the Jupyter Book guide. The guide has information for how to use the Jupyter Book CLI to build this book. You can find the Jupyter Book build instructions here.

textbook's People

Contributors

a-adhikari avatar adeelcheema avatar choldgraf avatar davidwagner avatar fhdkmrn avatar henryem avatar ianabc avatar jordan-freitas avatar matthew-brett avatar mrminos avatar mujisashi avatar pamelafox avatar papajohn avatar pfdamasceno avatar pitmonticone avatar ryanlovett avatar samlau95 avatar swanson-hysell avatar vinitra avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

textbook's Issues

Font color for booleans is too light

In some places, the font color for True and False in code highlighting is so light and similar to the background that it is effectively invisible. See, e.g., the function is_goat at https://www.inferentialthinking.com/chapters/09/4/Monty_Hall_Problem; it looks like it says return, but the code actually return True and return False. For another example, see the code after "Juwan Howard was the oldest player" at https://www.inferentialthinking.com/chapters/14/2/Variability; the True in descending=True is nearly invisible. This seems to apply only to code inputs, but not to outputs; e.g., True in the output shows up fine at https://www.inferentialthinking.com/chapters/04/3/Comparison.

What shall be the process for others to point the textbook to their DataHubs?

A challenge in getting non-berkeley adoption of Data 8 is merging their jupyterhub deployment with the data 8 textbook. In it's simplest form, this just means making "interact" links etc point to another jupyterhub deployment, rather than the berkeley datahub (or binder). What's the best way to accomplish this?

Do we want non-berkeley data 8 courses to have their own textbook website? This seems like the only straightforward way for the links to point to an arbitrary jupyterhub. If so, we could either turn this repository into a cookiecutter that others can use to create gitbook files w/ custom interact links, or we could just provide a simple script users can run in order to update their links.

What seems like a natural approach here? Most of the "clone and modify" approaches are relatively straightforward technically, but it's unclear what'll be the least-confusing to people.

Convert the textbook build to the new `jupyter-book` structure

Recently @SamLau95 and I have been making improvements to the Jupyter-Book build structure. It's more lightweight now, and simpler to build and configure. It's also got some nicer features under-the-hood. Here's the DS100 repo built on it:

https://www.textbook.ds100.org/

and the jupyter-book demo:

http://predictablynoisy.com/jupyter-book/

I'm thinking about converting the data-8 build over to this system as well. Anybody have any objection to this?

Exporting notebooks with images and data

A common problem with the "Interact" links from last semester was that they didn't carry over access to images or datasets that were stored as separate files. We need to solve this problem. Here are some solutions:

  1. We add an export step that converts a source notebook into a publishable notebook by making all links to images and datasets absolute web addresses. Then, the notebook will refer to canonical image and data locations no matter where it is. Good: each notebook is still just a single file; Bad: if images are moved/removed, the notebook is broken

  2. We add an export step that generates a git sparse-checkout command for each notebook. The sparse checkout includes the notebook and the image/data directories on which it depends. The "Interact" link causes our Jupyterhub server to execute the sparse checkout, so that all the dependencies are copied along with the notebook. Good: no need to modify notebooks & everything is self-contained

I like option 2. It does require that we rewrite how "Interact" works to be git-based instead of file based, but we should do that anyway. It also requires that we keep gitbook-text public, but I like that idea.

Reconfigure hub target

In a data8x discussion, @deculler expressed a desire to 1) enable other institutions to easily alter target of the Interact links and 2) set mybinder as the default Interact target for inferentialthinking.com. This means that there would not be secondary Interact buttons (as in #30). I'm posting this issue to solicit feedback from @papajohn and @a-adhikari. Cc'ing @yuvipanda who was part of the discussion.

Some implementation possibilities:

  • DNS; institution.inferentialthinking.com. Would require a human-maintained registry to map the domain name to a hub.
  • query string params to set a cookie; inferentialthinking.com?hub=top_level_hub_url
  • gitbook widget; with or without predefined hubs

Thoughts?

Enable ebook/pdf download

Printing to PDF from the browser doesn't work at all (a single-page PDF results with the image of a scroll bar). From reading the gitbook help it seems to me that ebook download needs to be enabled from the config.

It would be great to be able to download a PDF build easily, sometimes I do need to print a few pages for paper-based reading...

Indentation in code cells

The first line of every code cell is indented a little bit. This causes code to not line up.

Here it is with a red vertical line added to make the indentation more obvious:

data-8 mathjax breaks gitbook install

info: install plugin "mathjax" (git+https://github.com/data-8/plugin-mathjax) from NPM with version git+https://github.com/data-8/plugin-mathjax
make: Entering directory '/gitbook/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc: In static member function 'static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)':
../src/contextify.cc:150:16: error: 'class v8::ObjectTemplate' has no member named 'SetAccessCheckCallbacks'; did you mean 'SetAccessCheckCallback'?
         otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
                ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
contextify.target.mk:89: recipe for target 'Release/obj.target/contextify/src/contextify.o' failed
make: Leaving directory '/gitbook/node_modules/contextify/build'

The install completes if I swap data-8's mathjax with just "mathjax" in book.json.

Minard graphic is mentioned but not introduced, explained, or displayed

In Chapter 6, the data from Minard's famous graphic is used (in table form), however, the graphic itself is never shown and the graphic is not introduced or explained in the textbook. It's referenced in lecture so possibly it was included in an old edition of the book but got (intentionally or unintentionally) removed in the current edition.

misspelling in Books.ipynb

In the code bellow, HF and LW are not capitalized (as they were when created).

plots.scatter(chars_periods_hf[1], chars_periods_hf[0], color='darkblue')
plots.scatter(chars_periods_lw[1], chars_periods_lw[0], color='gold')

Add privacy chapter

We removed the privacy notebook some time ago because it caused generating a PDF to blow up (see #7). However I think that might no longer be relevant, as we no longer have a way to generate PDFs.

I suggest we add a chapter on privacy, from the privacy notebook.

Remove old files from this repository's history to reduce size

Currently, cloning the data 8 textbook repo takes a long time on a non-fast internet connection. This is because the repo is nearly 140mb in size!

I ran a quick git history file size script and found the following files in git history that are over 500KB.

What do folks think about going through our git history and removing any file over 500KB that isn't currently in the repository?

Here's the list of files (as you can see there are many duplicates in there)

100755 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   notebooks/trip.csv
100644 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   notebooks/trip.csv
100644 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   data/trip.csv
100644 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   content/chapters/trip.csv
100644 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   _chapters/trip.csv
100644 blob d2d18e5b6520d59f2ca1bb9205966901e371c07a 43012650   _build/chapters/trip.csv
100644 blob 990ccbf23748db284ec08b606bdae15f9f8eb597 38702692   book.pdf
100644 blob 027fb6107edbc24b42e1a9ecd2792ed2695d6a8f 32346714   notebooks/all-lprs.csv.gz
100644 blob 027fb6107edbc24b42e1a9ecd2792ed2695d6a8f 32346714   data/all-lprs.csv.gz
100644 blob 70b40b57a5245fee78bfe10195a605ddf85a8bc1 10332739   notebooks/san_francisco_2015.csv
100644 blob 70b40b57a5245fee78bfe10195a605ddf85a8bc1 10332739   data/san_francisco_2015.csv
100644 blob 70b40b57a5245fee78bfe10195a605ddf85a8bc1 10332739   content/chapters/san_francisco_2015.csv
100644 blob 70b40b57a5245fee78bfe10195a605ddf85a8bc1 10332739   _chapters/san_francisco_2015.csv
100644 blob 70b40b57a5245fee78bfe10195a605ddf85a8bc1 10332739   _build/chapters/san_francisco_2015.csv
100644 blob b712368a4a34e737ae702864555f3e6917bc7603 8373602    notebooks/airline_ontime.csv
100644 blob 8e1a07f1da16dd544e56c7831352a7eaa1e7553f 7806463    notebooks/airline_ontime.csv
100644 blob 8e1a07f1da16dd544e56c7831352a7eaa1e7553f 7806463    data/airline_ontime.csv
100644 blob 8e1a07f1da16dd544e56c7831352a7eaa1e7553f 7806463    content/chapters/airline_ontime.csv
100644 blob 8e1a07f1da16dd544e56c7831352a7eaa1e7553f 7806463    _chapters/airline_ontime.csv
100644 blob 8e1a07f1da16dd544e56c7831352a7eaa1e7553f 7806463    _build/chapters/airline_ontime.csv
100644 blob 66ad0e165b09d65fcee0b7fc20a6d1dac1ae48bd 2615895    images/function_execution.jpg
100644 blob d2d42784ec852c5e33b7b10e9b00b770bdd685f1 2482316    images/function_definition.key
100644 blob 9634e429713a1664492ed806fd676d66c6c7eaee 2397433    images/minard.png
100644 blob be8e76820b292695b989029b6fafda0530c48670 1994091    images/post_bad_graph.png
100644 blob be8e76820b292695b989029b6fafda0530c48670 1994091    images/bad_post_graph.png
100644 blob 01f9f859cd1e719b46a33e922229038c9406f012 1782803    images/function_definition.jpg
100644 blob 52179b5ff86201ea459d8748079e5fed4a249f0b 1433869    notebooks/Bootstrap.ipynb
100644 blob 55b1bb4982508de51c5a7aad73a15c04178cc9cb 1433827    notebooks/Bootstrap.ipynb
100644 blob 8b1e32ff595eb9dcba006f4f780f11509a75b335 1433799    notebooks/Bootstrap.ipynb
100644 blob 3589108ea3ec9f76e6779f54e9713bb1167179ec 1388718    content/chapters/13/2/Bootstrap.ipynb
100644 blob 5fc6557335b45c20bf79eeb65b61a2cf3a406126 1388666    content/chapters/13/2/Bootstrap.ipynb
100644 blob cd32d34f4ad5b735e3f87d0203f607a08c9b2b7d 1388664    notebooks/13/2/Bootstrap.ipynb
100644 blob 73e96a1e7e6a583e5dd6aba7601bfa00d0acab48 1388663    notebooks/13/2/Bootstrap.ipynb
100644 blob 73e96a1e7e6a583e5dd6aba7601bfa00d0acab48 1388663    content/chapters/13/2/Bootstrap.ipynb
100644 blob 5623842e6f44a495fb3cdbfae179c4e641a802ad 1384088    notebooks/13/2/Bootstrap.ipynb
100644 blob 3eb80feb99a2a234733144e64fa886bf9e024770 1350185    notebooks/13/2/Bootstrap.ipynb
100644 blob 91b4f2d6276856bbcb171c3b6380af8e2b4db359 1350184    notebooks/13/2/Bootstrap.ipynb
100644 blob 9e74f4794a814d5967267002abe752c159253ff1 1053440    notebooks/little_women.txt
100644 blob 9e74f4794a814d5967267002abe752c159253ff1 1053440    data/little_women.txt
100644 blob 9e74f4794a814d5967267002abe752c159253ff1 1053440    chapters/01/3/little_women.txt
100644 blob 8540f026a22f9e9285c13b24292796f20e021011  994676    node_modules/gitbook-plugin-mathjax/node_modules/MathJax-node/node_modules/MathJax/unpacked/jax/output/SVG/fonts/Latin-Modern/NonUnicode/Regular/Main.js
100644 blob 95070752147c526a5e41f2e5fcad6cd378855385  960806    notebooks/house.csv
100644 blob 95070752147c526a5e41f2e5fcad6cd378855385  960806    data/house.csv
100644 blob 95070752147c526a5e41f2e5fcad6cd378855385  960806    content/chapters/house.csv
100644 blob 95070752147c526a5e41f2e5fcad6cd378855385  960806    _chapters/house.csv
100644 blob 95070752147c526a5e41f2e5fcad6cd378855385  960806    _build/chapters/house.csv
100644 blob 7a00cc9302b04ffb2266e9219ba582578642c56f  935467    notebooks/Regression_Line.ipynb
100644 blob 8bff93f3223e9494429ed4c59b53d5f9973a81c5  933159    notebooks/Regression_Line.ipynb
100644 blob 770037c8ce2db302327be1eb0f986c94fffdd864  930533    notebooks/Regression_Line.ipynb
100644 blob 75092fb92406d6e707c39a0bc3ffb6e6fabcfd10  930523    notebooks/Regression_Line.ipynb
100644 blob 0352f684d4ddf765ec333876bd93cbefb014196f  930522    notebooks/Regression_Line.ipynb
100644 blob d639fd67e7e0e6567f4edc48ef5a398cbde9fccf  929381    notebooks/Training_and_Testing.ipynb
100644 blob 38772dbb6b8f2412103d6863ba6f7eef23778826  886388    notebooks/Nearest_Neighbors_old.ipynb
100644 blob 38772dbb6b8f2412103d6863ba6f7eef23778826  886388    notebooks/Nearest_Neighbors.ipynb
100644 blob 38772dbb6b8f2412103d6863ba6f7eef23778826  886388    notebooks/Nearest Neighbors.ipynb
100644 blob 127fc54ac4c5adb52d4a60bab8c2c92b0418fcf8  883590    notebooks/bootstrap_pic.png
100644 blob 127fc54ac4c5adb52d4a60bab8c2c92b0418fcf8  883590    notebooks-images/Bootstrap_25_0.png
100644 blob 127fc54ac4c5adb52d4a60bab8c2c92b0418fcf8  883590    images/bootstrap_pic.png
100644 blob 127fc54ac4c5adb52d4a60bab8c2c92b0418fcf8  883590    _build/images/chapters/13/2/Bootstrap_25_0.png
100644 blob 22ac694112863548689d34e7564eb5e0a27a56e4  825726    images/canada_incomes.png
100644 blob b8ed1ffcef51fa6529f0cb160cd6fbd2e9263bcc  803788    notebooks/Regression_Line.ipynb
100644 blob f7ef14780bd7e522800aa3d70558aec60358fbd8  689645    notebooks/Nearest Neighbors.ipynb
100644 blob b7d09c3b9ce34bf54a38af044bbf5d9901ddc0a2  689644    notebooks/Nearest Neighbors.ipynb
100644 blob 7d7a379eb6369188eec08c103d0f933326247a5e  689587    notebooks/Nearest Neighbors.ipynb
100644 blob fce1af3f2353ca499f123f18df11b08827f5c47a  689542    notebooks/Nearest Neighbors.ipynb
100644 blob 57baad3697af5e398b81a657abcdf14eb8172160  679272    notebooks/RegressionInference.ipynb
100644 blob 88b04b5181c49a9c946490f45ed56cf87e479f1e  675946    notebooks/RegressionInference.ipynb
100644 blob d952b3b12ca185f37d3446954ef35871e638e754  675929    notebooks/RegressionInference.ipynb
100644 blob fc2e4c15346ff60d0e75f0120869d2e78e1d1f33  675894    notebooks/RegressionInference.ipynb
100644 blob c30269edde77753a8539622a13af31f936beef79  669960    notebooks/Regression_Line.ipynb
100644 blob 86797041e16d97ea1a5faead5450245a3d9dec80  669959    notebooks/Regression_Line.ipynb
100644 blob 4fdabd035d2d765a61bbb668d777c9a0d57d11cf  655189    content/chapters/15/2/Regression_Line.ipynb
100644 blob 2389016e7135cbe610be3b945b291d0e08c2eabe  655065    content/chapters/15/2/Regression_Line.ipynb
100644 blob 772af4adf9a420250d4b55ff4d5cb94acd71a939  655062    notebooks/15/2/Regression_Line.ipynb
100644 blob 772af4adf9a420250d4b55ff4d5cb94acd71a939  655062    content/chapters/15/2/Regression_Line.ipynb
100644 blob 6bf18798f9b09585e62893fb6b55d43e47831a33  654310    notebooks/15/2/Regression_Line.ipynb
100644 blob bba2c327792950c4eabbf72499cf67fa722e4d61  648107    notebooks/Classification_Sp16_redone_code.ipynb
100644 blob 27b5285986f5e60a3fa33c224bcfb6cebe09f970  634243    notebooks/Classification_Sp16_redone_code.ipynb
100644 blob b331cfe33588eb972fb5c6f1bdc4d5797d80dfc1  632446    node_modules/gitbook-plugin-mathjax/node_modules/MathJax-node/node_modules/MathJax/unpacked/jax/output/SVG/fonts/Gyre-Pagella/NonUnicode/Regular/Main.js
100644 blob 3f637eb711cfc15fe42e8ac1d42ba30dfccb7542  631659    notebooks/Regression.ipynb
100644 blob 13a0285386f41cb5492e4bd352d3610767da4a1c  621865    notebooks-html/Classification.html
100644 blob 902d9ae38b1d17b464114969cf0f2f3c31fc2c1f  621864    notebooks/Classification.html
100644 blob a49d9426959002355fd09685f946a2acd57f863f  619987    notebooks-html/Classification.html
100644 blob 0a184bebb47b21efd4e21bbcaa77275568e2c752  615045    notebooks/Classification.ipynb
100644 blob 7f0c316cd33e237395403ff4fac322a33336cfd7  611700    notebooks-html/Classification.html
100644 blob 52020276df565ffe07bda9c37755add3669ab64f  611698    notebooks-html/Classification.html
100644 blob 2e9176ca3a2822dc363591fee633a7af80657d79  611698    notebooks-html/Classification.html
100644 blob 449ed075e5883d24b49d2873a6a3ab1e200a068b  611685    notebooks-html/Classification.html
100644 blob e25e15cbf8bd462b98c5879ea6478c1bfc561f04  611654    notebooks-html/Classification.html
100644 blob d015789f5f45804668ce8614aaa913c92445e76d  610155    notebooks/huck_finn.txt
100644 blob d015789f5f45804668ce8614aaa913c92445e76d  610155    data/huck_finn.txt
100644 blob d015789f5f45804668ce8614aaa913c92445e76d  610155    chapters/01/3/huck_finn.txt
100644 blob 15da0d360f57067e7d63cf4f1bd5d465005e1de1  605219    content/chapters/08/5/Bike_Sharing_in_the_Bay_Area.ipynb
100644 blob 6893af1f191e3a3ac8ca458b66503484b723debf  605193    content/chapters/08/5/Bike_Sharing_in_the_Bay_Area.ipynb
100644 blob 058642a3065908f925ea2736b115f9feceacc92c  605190    notebooks/08/5/Bike_Sharing_in_the_Bay_Area.ipynb
100644 blob 058642a3065908f925ea2736b115f9feceacc92c  605190    content/chapters/08/5/Bike_Sharing_in_the_Bay_Area.ipynb
100644 blob b852b3af23cf3f51629c328bab821a76c5aec29b  587918    notebooks/Training_and_Testing.ipynb
100644 blob 9b4468c952222a0f90c96b21b55a007b852bc5f5  587878    notebooks/Training_and_Testing.ipynb
100644 blob 77475e618ac5c67c774b5ac8684d7e898edd088b  579632    node_modules/gitbook-plugin-mathjax/node_modules/MathJax-node/node_modules/MathJax/unpacked/jax/output/SVG/fonts/Gyre-Termes/NonUnicode/Regular/Main.js
100644 blob ed2ece99554ad828198c5dc6c2c61b95aa980c15  577791    notebooks/Regression.ipynb
100644 blob c3f52af60478b42744e74724a251a994f15a2ddd  563815    notebooks/Training_and_Testing.ipynb
100644 blob 06184790bb8e6692b67e37d5baa74577d4ec2127  556545    node_modules/gitbook-plugin-mathjax/node_modules/MathJax-node/node_modules/MathJax/unpacked/jax/output/SVG/fonts/Neo-Euler/NonUnicode/Regular/Main.js
100644 blob a83bc8fedb484a8dc226919b5015e5203ed3f6f1  550930    images/function_execution.pdf
100644 blob 34129de0bbd2ef7d55ac9c7aa4095e311468a018  531189    notebooks-html/Correlation.html
100644 blob 69ee0c3b0be752a3947b9f2b37fe015b4321f5f8  531188    notebooks/Correlation.html
100644 blob e0299441d3b4bad1de663b13707b811685129fe7  526670    notebooks/RegressionInference.ipynb
100644 blob 3e6df8983a803b5e8bb731bc44fad2c3cc2500f4  526566    notebooks/RegressionInference.ipynb
100644 blob 8d517b718aeedf7251d2daed969cb50b5ca9bbc0  526530    notebooks/RegressionInference.ipynb
100644 blob 33a253f86026459b5f02210ca43685bcbbee475c  524883    notebooks-html/Correlation.html
100644 blob 60abc3c2c31c9ed4c3e3ab2445d91138aeb66328  515307    notebooks/Classification_Sp16_redone_code.ipynb
100644 blob 2ef11f4824d562bdb545e6a0ba0128e02c2ab92c  511501    notebooks-html/Correlation.html
100644 blob d13d69e971e0344c79c8654f9412316dc2cea3bd  511499    notebooks-html/Correlation.html
100644 blob 7a89f2b34511e00135286370b19d9fddd998d249  511499    notebooks-html/Correlation.html
100644 blob d87e5dfedb91547d983ec840f838be4225ee5e18  511486    notebooks-html/Correlation.html
100644 blob 720c34cbbd4be027e5ab0ff84299cb91c1b92a7d  511455    notebooks-html/Correlation.html
100644 blob 12973cc36431baeb632a76b2973e73eab891dec3  510114    notebooks/Correlation.ipynb
100644 blob 6865e075fcfa0e1c8f4d370f019e675ee6e4f696  510086    notebooks/Correlation.ipynb
100644 blob 4ed300181311cffc3a2f5d370e0414e50217f016  507662    notebooks/Classification.ipynb
100644 blob 92e8077e43fa85acb5fc760ac2f943007ffc0ce8  507229    notebooks/Classification_Sp16.ipynb
100644 blob 6ce1b40e808c221dcff41ab796235da296f19811  507167    notebooks/Classification.ipynb
100644 blob 5aed03c177e7bd51aa18cbf7c8f21e760b341ebb  505669    notebooks/Correlation.ipynb
100644 blob 03b87b64c70269ebcb4ff4a8087259da2d7f6333  505391    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob e3d5e1f6f35f7db292db257162281a1abda0c075  504140    notebooks-html/Regression.html
100644 blob 9146a15f3402500ada76ab02a7f93d747f7dd40a  504139    notebooks/Regression.html
100644 blob 87740fc3c66c546a8c210ee3ac13537ab1d74c84  502370    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob cf656790bd1fdcc7076ed7d5c4a95cc3eb1b7c29  502349    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob 0d650c6c9959c7ba128dc05b06d94f5b7ae6fbc7  501896    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob 051d2afb28e1d585bfbbd3d3793381263009e76b  501894    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob c8ce709c7d723a90e9e63d3bc8ad9a568ec56f57  501893    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob 80f7f89a4059aa961f2d77804577a89e11dc0820  501840    _build/chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob 4dd0a14ec5a72e42b09df7c45f6c6d54a06c7cbc  501837    _chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob f88404fc31f73f71015c552cb913c59822ee9f04  501809    _chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob fe5729ccb39a504b3923300503b73f55e66342cf  501793    _chapters/08/5/Bike_Sharing_in_the_Bay_Area.md
100644 blob 65ecdea2ca46af06a641cb0c80d8971d1e2932d4  500356    notebooks-html/Regression.html

Customize interact links to include data

We need a mechanism for customizing the interact links that are generated so that they include checking out the data associated with a notebook. E.g., the Charts.ipynb notebook needs kaiser_ethnicity_everyone.csv and kaiser_ethnicity_children.csv, but I'm not sure how to transfer them.

Executing notebooks

Right now, I think the notebook -> html script just renders the current output stored in the notebook. I believe the old version actually executed the notebook to ensure that the output correctly reflected the input in each cell.

Can we bring that back? We'll also need to store the data files used in the notebooks somewhere. Seems like this repo should contain the canonical source of the notebooks, which means it also needs the tools that execute them.

Bad link on Data 8 image in corner

The Data 8 image in the upper left corner links to (nonexistent site) inferentialthinking.org
It should link to (correct site) inferentialthinking.com
image

Building Properties_of_the_Mean drops the $$'s

When I build notebooks/14/1/Properties_of_the_Mean.ipynb with make textbook to compile to _chapters/14/1/Properties_of_the_Mean.md, it drops the $$ signs at the start and end of the $$\begin{align*}...\end{align*}$$ section, and then that equation shows up as Latex gobbedygook rather than as formatted mathematics.

Not sure if this is just my build environment. @choldgraf, do you see this too?

Update textbook for latest jupyter book

There is now a new version of jupyter book that is much-improved. It will require some modification of the current textbook to get it working.

I have done most of the heavy lifting for this here: https://github.com/data-8/textbook/tree/book_update

However, there are some things that should be done to make it work. I'm happy to help any student teams figure this out:

  1. Check each page to make sure that markdown headers are sequential. For example:

    This is sequential:

    # Header 1
    
    Content
    
    ## Header 2
    
    Content
    

    This is not sequential:

    # Header 1
    
    Content
    
    ### Header 2
    
    Content
    
  2. Re-run each notebook to make sure it still runs properly, and re-populate the outputs. Some notebooks are out-of-date and don't run correctly.

  3. Make sure each page has a title that starts with a single # character

  4. Re-work our auto-deploy infrastructure to use the new jupyter book build system

Let me know if I can be helpful in figuring this out. It would be good to make the switch sooner than later, because the version of jupyter book we're using no longer has support, and because the new build system will be both better and easier to understand.

Histogram isn't shown in Properties_of_the_Mean

The text says "Here is the histogram of the distribution of not_symmetric or equivalently the distribution of same_distribution.", but there's no histogram shown.

The notebook has "#HIDDEN" on the code that produces the histogram, so I'm guessing that's why.

I don't know if there's a way to show the graph without showing the code, so I haven't made a PR that removes "#HIDDEN" but that seems the easiest way.

Code @
https://github.com/data-8/textbook/blob/gh-pages/notebooks/14/1/Properties_of_the_Mean.ipynb

Some Chapters were not Included on the Gitbook version

Yesterday, I read the book from the beginning and bookmarked the last page I read.
I opened the link today and the link showed 404 Not Found.
Nonetheless, I found the page , but I could not continue reading because the actual 2nd chapter is gone.
I believe someone messed up the Gitbook version since the binder showed a red button instead of green.
Can you fix the issue so that I can read more chapters please?
Thank you.

Consider a slightly different license

Hey all - was just looking at the license that the textbook is published under.

https://creativecommons.org/licenses/by-nc-nd/4.0/

It looks fine to me, with one exception: there's a "no derivatives" clause in there.

I'm a bit worried that this will discourage others from adapting the textbook for their own purposes. As we are starting to encourage other universities/colleges/etc to adapt Data 8 material for their own uses, I wonder if this will be an impediment to them making the necessary changes for their specific course requirements.

Curious if the team has had a discussion about this. I'll defer to others on the final decision but wanted to bring it up in case it hadn't been considered.

Textbook doesn't load in gitbooks editor

I tried https://www.gitbook.com/book/ds8/textbook/edit, but got

An unexpected error occurred when trying to load your book: Error 0:

Maybe it's related to the fact that we moved dsten -> data-8. Any ideas, @SamLau95 ?

make serve doesn't work due to redirect

If I use make serve to host a test version of the site locally and then visit http://127.0.0.1:4000/, it doesn't work: there's an automatic redirect that takes you to https://www.inferentialthinking.com/chapters/intro, which isn't the local version of the site.

Manual work-around for now: run make serve, then manually visit http://127.0.0.1:4000/chapters/intro. But it might be nicer if make serve worked.

Copy to clipboard button displaying incorrectly

On Chrome and Safari, the Copy to Clipboard button on some pages of the textbook seems to be formatted incorrectly. The screenshot below from is from §1.3 in Chrome.

copy to clipboard button

On Safari, the view is a bit different (screenshot below).
safari copy to clipboard

Hovering over the little rectangle in the top right corner makes the Copy button appear as below.
mouse over

A new (simpler) build process for the textbook

Hey all - I just worked with @yuvipanda to remove a few unnecessary steps from the build process for updating the data-8 textbook. Here are the new instructions

https://github.com/data-8/textbook#how-this-repository-is-deployed-to-inferentialthinkingcom

Here's the summary:

  • Old way

    • Make changes in data-8/textbook and build the site
    • Push to data-8/textbook
    • cd into your local repository for github.com/interentialthinking/inferentialthinking.github.io
    • git pull the latest changes from the textbook repository
    • git push the changes to the inferentialthinking.github.io repository
  • New way

    • Make changes in data-8/textbook and build the site
    • Push to data-8/textbook
    • Changes are auto-deployed by circleci to the inferentialthinking.github.io repository.

Let me know if you have questions or thoughts! cc @davidwagner @a-adhikari @papajohn so you know about the new system.

This should close the issues in #82 and #83. I'll leave this issue open for a couple weeks and will then close all of them unless we surface other problems

path_data is wrong in every notebook

The top of each notebook under content/ sets path_data = '../../../data/'. However, given the re-org of the file structure, this is no longer correct: notebooks won't run any longer with this setting. Instead, it needs to be changed to path_data = '../../../../data/'.

15.5 sentence should use less jargon

The first sentence is "Suppose a data scientist has decided to use linear regression to estimate values of a response variable based on a predictor."

"predictor" and "response" might be too technical, but would it be too informal to say "estimate values of one quantity based on another one?"

HIDDEN stopped hiding code cells

Putting # HIDDEN at the top of a code cell used to cause the code to be hidden (excluded from the generated output). That no longer works.

To reproduce: run make site; make serve and look at http://127.0.0.1:4000/chapters/01/3/1/Literary_Characters.html; it shows two code cells at the top of the page that contain # HIDDEN.

Lots of figures and histograms are missing

Many figures and histograms are missing and don't show up in the online textbook.

I suspect that somewhere in the process of converting this to Jekyll, they got lost. It looks like the culprit is # HIDDEN; not only does it hide the code, but it also hides the output of that cell. The fix is to use # NO CODE rather than # HIDDEN, as that still shows the output of the cell.

Privacy Notebook results in huge PDF sizes

Adding in the privacy notebook to chapter 2 results in huge PDFs being rendered from Gitbook because the map images get way oversized.

After removing the notebook in ebada3c the PDF size dropped from 290MB to 9MB.

We should figure out a way to get the maps images to render properly in PDF.

8.5 graphics all give warning messages about deprecations

All the graphics (histograms & maps) on the section 8.5 page give warning messages, such as:

/home/choldgraf/anaconda/envs/dev/lib/python3.6/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.
  warnings.warn("The 'normed' kwarg is deprecated, and has been "

The graphics do render.

Textbook PDF is 290MB

Good news: The textbook is now able to build to PDF, Mobi, and ePub!

Bad news: The PDF is 290MB big. Interestingly, the Mobi and ePub versions are about 5MB.

My guess to the size difference is that the PDF has huge map images in the Privacy/License plate exploration. That's located at page 107 in the PDF and page 285 in the ePub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.