Skip to content

Commit

Permalink
Merge pull request #17 from darribas/license
Browse files Browse the repository at this point in the history
License
  • Loading branch information
sjsrey committed Jun 21, 2019
2 parents d17d4dd + b52df30 commit 77d553f
Show file tree
Hide file tree
Showing 30 changed files with 192 additions and 81 deletions.
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>.
9 changes: 9 additions & 0 deletions notebooks/04_spatial_weights.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3342,6 +3342,15 @@
"\n",
"[4] Dean, N., Dong, G., and Price, G. \"Frontiers in Residential Segregation: Understanding Neighbourhood Boundaries and their Impacts.\" *Tijdschrift voor economische en sociale geografie*, in press"
]
},
{
"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/04_spatial_weights.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 @@ -1108,3 +1108,8 @@ These are the starkest contrasts in the map, and result in the most distinctive
[3] Fitzpatrick, M C.,Preisser, E.L., Porter, A., Elkinton, J., Waller, L.A., Carlin, B. P., and Ellison, A.M. 2010. “Ecological Boundary Detection Using Bayesian Areal Wombling.” *Ecology* 91 (12): 3448–3455.

[4] Dean, N., Dong, G., and Price, G. "Frontiers in Residential Segregation: Understanding Neighbourhood Boundaries and their Impacts." *Tijdschrift voor economische en sociale geografie*, in press


---

<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/05_choropleth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,15 @@
"\"Interregional inequality dynamics in Mexico.\" *Spatial Economic Analysis*, 5:\n",
"277-298."
]
},
{
"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/05_choropleth.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 @@ -651,3 +651,8 @@ structure and dynamics." *Cities*, 43: 69-77.
Rey, S.J. and M.L. Guitierez. (2010)
"Interregional inequality dynamics in Mexico." *Spatial Economic Analysis*, 5:
277-298.


---

<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>.
10 changes: 6 additions & 4 deletions notebooks/06_spatial_autocorrelation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1432,11 +1432,13 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": []
"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: 4 additions & 3 deletions notebooks/06_spatial_autocorrelation.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 @@ -459,6 +459,7 @@ Moran, P. A. (1950). Notes on continuous stochastic phenomena. Biometrika, 37(1/

Tukey, J. W. (1977). Exploratory data analysis (Vol. 2).

```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/07_local_autocorrelation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,15 @@
"source": [
"As you can see, the results are virtually the same for $G_i$ and $G_i^*$. Also, at first glance, these maps appear to be visually similar to the final LISA map from above, and this leads to the question of why use the $G$ statistics at all. The answer to this question is that the two sets of local statistics, Local $I$ and the local $G$, are complementary statistics. This is because the local $I$ by itself cannot distinguish between the two forms of positive spatial association while the G can. At the same time, the G statistic does not consider negative spatial association, while the local I statistic does."
]
},
{
"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/07_local_autocorrelation.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 @@ -423,3 +423,8 @@ plt.show()
```

As you can see, the results are virtually the same for $G_i$ and $G_i^*$. Also, at first glance, these maps appear to be visually similar to the final LISA map from above, and this leads to the question of why use the $G$ statistics at all. The answer to this question is that the two sets of local statistics, Local $I$ and the local $G$, are complementary statistics. This is because the local $I$ by itself cannot distinguish between the two forms of positive spatial association while the G can. At the same time, the G statistic does not consider negative spatial association, while the local I statistic does.


---

<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/08_point_pattern_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,15 @@
"# Display the figure\n",
"plt.show()"
]
},
{
"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

0 comments on commit 77d553f

Please sign in to comment.