Skip to content
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

Draft questions for clustering and regionalization chapter #14

Merged
merged 16 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions infrastructure/booksite/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Geographic Data Science with PySAL and the PyData Stack
=======================================================

This project is released under a Creative Commons BY-NC-ND license.

For more information, please visit:

https://creativecommons.org/licenses/by-nc-nd/4.0/
3 changes: 2 additions & 1 deletion infrastructure/booksite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ cp host/infrastructure/booksite/toc.yml host/tmp_book/_data/toc.yml
# Fill in
#---------------------------
# LICENSE
cp host/infrastructure/booksite/LICENSE host/tmp_book/LICENSE
# Code requirements
# Bibliography
# Build book
#---------------------------
echo "Building book..."
jupyter-book build host/tmp_book
echo "Building site HTML..."
cd host/tmp_book && make site
cd host/tmp_book && make build
# Move over to docs folder to be served online
echo "Moving build over to docs folder..."
cd /home/jovyan
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/booksite/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

Placeholder for the introduction to the book

## LICENSE
---

**IMPORTANT**: this work is under a license!
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
36 changes: 15 additions & 21 deletions infrastructure/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@ FROM darribas/gds_py:2.0

LABEL maintainer="Dani Arribas-Bel <d.arribas-bel@liverpool.ac.uk>"

#--- Jekyll ---#

USER root

RUN apt-get update \
&& apt-get install -y ruby-full build-essential zlib1g-dev

# Install Ruby Gems to ~/gems
ENV GEM_HOME="/home/$NB_USER/gems"
ENV PATH="/home/$NB_USER/gems/bin:$PATH"

USER $NB_UID

RUN gem install jekyll bundler jekyll-scholar

# Clean up
RUN rm -rf $GEM_HOME/cache
RUN rm -rf /usr/local/bundle/cache

#--- Jupyter-book ---#
RUN pip install -U --no-deps \
bs4 \
Expand All @@ -30,8 +11,21 @@ RUN pip install -U --no-deps \
pytest \
ruamel.yaml
RUN jupyter-book create testbook --demo

#--- Jekyll ---#
# Taken inspiration from:
# https://github.com/jupyter/jupyter-book/blob/master/jupyter_book/Dockerfile

USER root
RUN apt-get update \
&& apt-get install -y ruby-full build-essential zlib1g-dev libc-dev
USER $NB_UID
# Install Ruby Gems to ~/gems
ENV GEM_HOME="/home/$NB_USER/gems"
ENV PATH="/home/$NB_USER/gems/bin:$PATH"
RUN cd /home/$NB_USER/testbook \
&& gem install bundler -v 1.17.2 \
#&& mv Gemfile.lock original_Gemfile.lock \
&& gem install bundler -v '2.0.1' \
&& bundle install

# JupyText
Expand All @@ -50,7 +44,7 @@ RUN echo "c.NotebookApp.contents_manager_class = "\
RUN rm -rf $GEM_HOME/cache \
&& rm -rf /usr/local/bundle/cache \
&& rm -r /home/$NB_USER/testbook \
&& conda clean -tipsy
&& conda clean --all

EXPOSE 4000

Expand Down
4 changes: 3 additions & 1 deletion notebooks/00_toc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"- [Spatial Inequality](09_spatial_inequality)\n",
"- [Clustering and Regionalization](10_clustering_and_regionalization)\n",
"- [Spatial Regression](11_regression)\n",
"- [Spatial Feature Engineering](12_feature_engineering)\n"
"- [Spatial Feature Engineering](12_feature_engineering)\n",
"\n",
"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>."
]
}
],
Expand Down
3 changes: 2 additions & 1 deletion notebooks/00_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.1
jupytext_version: 1.1.6
kernelspec:
display_name: Python 3
language: python
Expand Down Expand Up @@ -37,4 +37,5 @@ jupyter:
- [Spatial Regression](11_regression)
- [Spatial Feature Engineering](12_feature_engineering)

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
<!-- #endregion -->
22 changes: 4 additions & 18 deletions notebooks/01_geospatial_computational_environment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2610,25 +2610,11 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"source": [
"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>."
]
}
],
"metadata": {
Expand Down
13 changes: 2 additions & 11 deletions notebooks/01_geospatial_computational_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.1
jupytext_version: 1.1.6
kernelspec:
display_name: Python 3
language: python
Expand Down Expand Up @@ -994,14 +994,5 @@ Write a properly documented function that:
3. If the number is odd, it should be stored in the dictionary as a key, with a value of "odd."
4. Returns the now-filled dictionary.

```python

```

```python

```

```python

```
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
9 changes: 9 additions & 0 deletions notebooks/02_spatial_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
"source": [
"# Spatial Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>."
]
}
],
"metadata": {
Expand Down
7 changes: 6 additions & 1 deletion notebooks/02_spatial_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.1
jupytext_version: 1.1.6
kernelspec:
display_name: Python 3
language: python
name: python3
---

# Spatial Data


---

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
9 changes: 9 additions & 0 deletions notebooks/03_spatial_data_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4738,6 +4738,15 @@
"\n",
"message is, if you have the column in the table use it, but many cases you do not have the column and need to go the spatial join route"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>."
]
}
],
"metadata": {
Expand Down
6 changes: 5 additions & 1 deletion notebooks/03_spatial_data_processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jupyter:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.1
jupytext_version: 1.1.6
kernelspec:
display_name: Python 3
language: python
Expand Down Expand Up @@ -138,3 +138,7 @@ df.columns

message is, if you have the column in the table use it, but many cases you do not have the column and need to go the spatial join route
<!-- #endregion -->

---

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>.
569 changes: 349 additions & 220 deletions notebooks/04_spatial_weights.ipynb

Large diffs are not rendered by default.