├── apt.txt ├── .gitignore ├── postBuild ├── setup.py ├── source ├── img │ ├── Aalto-logo.png │ ├── slack-icon.png │ ├── aisa_banner.png │ ├── suggest_edit.png │ ├── Intro-spatial-analytics.png │ ├── Spatial-analytics-logo.png │ └── Spatial-analytics-logos.cdr ├── lessons │ ├── L1 │ │ ├── img │ │ │ ├── Spyder.png │ │ │ ├── Lesson1.1.png │ │ │ ├── Lesson1.2.png │ │ │ ├── Lesson1.3.png │ │ │ ├── Lesson1.4.png │ │ │ ├── Lesson1.5.png │ │ │ ├── test_doc.PNG │ │ │ ├── GitHub_Logo.png │ │ │ ├── Lesson1.3.1.png │ │ │ ├── Lesson1.3.2.png │ │ │ ├── Lesson1_E1.png │ │ │ ├── Lesson1_T1.png │ │ │ ├── Lesson1_T2.png │ │ │ ├── Raw-button.png │ │ │ ├── choose-file.PNG │ │ │ ├── edit-readme.png │ │ │ ├── edit-testMD.png │ │ │ ├── geodataframe.png │ │ │ ├── git-copy-url.png │ │ │ ├── git-plugin.png │ │ │ ├── play-changes.PNG │ │ │ ├── token_name.png │ │ │ ├── token_scopes.png │ │ │ ├── upload_files.PNG │ │ │ ├── Git-Logo-Black.png │ │ │ ├── Spyder-editor.png │ │ │ ├── commit_message.PNG │ │ │ ├── committed_file.PNG │ │ │ ├── drag-and-drop.PNG │ │ │ ├── launch_binder.png │ │ │ ├── open-terminal.png │ │ │ ├── terminal-icon.png │ │ │ ├── Git-Logo-2Color.png │ │ │ ├── GitHub_clone_link.png │ │ │ ├── Git_illustration.png │ │ │ ├── Preview-changes.png │ │ │ ├── git-plugin-clone.png │ │ │ ├── git-plugin-commit.png │ │ │ ├── git-plugin-pull.png │ │ │ ├── git-plugin-push.png │ │ │ ├── start-assignment.png │ │ │ ├── token_expiration.png │ │ │ ├── Spyder-play-button.png │ │ │ ├── git-plugin-changed.png │ │ │ ├── git-plugin-history1.png │ │ │ ├── git-plugin-pull-ok.png │ │ │ ├── git-plugin-push-ok.png │ │ │ ├── git-plugin-status1.png │ │ │ ├── upload_files_button.PNG │ │ │ ├── 1_classroom_invitation.PNG │ │ │ ├── Terminal_git_status1.png │ │ │ ├── git-commit-credentials.png │ │ │ ├── git-plugin-commit-ok.png │ │ │ ├── git-plugin-credentials.png │ │ │ ├── pull-push-illustration.png │ │ │ ├── Download_notebook_button.png │ │ │ ├── download-starter-script.PNG │ │ │ ├── git-plugin-stage-changes.png │ │ │ ├── git-plugin-start-cloning.png │ │ │ ├── git-plugin-commit-message.png │ │ │ ├── git-plugin-discard-changes.png │ │ │ ├── git-plugin-staged-changes.png │ │ │ ├── git-plugin-tracked-changes.png │ │ │ ├── git-plugin-version-history.png │ │ │ ├── git-plugin-pull-push-buttons.png │ │ │ ├── github_classroom_create_repository.png │ │ │ └── version_control_motivation_comics.png │ │ ├── point-pattern-analysis.rst │ │ ├── introduction-to-spatial-analysis.rst │ │ ├── spatial-autocorrelation.rst │ │ ├── overview.rst │ │ ├── exercise-1.rst │ │ └── git-basics.rst │ ├── L2 │ │ ├── img │ │ │ ├── Lesson2.1.png │ │ │ ├── Lesson2.2.png │ │ │ └── Lesson2-E2.png │ │ ├── analysis-of-spatial-field-data.rst │ │ ├── geostatistics-kriging.rst │ │ ├── overview.rst │ │ └── exercise-2.rst │ ├── L3 │ │ ├── img │ │ │ ├── Lesson3.1.png │ │ │ ├── Lesson3.2.png │ │ │ └── Lesson3_E3.png │ │ ├── map-overlay.rst │ │ ├── spatial-network-analysis.rst │ │ ├── overview.rst │ │ └── exercise-3.rst │ ├── L4 │ │ ├── img │ │ │ ├── Lesson4.1.png │ │ │ └── Lesson4.2.png │ │ ├── multivariate-spatial-analysis.rst │ │ ├── spatial-network-optimization-centrality.rst │ │ ├── overview.rst │ │ └── exercise-4.rst │ └── L5 │ │ ├── img │ │ ├── Lesson5.1.png │ │ └── Lesson5.2.png │ │ ├── cartography-map-user-interfaces.rst │ │ ├── visual-analytics.rst │ │ ├── final-remarks.rst │ │ └── overview.rst ├── course-info │ ├── img │ │ ├── JupyterLab.png │ │ ├── Slack-logo.png │ │ ├── launch_binder.png │ │ ├── miniconda-osx.png │ │ ├── start-thread.PNG │ │ ├── Binder_launcher.png │ │ ├── Binder_loading.png │ │ ├── CSC_join_group.png │ │ ├── CSC_join_group.webp │ │ ├── CSC_launch_new.png │ │ ├── answering-thread.PNG │ │ ├── launch-buttons.png │ │ ├── notifying-user.PNG │ │ ├── slack-basic-view.png │ │ ├── miniconda-windows.png │ │ ├── ninja-philosopher.png │ │ ├── miniconda-install-macos.png │ │ ├── Download_notebook_button.png │ │ ├── miniconda-install-windows.png │ │ └── spatial-analytics-workspace.png │ ├── introduction.rst │ ├── learning-goals.rst │ ├── attribution.rst │ ├── grading.rst │ ├── resources.rst │ ├── course-info.rst │ ├── License-terms.rst │ ├── slack-usage.rst │ ├── course-environment-components.rst │ └── installing-miniconda.rst ├── requirements.txt ├── conf.py └── index.rst ├── README.md ├── .readthedocs.yml ├── Makefile ├── setup.cfg ├── make.bat ├── ci ├── environment_unix.yml └── environment_windows.yml └── environment.yml /apt.txt: -------------------------------------------------------------------------------- 1 | openjdk-11-jdk -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | build 3 | pwd.txt 4 | -------------------------------------------------------------------------------- /postBuild: -------------------------------------------------------------------------------- 1 | jupyter lab build --dev-build=False --minimize=False -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | # Configuration is in setup.cfg 4 | setup() -------------------------------------------------------------------------------- /source/img/Aalto-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/Aalto-logo.png -------------------------------------------------------------------------------- /source/img/slack-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/slack-icon.png -------------------------------------------------------------------------------- /source/img/aisa_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/aisa_banner.png -------------------------------------------------------------------------------- /source/img/suggest_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/suggest_edit.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Spyder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Spyder.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Spatial Analytics 2 | 3 | Site for "Spatial Analytics" -course at the Dept. Built Environment, Aalto University. 4 | -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.2.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.3.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.4.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.5.png -------------------------------------------------------------------------------- /source/lessons/L1/img/test_doc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/test_doc.PNG -------------------------------------------------------------------------------- /source/lessons/L2/img/Lesson2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L2/img/Lesson2.1.png -------------------------------------------------------------------------------- /source/lessons/L2/img/Lesson2.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L2/img/Lesson2.2.png -------------------------------------------------------------------------------- /source/lessons/L3/img/Lesson3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L3/img/Lesson3.1.png -------------------------------------------------------------------------------- /source/lessons/L3/img/Lesson3.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L3/img/Lesson3.2.png -------------------------------------------------------------------------------- /source/lessons/L4/img/Lesson4.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L4/img/Lesson4.1.png -------------------------------------------------------------------------------- /source/lessons/L4/img/Lesson4.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L4/img/Lesson4.2.png -------------------------------------------------------------------------------- /source/lessons/L5/img/Lesson5.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L5/img/Lesson5.1.png -------------------------------------------------------------------------------- /source/lessons/L5/img/Lesson5.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L5/img/Lesson5.2.png -------------------------------------------------------------------------------- /source/course-info/img/JupyterLab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/JupyterLab.png -------------------------------------------------------------------------------- /source/course-info/img/Slack-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/Slack-logo.png -------------------------------------------------------------------------------- /source/img/Intro-spatial-analytics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/Intro-spatial-analytics.png -------------------------------------------------------------------------------- /source/img/Spatial-analytics-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/Spatial-analytics-logo.png -------------------------------------------------------------------------------- /source/img/Spatial-analytics-logos.cdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/img/Spatial-analytics-logos.cdr -------------------------------------------------------------------------------- /source/lessons/L1/img/GitHub_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/GitHub_Logo.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.3.1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1.3.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1.3.2.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1_E1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1_E1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1_T1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1_T1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Lesson1_T2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Lesson1_T2.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Raw-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Raw-button.png -------------------------------------------------------------------------------- /source/lessons/L1/img/choose-file.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/choose-file.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/edit-readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/edit-readme.png -------------------------------------------------------------------------------- /source/lessons/L1/img/edit-testMD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/edit-testMD.png -------------------------------------------------------------------------------- /source/lessons/L1/img/geodataframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/geodataframe.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-copy-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-copy-url.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin.png -------------------------------------------------------------------------------- /source/lessons/L1/img/play-changes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/play-changes.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/token_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/token_name.png -------------------------------------------------------------------------------- /source/lessons/L1/img/token_scopes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/token_scopes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/upload_files.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/upload_files.PNG -------------------------------------------------------------------------------- /source/lessons/L2/img/Lesson2-E2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L2/img/Lesson2-E2.png -------------------------------------------------------------------------------- /source/lessons/L3/img/Lesson3_E3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L3/img/Lesson3_E3.png -------------------------------------------------------------------------------- /source/course-info/img/launch_binder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/launch_binder.png -------------------------------------------------------------------------------- /source/course-info/img/miniconda-osx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/miniconda-osx.png -------------------------------------------------------------------------------- /source/course-info/img/start-thread.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/start-thread.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/Git-Logo-Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Git-Logo-Black.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Spyder-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Spyder-editor.png -------------------------------------------------------------------------------- /source/lessons/L1/img/commit_message.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/commit_message.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/committed_file.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/committed_file.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/drag-and-drop.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/drag-and-drop.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/launch_binder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/launch_binder.png -------------------------------------------------------------------------------- /source/lessons/L1/img/open-terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/open-terminal.png -------------------------------------------------------------------------------- /source/lessons/L1/img/terminal-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/terminal-icon.png -------------------------------------------------------------------------------- /source/course-info/img/Binder_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/Binder_launcher.png -------------------------------------------------------------------------------- /source/course-info/img/Binder_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/Binder_loading.png -------------------------------------------------------------------------------- /source/course-info/img/CSC_join_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/CSC_join_group.png -------------------------------------------------------------------------------- /source/course-info/img/CSC_join_group.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/CSC_join_group.webp -------------------------------------------------------------------------------- /source/course-info/img/CSC_launch_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/CSC_launch_new.png -------------------------------------------------------------------------------- /source/course-info/img/answering-thread.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/answering-thread.PNG -------------------------------------------------------------------------------- /source/course-info/img/launch-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/launch-buttons.png -------------------------------------------------------------------------------- /source/course-info/img/notifying-user.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/notifying-user.PNG -------------------------------------------------------------------------------- /source/course-info/img/slack-basic-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/slack-basic-view.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Git-Logo-2Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Git-Logo-2Color.png -------------------------------------------------------------------------------- /source/lessons/L1/img/GitHub_clone_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/GitHub_clone_link.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Git_illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Git_illustration.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Preview-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Preview-changes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-clone.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-commit.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-pull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-pull.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-push.png -------------------------------------------------------------------------------- /source/lessons/L1/img/start-assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/start-assignment.png -------------------------------------------------------------------------------- /source/lessons/L1/img/token_expiration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/token_expiration.png -------------------------------------------------------------------------------- /source/course-info/img/miniconda-windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/miniconda-windows.png -------------------------------------------------------------------------------- /source/course-info/img/ninja-philosopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/ninja-philosopher.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Spyder-play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Spyder-play-button.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-changed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-changed.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-history1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-history1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-pull-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-pull-ok.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-push-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-push-ok.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-status1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-status1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/upload_files_button.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/upload_files_button.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/1_classroom_invitation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/1_classroom_invitation.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/Terminal_git_status1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Terminal_git_status1.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-commit-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-commit-credentials.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-commit-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-commit-ok.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-credentials.png -------------------------------------------------------------------------------- /source/lessons/L1/img/pull-push-illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/pull-push-illustration.png -------------------------------------------------------------------------------- /source/course-info/img/miniconda-install-macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/miniconda-install-macos.png -------------------------------------------------------------------------------- /source/lessons/L1/img/Download_notebook_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/Download_notebook_button.png -------------------------------------------------------------------------------- /source/lessons/L1/img/download-starter-script.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/download-starter-script.PNG -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-stage-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-stage-changes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-start-cloning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-start-cloning.png -------------------------------------------------------------------------------- /source/course-info/img/Download_notebook_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/Download_notebook_button.png -------------------------------------------------------------------------------- /source/course-info/img/miniconda-install-windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/miniconda-install-windows.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-commit-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-commit-message.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-discard-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-discard-changes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-staged-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-staged-changes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-tracked-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-tracked-changes.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-version-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-version-history.png -------------------------------------------------------------------------------- /source/course-info/img/spatial-analytics-workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/course-info/img/spatial-analytics-workspace.png -------------------------------------------------------------------------------- /source/lessons/L1/img/git-plugin-pull-push-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/git-plugin-pull-push-buttons.png -------------------------------------------------------------------------------- /source/lessons/L1/img/github_classroom_create_repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/github_classroom_create_repository.png -------------------------------------------------------------------------------- /source/lessons/L1/img/version_control_motivation_comics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AaltoGIS/Spatial-Analytics/HEAD/source/lessons/L1/img/version_control_motivation_comics.png -------------------------------------------------------------------------------- /source/requirements.txt: -------------------------------------------------------------------------------- 1 | jupyter-book 2 | sphinx-book-theme 3 | sphinx 4 | matplotlib 5 | ipython 6 | jupyter-sphinx 7 | nbsphinx 8 | sphinxcontrib-bibtex 9 | MyST-NB 10 | nbconvert==6.4.4 -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | formats: [] 3 | 4 | build: 5 | os: ubuntu-22.04 6 | tools: 7 | python: "3.12" 8 | 9 | python: 10 | install: 11 | - requirements: source/requirements.txt 12 | - method: pip 13 | path: . 14 | -------------------------------------------------------------------------------- /source/lessons/L5/cartography-map-user-interfaces.rst: -------------------------------------------------------------------------------- 1 | Cartography and Map User Interfaces 2 | ----------------------------------- 3 | 4 | .. raw:: html 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /source/lessons/L5/visual-analytics.rst: -------------------------------------------------------------------------------- 1 | Visual analytics 2 | ================ 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L3/map-overlay.rst: -------------------------------------------------------------------------------- 1 | Map overlay & algebra 2 | ===================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L1/point-pattern-analysis.rst: -------------------------------------------------------------------------------- 1 | Point pattern analysis 2 | ====================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L3/spatial-network-analysis.rst: -------------------------------------------------------------------------------- 1 | Spatial network analysis 2 | ======================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L5/final-remarks.rst: -------------------------------------------------------------------------------- 1 | Conclusions, Exam & Practicalities 2 | ================================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L4/multivariate-spatial-analysis.rst: -------------------------------------------------------------------------------- 1 | Multivariate Spatial Analysis 2 | ============================= 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L1/introduction-to-spatial-analysis.rst: -------------------------------------------------------------------------------- 1 | Introduction to Spatial Analysis 2 | ================================ 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L2/analysis-of-spatial-field-data.rst: -------------------------------------------------------------------------------- 1 | Analysis of spatial field data 2 | ============================== 3 | 4 | .. raw:: html 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/lessons/L2/geostatistics-kriging.rst: -------------------------------------------------------------------------------- 1 | Geostatistics: Kriging interpolation 2 | ==================================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L4/spatial-network-optimization-centrality.rst: -------------------------------------------------------------------------------- 1 | Spatial networks: Optimization & Centrality 2 | =========================================== 3 | 4 | .. raw:: html 5 | 6 | -------------------------------------------------------------------------------- /source/lessons/L1/spatial-autocorrelation.rst: -------------------------------------------------------------------------------- 1 | Spatial autocorrelation 2 | ======================= 3 | 4 | In this lesson, we will learn why spatial autocorrelation is an important concept when doing analysis with spatial data. 5 | 6 | .. raw:: html 7 | 8 | 9 | -------------------------------------------------------------------------------- /source/course-info/introduction.rst: -------------------------------------------------------------------------------- 1 | Introduction to the course 2 | ========================== 3 | 4 | Welcome to the course! The following presentation gives you an overview of the course and basic information about 5 | various things: 6 | 7 | .. raw:: html 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/course-info/learning-goals.rst: -------------------------------------------------------------------------------- 1 | Learning objectives 2 | =================== 3 | 4 | After this course the student should: 5 | 6 | - understand the typical data analysis workflow 7 | - understand the basics of geostatistics and the associated terminology and mathematical principles 8 | - understand the basic principles of map overlay and map algebra 9 | - understand the principles of graph theory and network analysis 10 | - understand the basic principles of spatio-temporal multivariate analysis 11 | - be able to apply the previous concepts to different geographical problems using Python programming language -------------------------------------------------------------------------------- /source/course-info/attribution.rst: -------------------------------------------------------------------------------- 1 | Attribution 2 | =========== 3 | 4 | Inspiration and some of the materials represented on these pages have been adapted from: 5 | 6 | 1. `Geo-Python -course `__ (Whipp, Tenkanen & Heikinheimo, 2020). 7 | 2. `Automating GIS processes -course `__ (Tenkanen & Heikinheimo, 2020) 8 | 3. `Geographic Data Science with Python -book `__ 9 | 10 | The above courses (1-2) are licenced under **Creative Commons BY-SA 4.0** in a similar 11 | manner as this course, and the course 3. is licenced under **Creative Commons BY-NC-ND 4.0**. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = Spatial Analytics 3 | version = 2021 4 | license = Creative Commons BY-SA 5 | description = Spatial Analytics -course. 6 | author = Henrikki Tenkanen 7 | url = https://github.com/AaltoGIS/Spatial-Analytics 8 | classifiers = 9 | Development Status :: 2 - 10 | Environment :: Web Environment 11 | License :: OSI Approved :: MIT License 12 | Operating System :: OS Independent 13 | Programming Language :: Python 14 | Programming Language :: Python :: 3.7 15 | Programming Language :: Python :: 3.8 16 | Programming Language :: Python :: 3.9 17 | 18 | [options] 19 | packages = find: 20 | include_package_data = True 21 | zip_safe = False 22 | 23 | [tool:release] 24 | github_owner = AaltoGIS 25 | github_repo = Spatial-Analytics -------------------------------------------------------------------------------- /source/course-info/grading.rst: -------------------------------------------------------------------------------- 1 | Grading 2 | ======= 3 | 4 | Course grades will be given using the standard six-level grading scale from 0 to 5. 5 | Course grade will be based on 1) weekly exercises and 2) final exam. 6 | 7 | The final grade is based 50 % on the weekly exercise submissions and 50 % of the final exam. 8 | At least half of the points from both exercises and exam is needed to pass the course. 9 | 10 | 11 | Preliminary grading thresholds: 12 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 13 | 14 | - 5 --> 90 % or more of the points received 15 | 16 | - 4 --> 80 % or more of the points received 17 | 18 | - 3 --> 70 % or more of the points received 19 | 20 | - 2 --> 60 % or more of the points received 21 | 22 | - 1 --> 50 % or more of the points received 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /source/course-info/resources.rst: -------------------------------------------------------------------------------- 1 | Readings 2 | ======== 3 | 4 | - Rey, S., D. Arribas-Bel, L. Wolf. (2021). `Geographic Data Science with Python `__. --> Is freely available online. 5 | - Paez, A. (2021). `An introduction to spatial data analysis and statistics: A course in R `__. --> Is freely available online. 6 | - Haining, R. & G. Li (2020). *Modelling Spatial and Spatial-Temporal Data - A Bayesian Approach.* 7 | - Chun, Y. & D. Griffith. (2013). *Spatial statistics & Geostatistics*. 8 | - O'Sullivan, D. & D. Unwin (2010). *Geographic information analysis*. --> Is available from the Aalto's library. 9 | - Franklin, R. (2022). `Quantitative methods I: Reckoning with uncertainty `__ 10 | - Kraak M., R.E. Roth, B. Ricker, A. Kagawa & G. Le Sourd (2020). `Mapping for a Sustainable World `__. United Nations: New York, NY (USA). 11 | -------------------------------------------------------------------------------- /source/lessons/L3/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | In this week, we will learn about: 5 | 6 | - :doc:`Map overlay and map algebra ` 7 | - :doc:`Introduction to spatial network analysis ` 8 | - :doc:`Exercise 3 ` 9 | 10 | Lesson videos 11 | ------------- 12 | 13 | .. admonition:: Lesson 3.1 - Map overlay & algebra 14 | 15 | Aalto University students can access the video by clicking the image below (requires login): 16 | 17 | .. figure:: img/Lesson3.1.png 18 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=4d6c5b5d-186f-419c-acd6-b0b801061a68 19 | :width: 500px 20 | :align: left 21 | 22 | .. admonition:: Lesson 3.2 - Introduction to Spatial Network Analysis 23 | 24 | Aalto University students can access the video by clicking the image below (requires login): 25 | 26 | .. figure:: img/Lesson3.2.png 27 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a08cd239-9595-48e1-a1af-b0b801061a18 28 | :width: 500px 29 | :align: left 30 | 31 | -------------------------------------------------------------------------------- /source/lessons/L5/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | In this week, we will learn about: 5 | 6 | - :doc:`Cartography and Map User Interfaces ` 7 | - :doc:`Visual analytics ` 8 | - :doc:`Final remarks and info about the exam ` 9 | 10 | Lesson videos 11 | ------------- 12 | 13 | .. admonition:: Lesson 5.1 - Cartography and Map User Interfaces 14 | 15 | Aalto University students can access the video by clicking the image below (requires login): 16 | 17 | .. figure:: img/Lesson5.1.png 18 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a55cd298-8eb7-471d-9f16-b0ca00e0d940 19 | :width: 500px 20 | :align: left 21 | 22 | 23 | .. admonition:: Lesson 5.2 - Visual analytics; Exam practicalities and final remarks 24 | 25 | Aalto University students can access the video by clicking the image below (requires login): 26 | 27 | .. figure:: img/Lesson5.2.png 28 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=3cc659e2-c64f-4b7e-adf8-b0ca00ec6b6b 29 | :width: 500px 30 | :align: left 31 | 32 | -------------------------------------------------------------------------------- /source/lessons/L2/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | In this week, we will learn about: 5 | 6 | - :doc:`Analysis of spatial field data; Spatial sampling ` 7 | - :doc:`Geostatistics: IDW and Kriging interpolation ` 8 | - :doc:`Exercise 2 ` 9 | 10 | Lesson videos 11 | ------------- 12 | 13 | .. admonition:: Lesson 2.1 - Spatial autocorrelation; Analysis of spatial field data; Spatial sampling 14 | 15 | Aalto University students can access the video by clicking the image below (requires login): 16 | 17 | .. figure:: img/Lesson2.1.png 18 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=ca2806b4-f384-4600-b2c1-b0b000a75d5e 19 | :width: 500px 20 | :align: left 21 | 22 | .. admonition:: Lesson 2.2 - Geostatistics: IDW and Kriging interpolation; Overview of Exercise 2 23 | 24 | Aalto University students can access the video by clicking the image below (requires login): 25 | 26 | .. figure:: img/Lesson2.2.png 27 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=cd1f1946-fd1a-458f-b480-b0b000b337a2 28 | :width: 500px 29 | :align: left 30 | -------------------------------------------------------------------------------- /source/lessons/L4/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | In this week, we will learn about: 5 | 6 | - :doc:`Spatial network analysis - Optimization & Centrality indicators ` 7 | - :doc:`Multivariate spatial analysis ` 8 | - :doc:`Exercise 4 ` 9 | 10 | 11 | Lesson videos 12 | ------------- 13 | 14 | .. admonition:: Lesson 4.1 - Spatial network analysis: Optimization & Centrality indicators; Exercise 3 overview 15 | 16 | Aalto University students can access the video by clicking the image below (requires login): 17 | 18 | .. figure:: img/Lesson4.1.png 19 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=f6c0154b-2ce3-4706-8b73-b0c200a9f076 20 | :width: 500px 21 | :align: left 22 | 23 | .. admonition:: Lesson 4.2 - Multivariate Spatial Analysis; Exercise 4 overview 24 | 25 | Aalto University students can access the video by clicking the image below (requires login): 26 | 27 | .. figure:: img/Lesson4.2.png 28 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a487692b-f7cd-4a60-b912-b0c200ba311e 29 | :width: 500px 30 | :align: left 31 | -------------------------------------------------------------------------------- /ci/environment_unix.yml: -------------------------------------------------------------------------------- 1 | name: geo 2 | 3 | channels: 4 | - conda-forge 5 | 6 | dependencies: 7 | - python=3.10 8 | - bokeh 9 | - contextily 10 | - datashader 11 | - earthpy 12 | - esda 13 | - folium 14 | - geocube 15 | - geojson 16 | - geopandas=0.14.0 17 | - geopy=2.4.0 18 | - geoviews=1.10.1 19 | - gstools 20 | - hvplot=0.8.3 21 | - ipyleaflet=0.17.4 22 | - jupyterlab=3.6.5 23 | - jupyterlab-git 24 | - leafmap=0.27.0 25 | - mapclassify=2.6.1 26 | - matplotlib=3.8.0 27 | - mesa 28 | - mgwr 29 | - momepy=0.6.0 30 | - movingpandas=0.17.1 31 | - openjdk=20.0.2 32 | - osmnx=1.6.0 33 | - owslib=0.29.2 34 | - palettable 35 | - pandas<2.1.0 36 | - plotly=5.17.0 37 | - pyinterpolate=0.4 38 | - pykrige 39 | - pyrosm 40 | - pysal 41 | - pyogrio=0.6.0 42 | - python-igraph=0.10.8 43 | - pysal=23.1 44 | - r5py>=0.1.1.dev0 45 | - rasterio 46 | - rasterstats 47 | - richdem 48 | - rioxarray 49 | - scikit-image 50 | - scikit-learn 51 | - scikit-mobility 52 | - scipy 53 | - seaborn 54 | - statsmodels 55 | - xarray 56 | - xarray_leaflet 57 | - xarray-spatial 58 | - xlrd 59 | - xlsxwriter 60 | - pip 61 | - pip: 62 | - r5py.sampledata.helsinki>=0.1.1.dev0 63 | - r5py.sampledata.sao_paulo>=0.1.1.dev0 64 | -------------------------------------------------------------------------------- /source/lessons/L4/exercise-4.rst: -------------------------------------------------------------------------------- 1 | Exercise 4 2 | ========== 3 | 4 | **Due date:** Please complete this exercise by Sunday **2 weeks** after the exercise has been released (i.e. by Sunday 3th December). 5 | 6 | .. admonition:: Exercise 4 - Start your assignment 7 | 8 | You can start working on your personal (private) copy of Exercise 4 by: 9 | 10 | - `accepting the GitHub Classroom assignment `__. 11 | 12 | You can also take a look at the open course copy of `Exercise 4 in the course GitHub repository `__ (does not require logging in). 13 | Note that you should not try to make changes to this copy of the exercise, but rather only to the copy available via GitHub Classroom. 14 | 15 | Cloud computing environment 16 | --------------------------- 17 | 18 | After you have your personal Exercise-2 exercise in GitHub, start doing the programming using CSC Notebooks: 19 | 20 | .. image:: https://img.shields.io/badge/launch-CSC%20notebook-blue.svg 21 | :target: https://notebooks.csc.fi 22 | 23 | .. note:: 24 | 25 | We will use git and GitHub when working with the exercises. 26 | You can find instructions for using git and the Jupyter Lab git plugin :doc:`in here <../L1/git-basics>`. 27 | -------------------------------------------------------------------------------- /source/lessons/L3/exercise-3.rst: -------------------------------------------------------------------------------- 1 | Exercise 3 2 | ========== 3 | 4 | **Due date:** Please complete this exercise by Sunday **2 weeks** after the exercise has been released (i.e. by Sunday 26th November). 5 | 6 | .. admonition:: Exercise 3 - Start your assignment 7 | 8 | You can start working on your personal (private) copy of Exercise 3 by 9 | - `accepting the GitHub Classroom assignment `__. 10 | 11 | You can also take a look at the open course copy of `Exercise 3 in the course GitHub repository `__ (does not require logging in). 12 | Note that you should not try to make changes to this copy of the exercise, but rather only to the copy available via GitHub Classroom. 13 | 14 | Cloud computing environment 15 | --------------------------- 16 | 17 | After you have your personal Exercise-2 exercise in GitHub, start doing the programming using CSC Notebooks: 18 | 19 | .. image:: https://img.shields.io/badge/launch-CSC%20notebook-blue.svg 20 | :target: https://notebooks.csc.fi 21 | 22 | .. note:: 23 | 24 | We will use git and GitHub when working with the exercises. 25 | You can find instructions for using git and the Jupyter Lab git plugin :doc:`in here <../L1/git-basics>`. 26 | 27 | -------------------------------------------------------------------------------- /ci/environment_windows.yml: -------------------------------------------------------------------------------- 1 | name: geo 2 | 3 | channels: 4 | - conda-forge 5 | 6 | dependencies: 7 | - python=3.10 8 | - bokeh 9 | - contextily 10 | - datashader 11 | - earthpy 12 | - esda 13 | - fiona=1.8.22 14 | - folium 15 | - geocube 16 | - geojson 17 | - geopandas=0.14.0 18 | - geopy=2.4.0 19 | - geoviews=1.10.1 20 | - gstools 21 | - hvplot=0.8.3 22 | - ipyleaflet=0.17.4 23 | - jupyterlab=3.6.5 24 | - jupyterlab-git 25 | - leafmap=0.27.0 26 | - mapclassify=2.6.1 27 | - matplotlib=3.8.0 28 | - mesa 29 | - mgwr 30 | - momepy=0.6.0 31 | - movingpandas=0.17.1 32 | - openjdk=20.0.2 33 | - osmnx=1.6.0 34 | - owslib=0.29.2 35 | - palettable 36 | - pandas<2.1.0 37 | - plotly=5.17.0 38 | - pyinterpolate=0.4 39 | - pyrosm 40 | - pykrige 41 | - pysal 42 | - pyogrio=0.6.0 43 | - python-igraph=0.10.8 44 | - pysal=23.1 45 | - r5py>=0.1.1.dev0 46 | - rasterio 47 | - rasterstats 48 | - richdem 49 | - rioxarray 50 | - scikit-image 51 | - scikit-learn 52 | - scikit-mobility 53 | - scipy 54 | - seaborn 55 | - statsmodels 56 | - xarray 57 | - xarray_leaflet 58 | - xarray-spatial 59 | - xlrd 60 | - xlsxwriter 61 | - pip 62 | - pip: 63 | - r5py.sampledata.helsinki>=0.1.1.dev0 64 | - r5py.sampledata.sao_paulo>=0.1.1.dev0 65 | -------------------------------------------------------------------------------- /source/lessons/L2/exercise-2.rst: -------------------------------------------------------------------------------- 1 | Exercise 2 2 | ========== 3 | 4 | **Due date:** Please complete this exercise by Sunday **2 weeks** after the exercise has been released (i.e. by Sunday 19th November). 5 | 6 | .. admonition:: Exercise 2 - Start your assignment 7 | 8 | You can start working on your personal (private) copy of Exercise 2 by: 9 | 10 | - `accepting the GitHub Classroom assignment `__. 11 | 12 | Notice that if you are using GitHub Classroom for the first time, it might ask from you a permission to verify your GitHub identity. 13 | In such case, choose "Authorize GitHub Classroom". You can also take a look at the open course copy of `Exercise 2 in the course GitHub repository `__ (does not require logging in). 14 | Note that you should not try to make changes to this copy of the exercise, but rather only to the copy available via GitHub Classroom. 15 | 16 | Cloud computing environment 17 | --------------------------- 18 | 19 | After you have your personal Exercise-2 exercise in GitHub, start doing the programming using CSC Notebooks: 20 | 21 | .. image:: https://img.shields.io/badge/launch-CSC%20notebook-blue.svg 22 | :target: https://notebooks.csc.fi 23 | 24 | .. note:: 25 | 26 | We will use git and GitHub when working with the exercises. 27 | You can find instructions for using git and the Jupyter Lab git plugin :doc:`in here <../L1/git-basics>`. 28 | 29 | -------------------------------------------------------------------------------- /source/course-info/course-info.rst: -------------------------------------------------------------------------------- 1 | General info 2 | ============ 3 | 4 | Course meetings in teaching period II 5 | ------------------------------------- 6 | 7 | - Lessons on Tuesdays 12:15-14:00 and Thursdays 13:15-15:00 (room 326 at Otakaari 4). Videos will be shared afterwards. 8 | - Exercise sessions on Wednesdays 12:15-14:00 (room Maari C-D (Win) in Maarintalo, Sähkömiehentie 3). In-person only. 9 | 10 | Instructors 11 | ----------- 12 | 13 | * Henrikki Tenkanen 14 | 15 | Email: *firstname.lastname@aalto.fi* 16 | 17 | * Guest lecturer: Pyry Kettunen, FGI 18 | 19 | * Course assistant: Meeri Näppilä 20 | 21 | Course websites 22 | --------------- 23 | 24 | - Course sites for Period II (Spatial Analytics): 25 | 26 | - Main course site: ``_ 27 | - Notebooks by CSC: ``_ 28 | - Slack (Q&A + chat): ``_ 29 | - Polling / voting (active during lectures only): `presemo.aalto.fi/sds `__ 30 | 31 | - Other useful resources: 32 | 33 | - Geo-Python - Introduction to Python for geo-minded people: ``_ 34 | - Automating GIS processes - Introduction to geographical analysis with Python: ``_ 35 | - Geographic Data Science - Introduction to more advanced concepts of geographical analysis: ``_ 36 | - Spatial Data Science for Sustainable Development: ``_ 37 | 38 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: spatial-analytics 2 | 3 | channels: 4 | - conda-forge 5 | 6 | dependencies: 7 | - python=3.9 8 | - access 9 | - bokeh 10 | - clustergram 11 | - contextily 12 | - dash 13 | - dask 14 | - dask-ml 15 | - datashader 16 | - earthpy 17 | - esda 18 | - folium 19 | - geocube 20 | - geojson 21 | - geopandas 22 | - geoplot 23 | - geopy 24 | - giddy 25 | - gstools 26 | - h3-py 27 | - hdbscan 28 | - hvplot 29 | - inequality 30 | - jupyterlab 31 | - jupyterlab-git 32 | - jupyter-book 33 | - jupyter_sphinx 34 | - legendgram 35 | - mamba 36 | - mapclassify 37 | - matplotlib 38 | - mesa 39 | - mgwr 40 | - momepy 41 | - movingpandas 42 | - mplleaflet 43 | - myst-nb 44 | - myst-parser 45 | - networkx 46 | - osmnx 47 | - palettable 48 | - pandana 49 | - pandas 50 | - plotly_express 51 | - pointpats 52 | - polyline 53 | - pyarrow 54 | - pygeos 55 | - pyinterpolate 56 | - pykrige 57 | - pyrosm 58 | - pysal 59 | - python-igraph 60 | - rasterio 61 | - rasterstats 62 | - scikit-image 63 | - scikit-learn 64 | - scikit-mobility 65 | - scipy 66 | - seaborn 67 | - segregation 68 | - spaghetti 69 | - sphinx 70 | - sphinx-book-theme 71 | - sphinx-togglebutton 72 | - spint 73 | - splot 74 | - spreg 75 | - sqlalchemy 76 | - statsmodels 77 | - tobler 78 | - tqdm 79 | - urbanaccess 80 | - vaex 81 | - vaex-arrow 82 | - xarray 83 | - xarray_leaflet 84 | - xarray-spatial 85 | - xlrd 86 | - xlsxwriter 87 | - pip 88 | - pip: 89 | - mlrose-hiive 90 | - vrpy 91 | -------------------------------------------------------------------------------- /source/lessons/L1/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | The first week of this course will be dedicated to various introductions. We will learn about: 5 | 6 | - :doc:`Introduction to the course and learning objectives <../../course-info/introduction>` 7 | - :doc:`Introduction to spatial analysis ` 8 | - :doc:`Point pattern analysis ` 9 | - :doc:`Spatial autocorrelation ` 10 | - :doc:`Tutorial 1: Introduction to Git and using CSC Notebooks ` 11 | - :doc:`Tutorial 2: Introduction to Python for geospatial analysis ` 12 | 13 | Lesson videos 14 | ------------- 15 | 16 | 17 | .. admonition:: Lesson 1.1 - Course overview; Introduction to spatial analysis 18 | 19 | Aalto University students can access the video by clicking the image below (requires login): 20 | 21 | .. figure:: img/Lesson1.1.png 22 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=20b67e39-0a44-412d-9703-b0aa00d6ffe2 23 | :width: 500px 24 | :align: left 25 | 26 | .. admonition:: Lesson 1.2 - Introduction to the computing environment; Tutorial to Python GIS; How to work with the exercises? 27 | 28 | Aalto University students can access the video by clicking the image below (requires login): 29 | 30 | .. figure:: img/Lesson1.2.png 31 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=b2ac5c34-e4ab-4cda-90ca-b0aa00e73bb4 32 | :width: 500px 33 | :align: left 34 | 35 | .. admonition:: Lesson 1.3 - Tutorial to Python GIS continues; Point Pattern Analysis 36 | 37 | Aalto University students can access the video by clicking the image below (requires login): 38 | 39 | .. figure:: img/Lesson1.3.png 40 | :target: https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=b3850cff-3582-440a-9847-b0aa00fe6b97 41 | :width: 500px 42 | :align: left 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /source/lessons/L1/exercise-1.rst: -------------------------------------------------------------------------------- 1 | Exercise 1 2 | ========== 3 | 4 | **Due date:** Please complete this exercise by Sunday **2 weeks** after the exercise has been released (i.e. by Sunday 12th November). 5 | 6 | .. admonition:: Pre-assignment - Create a GitHub account 7 | 8 | Before starting the actual Exercise 1 assignment below, you need to have a GitHub account. If you don't have one yet, 9 | please signup for GitHub from here (it's free to use). 10 | 11 | **Steps:** 12 | 13 | 1. Go to `https://github.com/join `__ 14 | 2. Enter a username, email address, and password. 15 | 3. Verify that you are a human (finish CAPTCHA test) 16 | 4. Answer a few questions about why you created the account (e.g. you're a student, learning to code etc.) 17 | 5. Verify the account via the email that you provided 18 | 19 | After these steps you are ready to start the Exercise 1 Assignment below. 20 | 21 | .. admonition:: Exercise 1 - Start your assignment 22 | 23 | You can start working on your personal (private) copy of Exercise 1 by: 24 | 25 | - `accepting the GitHub Classroom assignment `__. 26 | 27 | Notice that if you are using GitHub Classroom for the first time, it might ask from you a permission to verify your GitHub identity. In such case, choose "Authorize GitHub Classroom". 28 | After you have your personal Exercise-1 exercise in GitHub, start doing the programming using CSC Notebooks: 29 | 30 | .. image:: https://img.shields.io/badge/launch-CSC%20notebook-blue.svg 31 | :target: https://notebooks.csc.fi 32 | 33 | You can also take a look at the open course copy of `Exercise 1 in the course GitHub repository `__ (does not require logging in). 34 | Note that you should not try to make changes to this copy of the exercise, but rather only to the copy available via GitHub Classroom. 35 | 36 | .. note:: 37 | 38 | We will use git and GitHub when working with the exercises. 39 | You can find instructions for using git and the Jupyter Lab git plugin :doc:`in here `. 40 | -------------------------------------------------------------------------------- /source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'Spatial-Analytics' 21 | copyright = '2023, Henrikki Tenkanen, Dept. of Built Environment, Aalto University' 22 | author = 'Henrikki Tenkanen' 23 | 24 | # -- General configuration --------------------------------------------------- 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be 27 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 28 | # ones. 29 | extensions = [ 30 | 'sphinx.ext.mathjax', 31 | 'sphinx.ext.todo', 32 | 'sphinx_togglebutton', 33 | 'IPython.sphinxext.ipython_console_highlighting', 34 | 'IPython.sphinxext.ipython_directive', 35 | 'myst_nb', 36 | 'jupyter_sphinx', 37 | ] 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | templates_path = ['_templates'] 41 | 42 | # List of patterns, relative to source directory, that match files and 43 | # directories to ignore when looking for source files. 44 | # This pattern also affects html_static_path and html_extra_path. 45 | exclude_patterns = [] 46 | 47 | # -- Options for HTML output ------------------------------------------------- 48 | 49 | # The name of the Pygments (syntax highlighting) style to use. 50 | pygments_style = 'sphinx' 51 | 52 | # The theme to use for HTML and HTML Help pages. See the documentation for 53 | # a list of builtin themes. 54 | html_theme = 'sphinx_book_theme' 55 | 56 | # Show todos 57 | todo_include_todos = True 58 | 59 | # Add any paths that contain custom static files (such as style sheets) here, 60 | # relative to this directory. They are copied after the builtin static files, 61 | # so a file named "default.css" will overwrite the builtin "default.css". 62 | html_static_path = ['_static'] 63 | html_logo = 'img/Aalto-logo.png' 64 | html_title = "" 65 | 66 | # Custom CSS 67 | #html_css_files = ['custom.css'] 68 | 69 | html_theme_options = { 70 | # "external_links": [], 71 | "repository_url": "https://github.com/AaltoGIS/Spatial-Analytics/", 72 | "repository_branch": "master", 73 | "path_to_docs": "source/", 74 | "google_analytics_id": "UA-214280609-1", 75 | "use_edit_page_button": True, 76 | "use_repository_button": True, 77 | "launch_buttons": { 78 | "binderhub_url": "https://notebooks.gesis.org/binder", 79 | "thebe": False, 80 | "notebook_interface": "jupyterlab", 81 | "collapse_navigation": False, 82 | # Google Colab does not provide an easy way for specifying/building/activating the conda environment 83 | # in a similar manner as Binder. Hence, let's not keep it. The easiest way seems to be: 84 | # https://github.com/jaimergp/condacolab 85 | # But it requires actions from the user nontheless, so atm it's a no-go. 86 | #"colab_url": "https://colab.research.google.com" 87 | }, 88 | } 89 | 90 | # Allow errors 91 | execution_allow_errors = True 92 | 93 | # Do not execute cells 94 | jupyter_execute_notebooks = "off" 95 | -------------------------------------------------------------------------------- /source/course-info/License-terms.rst: -------------------------------------------------------------------------------- 1 | License and terms of usage 2 | ========================== 3 | 4 | We hope that the materials provided here would be helpful for others. Thus, we share all the lesson materials openly, 5 | and also our source codes and lesson materials are openly available `from GitHub `_. 6 | There, you can also find information how to use the materials and modify them to your own purposes. 7 | **However**, if you modify the lesson materials we wish that you would also share your materials openly e.g. on GitHub where 8 | everyone could benefit from you work, in a similar manner as we provide these materials for you. 9 | We also welcome collaboration and ideas of how to improve the materials on these pages. 10 | Contact us via `email `_ or fork the docs on **GitHub**. 11 | 12 | **Our materials and code snippets are licensed** as explained below: 13 | 14 | Instructional materials 15 | ----------------------- 16 | 17 | .. raw:: html 18 | 19 | Creative Commons License
20 | 21 | All the instructional material is made available under the **Creative Commons Attribution-ShareAlike 4.0 International licence** . See the `full licence `_. 22 | 23 | In short as a human-readable version of the license: 24 | 25 | you are free to 26 | ~~~~~~~~~~~~~~~ 27 | 28 | - **Share** - copy and redistribute the material in any medium or format 29 | - **Adapt** - remix, transform, and build upon the material 30 | 31 | for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms. 32 | 33 | Under the following terms 34 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 35 | 36 | - **Attribution** - You must give appropriate-credit_, provide a link to the license, and indicate_ if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 37 | - **ShareAlike** - If you remix, transform, or build upon the material, you must distribute your contributions under the same-license_ as the original. 38 | 39 | **No additional restrictions** — You may not apply legal terms or technological-measures_ that legally restrict others from doing anything the license permits. 40 | 41 | Notices 42 | ~~~~~~~ 43 | 44 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception_ or **limitation**. 45 | 46 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity_, privacy, 47 | or moral rights may limit how you use the material. 48 | 49 | .. admonition:: Footnotes 50 | 51 | .. _appropriate-credit: 52 | 53 | **Appropriate credit**: If supplied, you must provide the name of the creator and attribution parties, a copyright notice, a license notice, a disclaimer notice, and a link to the material. CC licenses prior to Version 4.0 also require you to provide the title of the material if supplied, and may have other slight differences. 54 | 55 | .. _indicate: 56 | 57 | **Indicate changes**: In 4.0, you must indicate if you modified the material and retain an indication of previous modifications. In 3.0 and earlier license versions, the indication of changes is only required if you create a derivative. 58 | 59 | .. _same-license: 60 | 61 | **Same license**: You may also use a license listed as compatible at `https://creativecommons.org/compatiblelicenses `_. 62 | 63 | .. _technological-measures: 64 | 65 | **Technological measures**: The license prohibits application of effective technological measures, defined with reference to Article 11 of the WIPO Copyright Treaty. 66 | 67 | .. _exception: 68 | 69 | **Exception or limitation**: The rights of users under exceptions and limitations, such as fair use and fair dealing, are not affected by the CC licenses.** 70 | 71 | .. _publicity: 72 | 73 | **Publicity, privacy, or moral rights**: You may need to get additional permissions before using the material as you intend. 74 | 75 | 76 | Code snippets / software 77 | ------------------------ 78 | 79 | Except where otherwise noted, the example programs, code snippets and other software provided by the 80 | Spatial Analytics -course are made available under the **MIT license** 81 | (read licence `here `_. 82 | 83 | -------------------------------------------------------------------------------- /source/course-info/slack-usage.rst: -------------------------------------------------------------------------------- 1 | Communicating with Slack 2 | ======================== 3 | 4 | .. figure:: img/Slack-logo.png 5 | :width: 150px 6 | 7 | During this course we will use `Slack `__ for discussion and questions about the lessons and exercises. 8 | 9 | Accessing the workspace in Slack 10 | -------------------------------- 11 | 12 | We will send an invitation link for all enrolled students to the Slack Team called ``Spatial-Analytics-2023``. 13 | Before you can start using Slack, you should create a new account for Slack (if you don't have one already) and accept the invitation you have received. 14 | 15 | **After accepting the invitation, you can access the course Slack team via this link:** ``__ 16 | 17 | General guidelines for communication 18 | ------------------------------------ 19 | 20 | Here we have few general guidelines for using Slack to keep things well organized (see sections below for further instructions, if Slack is new to you). 21 | 22 | .. important:: 23 | 24 | 1. **You should always select the right channel for your question!** 25 | 26 | - If you have question e.g. related to week 1 lesson or exercise, you make your question in channel ``week-1``. 27 | - If you want to share a funny GIF you found online, you can post it into channel ``random``. 28 | 29 | 2. Use threads to maintain the discussion of specific topic under the same question / comment. 30 | 31 | 3. **Ask!** If something seems to be tricky and difficult, don't hesitate to ask a question. Your fellow students or we instructors can help you out. 32 | 33 | 4. **Discuss and comment!** If you see a question and you know how to help, we encourage you to comment and help your friend. 34 | 35 | 5. **HOWEVER: DON'T PROVIDE READY ANSWERS** in the discussion (such as all necessary codes for given problem), it does not help your friend to learn. 36 | 37 | With these guidelines we keep our discussion well organized and it is easy for everybody to find help and relevant discussion about specific lessons / exercises. 38 | 39 | That's it! Easy, now you know how to communicate during the course. If you need further info about using Slack, continue reading. 40 | 41 | Overview of Slack 42 | ----------------- 43 | 44 | Using Slack for communication is easy. It works in a similar manner as any chatting application (such as WhatsApp). However, the benefits of Slack are: 45 | 46 | - the discussions are grouped into separate topics (called ``channels``) that keeps discussions well organized 47 | - easy to find stuff with good search functionality 48 | - you can notify different users by using @ character (e.g. @user1) 49 | - you can start threads e.g. for specific question and add comments into that thread (keeps comments nicely grouped under the question) 50 | - works nicely in browser and has phone applications for all major operating systems (Android, iOS, Windows Phone) 51 | 52 | Basic usage of Slack 53 | -------------------- 54 | 55 | When entering to our Slack Team you should see something like following where you have: 56 | 57 | - all channels listed on the left panel 58 | - on the right you have the selected channel where you can start discussing about the topics for that week: 59 | 60 | .. figure:: img/slack-basic-view.png 61 | :alt: Basic view of Slack 62 | :width: 550px 63 | 64 | Basic view of Slack 65 | 66 | Notifying a user 67 | ~~~~~~~~~~~~~~~~ 68 | 69 | If you want to ask a question from specific user (or target a comment for him/her), it is possible to notify the user by using ``@`` symbol. 70 | 71 | The example below shows how to do this: 72 | 73 | .. figure:: img/notifying-user.PNG 74 | :alt: You can notify a user 75 | :width: 550px 76 | 77 | You can target your question/answer to speficic user with ``@`` -character. 78 | 79 | 80 | Using threads 81 | ~~~~~~~~~~~~~ 82 | 83 | You can further organize and group the discussion by starting a new thread for selected post. Start a new thread by keeping your mouse over the post that you want 84 | to start discussing about and press button in the middle that creates a new thread: 85 | 86 | .. figure:: img/start-thread.PNG 87 | :alt: Organizing discussion with threads. 88 | :width: 550px 89 | 90 | Organizing discussion with threads. 91 | 92 | You can view the active thread by pressing the thread that has some replies. The thread opens up as a new panel on the right side where you will see all the discussion that 93 | is relevant for the question at hand. You can send your comments into that thread by putting your comment on the text box on the right: 94 | 95 | .. figure:: img/answering-thread.PNG 96 | :alt: Viewing and answering to a specific thread can be done with dedicated panel on the right. 97 | :width: 550px 98 | 99 | Viewing and answering to a specific thread can be done with dedicated panel on the right. 100 | 101 | -------------------------------------------------------------------------------- /source/index.rst: -------------------------------------------------------------------------------- 1 | .. figure:: img/Spatial-analytics-logo.png 2 | 3 | **Spatial analytics** -course introduces you to different analysis approaches and methods of spatio-statistical analysis, geostatistics, map algebra 4 | and geovisual analysis. After the course, you can identify appropriate analysis approaches for different geospatial tasks, 5 | and describe data needs and suitable methods for the given analysis process. You can discuss the strengths and limitations of the methods. 6 | The course has been developed at the Department of Built Environment, Aalto University, Finland, and the materials are openly available for anyone interested. 7 | 8 | Learning objectives 9 | ------------------- 10 | 11 | After completing this course, you should: 12 | 13 | - understand the typical data analysis workflow 14 | - understand the basics of geostatistics and the associated terminology and mathematical principles 15 | - understand the basic principles of map overlay and map algebra 16 | - understand the principles of graph theory and network analysis 17 | - understand the basic principles of spatio-temporal multivariate analysis 18 | - be able to apply the previous concepts to different geographical problems using Python programming language 19 | 20 | Prerequirements 21 | --------------- 22 | 23 | Before taking this course, it is required to know the basics of Python programming as well as GIS. 24 | If you are new to Python, or would like to refresh your Python skills, we recommend to start with an online 25 | and open access course called Geo-Python which is available at `geo-python.github.io `__. 26 | If you need to refresh your Python GIS skills, we recommend starting with a course Automating GIS-processes available 27 | at `autogis.github.io `__. Both of these courses include tutorials, videos and exercises. 28 | 29 | 30 | .. admonition:: Help improving the materials 31 | 32 | **This is version 3.** 33 | 34 | The course was given for the very first time in its current form in 2021, meaning that the content of the course is likely to change and 35 | improve after each time the course is given (all versions will be available). By being a fully open 36 | educational resource, **you can also help making the course better**. 37 | If you find any errors, typos, or other problems, please help, by suggesting an edit in GitHub. You can do this easily by clicking 38 | ``suggest edit`` under the GitHub icon located at 39 | the top-right on each page: 40 | 41 | .. image:: img/suggest_edit.png 42 | :width: 130px 43 | 44 | | 45 | If you have good ideas about what should be taught, i.e. what methods, interesting datasets or literature should be introduced 46 | during the course, you can suggest and bring your ideas forward by `raising an issue in GitHub `__. 47 | 48 | .. admonition:: Credits 49 | 50 | This course was originally developed by **Prof. Kirsi Virrantaus** at Aalto University, who has very much inspired how it is taught in its current form. 51 | Also Marko Kallio, Jaakko Madetoja and Salla Multimäki have contributed to the materials and exercises. 52 | Here, the materials are somewhat updated, restructured and aligned to work with Python spatial data science ecosystem, 53 | and the online learning ecosystem used in the course. 54 | 55 | 56 | Course format 57 | ------------- 58 | 59 | The majority of this course will be spent in front of a computer writing code with the Python language. 60 | The course consists of lectures, tutorials and weekly exercises. The exercises will focus on 61 | applying the introduced methods to given geographical problems. 62 | 63 | Most exercises in this course involve real world examples and data. For each exercise, you may be asked to 64 | submit the Python codes you have written, output figures and answers to related questions. You are encouraged to 65 | discuss and work together with other students while working on the weekly exercises. 66 | 67 | .. admonition:: Aalto University students 68 | 69 | The Spatial Analytics -course is part of the 70 | `Master's Programme of Geoinformatics at Aalto University `__ 71 | under the course code ``GIS-E1060``. 72 | 73 | .. admonition:: Interactive contents 74 | 75 | Each tutorial in this course can be turned into an interactive programming session in the browser. 76 | You can find buttons for activating the python environment using `Binder `__ at the top of each programming lesson. 77 | Students at Finnish higher education institutions are encouraged to use the `CSC notebooks `__ environment. 78 | 79 | Program 80 | ------- 81 | 82 | The course includes two lectures per week and is held at the Aalto University starting on Tuesday in the second teaching period. 83 | Topics per Lesson are listed below. Please note that this web page is updated each week before the given lesson: 84 | 85 | .. list-table:: 86 | :widths: 1 8 87 | :header-rows: 1 88 | :stub-columns: 1 89 | :align: left 90 | 91 | * - Lesson 92 | - Themes 93 | * - 1 94 | - - Course overview and practicalities 95 | - Introduction to spatial analysis 96 | - Point pattern analysis 97 | * - 2 98 | - - Spatial autocorrelation 99 | - Git+Python tutorials 100 | * - 3 101 | - - Analysis of spatial field data 102 | * - 4 103 | - - Geostatistics: Interpolation (IDW+Kriging) 104 | * - 5 105 | - - Map overlay & algebra 106 | * - 6 107 | - - Spatial network analysis 108 | * - 7 109 | - - Spatial networks: Optimization & centrality 110 | * - 8 111 | - - Multivariate spatial analysis 112 | * - 9 113 | - - Cartography and Map User Interfaces 114 | * - 10 115 | - - Visual analytics 116 | 117 | | 118 | 119 | Contents 120 | -------- 121 | 122 | .. toctree:: 123 | :maxdepth: 1 124 | :caption: Course information 125 | 126 | course-info/course-info 127 | course-info/learning-goals 128 | course-info/resources 129 | course-info/grading 130 | course-info/course-environment-components 131 | course-info/installing-miniconda 132 | course-info/slack-usage 133 | course-info/License-terms 134 | course-info/attribution 135 | 136 | .. toctree:: 137 | :maxdepth: 1 138 | :caption: Week 1 139 | 140 | course-info/introduction 141 | lessons/L1/overview 142 | lessons/L1/introduction-to-spatial-analysis 143 | lessons/L1/intro-to-python-geostack.ipynb 144 | lessons/L1/point-pattern-analysis 145 | lessons/L1/spatial-autocorrelation 146 | lessons/L1/git-basics 147 | lessons/L1/exercise-1 148 | 149 | .. toctree:: 150 | :maxdepth: 1 151 | :caption: Week 2 152 | 153 | lessons/L2/overview 154 | lessons/L2/analysis-of-spatial-field-data 155 | lessons/L2/geostatistics-kriging.rst 156 | lessons/L2/exercise-2 157 | 158 | 159 | .. toctree:: 160 | :maxdepth: 1 161 | :caption: Week 3 162 | 163 | lessons/L3/overview 164 | lessons/L3/map-overlay 165 | lessons/L3/spatial-network-analysis 166 | lessons/L3/exercise-3 167 | 168 | .. toctree:: 169 | :maxdepth: 1 170 | :caption: Week 4 171 | 172 | lessons/L4/overview 173 | lessons/L4/spatial-network-optimization-centrality 174 | lessons/L4/multivariate-spatial-analysis 175 | lessons/L4/exercise-4 176 | 177 | 178 | .. toctree:: 179 | :maxdepth: 1 180 | :caption: Week 5 181 | 182 | lessons/L5/overview 183 | lessons/L5/cartography-map-user-interfaces 184 | lessons/L5/visual-analytics 185 | lessons/L5/final-remarks 186 | -------------------------------------------------------------------------------- /source/course-info/course-environment-components.rst: -------------------------------------------------------------------------------- 1 | Course environment 2 | ================== 3 | 4 | During this course, we will use different tools and applications for programming and communications: 5 | 6 | 1. `JupyterLab`_ for the actual programming 7 | 2. `Cloud computing environments`_ Binder or CSC Notebooks 8 | 3. `Git and GitHub`_ for version control and documentation 9 | 4. `Voting / polling <#voting-and-polling>`_ for interactive questions during the lectures 10 | 5. `Slack`_ for communicating among Aalto students 11 | 12 | JupyterLab 13 | ---------- 14 | `JupyterLab `__ is an open-source web-based user interface for doing data science. 15 | The JupyterLab interface consists of different components such as a file browser, terminal, image viewer, console, text editor, etc. 16 | 17 | **Jupyter Notebooks** (filename extension ``.ipynb``) are documents inside the JupyterLab environment which contain computer code, and rich text elements (figures, links, etc.). 18 | Jupyter Notebooks are perfect for documenting a data science workflow in an interactive format. 19 | 20 | **We use JupyterLab/Jupyter Notebooks as the default programming environment during this course.** 21 | All of the course materials are available in a JupyterLab setting via `cloud computing environments`_ (Binder or CSC Notebooks). 22 | 23 | .. figure:: img/Binder_launcher.png 24 | :alt: Binder Jupyter Notebook 25 | :width: 700px 26 | 27 | Basic view of JupyterLab 28 | 29 | .. figure:: img/JupyterLab.png 30 | :alt: A Jupyter Notebook open in JupyterLab 31 | :width: 700px 32 | 33 | A Jupyter Notebook open in JupyterLab 34 | 35 | Cloud computing environments 36 | -------------------------------- 37 | 38 | We will use cloud-based computing environments (CSC Notebooks or Binder) to access interactive online version of the lessons 39 | and to work on the weekly exercises. You can use the cloud computing environments with any computer as long as it has a reasonably fast internet connection and a web browser (just don't use Internet Explorer). 40 | 41 | Please note that the cloud computing environments are **temporary**. Always remember to push your changes to GitHub (and / or download a local copy). 42 | 43 | .. figure:: img/launch-buttons.png 44 | :alt: Launch buttons 45 | :width: 700px 46 | 47 | Different options for making the lesson interactive 48 | 49 | Each interactive lesson and exercise will have a launch button for both Binder and CSC Notebook. 50 | The CSC notebooks environment is only accessible to students from Finnish universities and research institutes. 51 | 52 | .. note:: 53 | 54 | You can also install Python and the same programming environment to your local computer, but it is not necessary in this course (we recommend using the cloud computing environment. 55 | **However**, if you wish to do so, please read :doc:`this documentation ` to learn how to install Python and the libraries on your own computer. 56 | 57 | CSC Notebooks 58 | ~~~~~~~~~~~~~~~ 59 | 60 | Notebooks by CSC (https://notebooks.csc.fi) is a computing environment hosted by the Finnish IT Center for Science (CSC). CSC notebooks are used for running Jupyter Notebooks in a customized cloud computing environment. 61 | CSC Notebooks is available only for students who are affiliated with Finnish universities and research institutes (via the HAKA user authentication). 62 | 63 | 64 | .. note:: **When using the CSC Notebooks for the first time, you need to join the group created for this course:** 65 | 66 | 1. Log in at https://notebooks.csc.fi/ 67 | 2. Select Haka for the authentication provider 68 | 3. Enter your Finnish university login credentials 69 | 4. Click on the **Join workspace** button on the top right 70 | 5. Join the ``Spatial Analytics 2023`` workspace using the join code ``spa-svhvj2vm`` 71 | 72 | After joining the group, you should be able to view an environment called ``Spatial Analytics 2023`` on the Dashboard. 73 | 74 | .. figure:: img/CSC_join_group.webp 75 | :alt: Join Group in CSC Notebooks 76 | 77 | **Remember to save your work!** 78 | 79 | .. note:: **Repeat these steps every time when starting to work on a programming task using the CSC Notebooks:** 80 | 81 | 1. Log in at https://notebooks.csc.fi/ 82 | 2. Click ``Start session`` (power button) on the Dashboard for Spatial Analytics 2022 83 | 3. Wait. It might take a few moments for the instance to launch 84 | 85 | .. figure:: img/CSC_launch_new.png 86 | :alt: Launch new Jupyter Lab instance 87 | 88 | Launching the instance takes a few moments. 89 | 90 | **Remember to save your work!** 91 | 92 | Binder 93 | ~~~~~~~ 94 | 95 | Binder (https://mybinder.org/) runs Jupyter Notebooks in your web browser in a customized environment. The original files (notebooks) are hosted on GitHub. 96 | Binder does not require the user to log in, you can just click on the link in the lesson / exercise and start working. 97 | 98 | .. figure:: img/Binder_loading.png 99 | :alt: Binder loading 100 | :width: 700px 101 | 102 | Binder takes a few moments to load 103 | 104 | Once the instance is ready, you can navigate to the lesson folders and start working with existing notebooks or create a new one. 105 | 106 | **Remember to save your work! The Binder instance is temporary, and all your files will be lost after the session.** 107 | 108 | Git and GitHub 109 | --------------- 110 | 111 | One of the core goals of this course (besides learning programming) 112 | is to learn how to use `version control `__ with 113 | `Git `__ and storing your 114 | codes (privately) on `GitHub `__. 115 | 116 | `Git `__ is a version 117 | control software (developed by a rather famous Finn named Linus 118 | Torvalds - he also created Linux!) that is used to track and store 119 | changes in your files (often source code for programs) without losing 120 | the history of past changes. Files in Git are stored in a repository, 121 | which you can simply think of as a directory containing files (or other 122 | directories) related to a single 'project'. Git is widely used by 123 | professionals to keep track of what they’ve done and to collaborate with 124 | other people. 125 | 126 | `GitHub `__ is a web based Git repository hosting 127 | service and social network. It is the largest online storage space of 128 | collaborative works that exists in the world. It is a place where you 129 | can share your code openly to the entire world or alternatively only to 130 | your collaborators working on the same project. GitHub provides a nice 131 | web-interface to your files that is easy to use. It is a nice way for 132 | exploring the codes and documentation or e.g., teaching materials such 133 | as those in our course. 134 | 135 | Both Git and GitHub provide many more features than the ones mentioned 136 | here, but for now we are happy to understand the basic idea of what they 137 | are. 138 | 139 | Voting and polling 140 | ------------------ 141 | 142 | During the lectures we will ask you questions by using an easy-to-use polling-system and show you the results in real-time. 143 | You can access the polling system of our course from `presemo.aalto.fi/sds `__ 144 | 145 | .. note:: 146 | 147 | The polling system is active only **during** the lessons. If you access the website outside the lecture times, you 148 | will most probably see only a white page without any content. 149 | 150 | Slack 151 | ------ 152 | 153 | During the course we will use actively an application called `Slack `__ for discussion and 154 | questions about the lessons and exercises. All enrolled students have received an invite link to the ``Spatial-Analytics-2022`` workspace at the start of the course. 155 | :doc:`If Slack is new to you, check Slack basic usage instructions `. 156 | 157 | 158 | Page summary 159 | ------------ 160 | 161 | Now you should have (at least) a basic idea about the different 162 | components of our course environment and what they mean. You don't need 163 | to understand everything fully at this point as they will become clearer 164 | when we start using the course environment. -------------------------------------------------------------------------------- /source/course-info/installing-miniconda.rst: -------------------------------------------------------------------------------- 1 | Install Python + libraries (optional) 2 | ===================================== 3 | 4 | The purpose of this page is to help you to install Python and different Python packages into your own computer. 5 | Even though it is possible to install Python from the `Python homepage `_, **we highly recommend using** `Miniconda `_ to install Python. 6 | Miniconda comes with Python and a small number of essential packages. 7 | Additional packages can be installed using the package management systems `mamba `_ or `conda `__. 8 | Both offer similar functionality, but we suggest using mamba because it is significantly faster for installing the libraries needed for using Python for GIS. 9 | 10 | Miniconda is a light-weight version of `Anaconda `_ which is an open source distribution of the Python and R programming 11 | languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. In short, 12 | it makes life much easier when installing new tools to your Python. 13 | 14 | In case you already have Anaconda installed on your computer, you can continue using that during the course without a problem. 15 | **If you are new to Python and have not yet installed anything, we recommend you to start by** 16 | `installing Miniconda `__. 17 | 18 | Install Miniconda 19 | ------------------- 20 | 21 | You can find the latest version of Miniconda for different operating systems in the `Miniconda dowload page `__. 22 | Tips and tricks for Windows, macOS and Linux users below. 23 | 24 | Windows 25 | ~~~~~~~~ 26 | 27 | Visit the `Miniconda download page `__ and download the latest 28 | **Miniconda3 Windows 64-bit** installer for Windows. 29 | 30 | .. figure:: img/miniconda-install-windows.png 31 | :width: 600px 32 | :align: center 33 | :alt: Downloading the latest Miniconda for Windows 34 | 35 | Install Miniconda to your computer by double clicking the installer and install it into a directory you want (you might need admin rights). 36 | Install it to **local user** and use the default settings. 37 | 38 | After the installation is completed, test that the package manager ``conda`` works by 39 | `opening an ``Anaconda prompt (miniconda3)`` from the start menu, 40 | and running command ``conda --version``. If the command returns a version number of conda (e.g. ``conda 4.5.9``) everything is working correctly. 41 | 42 | macOS 43 | ~~~~~~~~ 44 | Visit the `Miniconda download page `__ and download the latest 45 | Python installer for macOSX. 46 | 47 | .. figure:: img/miniconda-install-macos.png 48 | :width: 600px 49 | :align: center 50 | :alt: Downloading the latest Miniconda for Mac 51 | 52 | Linux 53 | ~~~~~ 54 | 55 | Install Miniconda 3 and add it to system path using Terminal: 56 | 57 | .. code-block:: 58 | 59 | # Download and install miniconda (first 60 | sudo wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh 61 | sudo bash Miniconda3-latest-Linux-x86_64.sh 62 | 63 | # Add miniconda installation permanently to PATH variable 64 | nano ~/.bashrc 65 | 66 | # Add following line at the end of the file and save (EDIT ACCORDING YOUR INSTALLATION PATH) 67 | export PATH=$PATH:/PATH_TO_MINICONDA/miniconda3/bin:/PATH_TO_MINICONDA/miniconda3/lib/python3.11/site-packages 68 | 69 | Install the course environment 70 | ------------------------------ 71 | 72 | Installing various GIS packages in Python can be sometimes a bit tricky due to various dependencies 73 | between the packages. Sometimes an older version of the package, or even an older Python version might be required for a 74 | specific tool to work. The recommended way to get the installation working smoothly is to **create a dedicated 75 | Python environment** for the selected Python packages (e.g. for the ones used during this course). 76 | A python environment is a separate installation including all required libraries as well as 77 | the Python interpreter. It is a good practice to install all packages (if possible) from the same 78 | conda channel (e.g. ``conda-forge`` which we recommend), and not to mix conda and pip for installations 79 | if not necessary. 80 | 81 | Conda has an excellent documentation about `creating and managing conda environments `__ 82 | where you can check details of the used commands. 83 | 84 | Installing mamba 85 | ~~~~~~~~~~~~~~~~ 86 | 87 | To get started we will install the mamba package manager in our new Miniconda environment. 88 | We can install mamba by **opening an Anaconda prompt (miniconda)** and running the following: 89 | 90 | .. code-block:: bash 91 | 92 | # Install mamba 93 | conda install --override-channels -c conda-forge mamba 'python_abi=*=*cp*' 94 | 95 | If you're curious, you can find more about mamba in the `online user guide `__ which covers most of the basic things, such as installing new packages. 96 | 97 | Installing the packages 98 | ~~~~~~~~~~~~~~~~~~~~~~~ 99 | 100 | After installing `mamba`, the main steps for creating and using a conda environment: 101 | 102 | 1. create the environment from environment.yml file using mamba, 103 | 2. activate the environment 104 | 3. start using the environment (e.g. launch the JupyterLab and start coding, see below) 105 | 106 | We have prepared a ready-made environment file for you (called ``environment_XX.yml``). You can download the file from the links below. Pick the link according your operating system 107 | (on the download page: righ-click the ``Raw`` button -> And press ``Save link as ..``): 108 | 109 | - `Windows `__ 110 | - `MacOS / Linux `__ 111 | 112 | After downloading the environment file, run the following commands on the same folder where you downloaded it. 113 | If you don't know how to navigate between different folders, check these short tutorials for `terminal `_ and `command prompt (Windows) `_. 114 | The commands below work similarly in all operating systems where you have Miniconda (or Anaconda) installed: 115 | 116 | 1. **Create the Python environment** based on the file that you downloaded by using a terminal (or command prompt) 117 | and executing the following command in the directory where you downloaded the `.yml` file (pick the one for your operating system): 118 | 119 | .. code-block:: 120 | 121 | # Windows users, should run this command 122 | mamba env create -f environment_windows.yml 123 | 124 | # Mac / Linux users, should run this command 125 | mamba env create -f environment_unix.yml 126 | 127 | 2. **Activate the environment**: 128 | 129 | .. code-block:: 130 | 131 | conda activate geo 132 | 133 | You should now see the name of the environment at the start of the command line. 134 | 135 | 3. **Test that the installation works** by running follow command in terminal/command prompt: 136 | 137 | .. code-block:: 138 | 139 | python -c "import r5py; import geopandas; import fiona" 140 | 141 | In case the command runs and does not return any errors, everything works! 142 | If not, i) ensure that you have activated the environment, (step 2 above), ii) ensure that all packages installed properly (step 1). 143 | 144 | 4. **Launch JupyterLab IDE** 145 | 146 | After you have installed all required packages, you can start working in a local Jupyter Lab environment that is 147 | linked to your ``geo`` conda environment by launching jupyter lab on the command line. 148 | 149 | It's a good idea to first navigate to the folder where your Jupyter Notebook -files are located before launching Jupyter Lab. 150 | 151 | .. code-block:: 152 | 153 | jupyter lab 154 | 155 | Note, Jupyter Lab will probably prompt you to "Build" the installation in order to get the git-plugin to show. 156 | 157 | Note about OpenJDK Java Development Kit 158 | --------------------------------------- 159 | 160 | ``r5py`` library relies on Java JDK engine. Hence to get the ``r5py`` working, you need to have OpenJDK to your computer. 161 | In case you have installed the Python environment as instructed above, 162 | you don't need to do anything as the Java JDK came with the Python environment! 163 | 164 | 165 | General guide for installing packages with Mamba/Conda 166 | ------------------------------------------------------ 167 | 168 | Conda has an excellent `online user guide `__ which covers most of the basic things, 169 | such as installing new packages. You can replace all `conda` commands listed in the user guide with `mamba` to be able to install the packages much faster. 170 | 171 | Mamba install 172 | ~~~~~~~~~~~~~ 173 | 174 | You can install new packages using the `mamba install `__ 175 | command. The basic syntax for installing packages is ``mamba install package-name``. 176 | In addition, we also want to specify the **conda channel** from where the package is downloaded using the parameter `-c`. 177 | 178 | **Installing Pandas package from the conda-forge channel:** 179 | 180 | .. code-block:: 181 | 182 | mamba install -c conda-forge pandas 183 | 184 | Once you run this command, you will see also other packages getting installed and/or updated as conda checks for dependencies of the installed package. 185 | Read more about package installations in the `conda documentation `__ 186 | It's a good idea to search for installation instructions for each package online. 187 | 188 | You can **install other useful packages in a similar way:** 189 | 190 | .. code-block:: 191 | 192 | mamba install -c conda-forge matplotlib 193 | mamba install -c conda-forge hvplot 194 | mamba install -c conda-forge geopandas 195 | 196 | .. admonition:: Conda channels 197 | 198 | `Conda channels `__ are remote locations where packages are stored. 199 | During this course (and in general when installing packages for scientific computing and GIS analysis) we download most packages from the `conda-forge `__ channel. 200 | 201 | 202 | .. admonition:: Conflicting packages 203 | 204 | A good rule of thumb is to **always install packages from the same channel** (for this course, we prefer the `conda-forge` channel). 205 | In case you encounter an error message when installing new packages, you might want to first check the versions and channels of existing 206 | packages using the `conda list` command before trying again. 207 | 208 | Installing JupyterLab 209 | ~~~~~~~~~~~~~~~~~~~~~~~ 210 | 211 | We use `JupyterLab `__ as the main programming environment. 212 | JupyterLab also comes with the environment that we provided for you above. 213 | 214 | In case you are interested to use it in other environments, you can install it like any other packages using the conda install command. 215 | For other options and more information, take a look at the `JupyterLab installation instructions `__. 216 | 217 | **Install JupyterLab from the conda-forge channel:** 218 | 219 | .. code-block:: 220 | 221 | mamba install -c conda-forge jupyterlab 222 | 223 | After installation is completed, **you can start a JupyterLab instance** by running this command (notice the space between the words!): 224 | 225 | .. code-block:: 226 | 227 | jupyter lab 228 | 229 | After running the command, JupyterLab should open up automatically in a browser window. Notice that the JupyterLab will always open in a directory 230 | from where you launched it in the terminal / command prompt. 231 | 232 | -------------------------------------------------------------------------------- /source/lessons/L1/git-basics.rst: -------------------------------------------------------------------------------- 1 | Tutorial 1.1 - Meet Git 2 | ======================= 3 | 4 | This tutorial covers the very basics of version control using Git and GitHub. After this lesson you should be able to do these steps in JupyterLab using git and the JupyterLab git-plugin: 5 | 6 | 1. `Clone a repository from GitHub`_ 7 | 2. `Add changes`_ 8 | 3. `Commit changes`_ 9 | 4. `Push changes to GitHub`_ 10 | 11 | These steps can be completed either using the `JupyterLab git plugin`_ (we recommend this option for beginners) or using 12 | `Git from the command line`_. 13 | 14 | .. admonition:: Attribution 15 | 16 | These materials have been adapted from `Geo-Python course `__, `GitHub Education Campus Advisors -resources `_, and `Git documentation `__. 17 | 18 | Key concepts 19 | ------------- 20 | 21 | We use Git to record changes to our files over time, and for communicating between the local repository on our computer and the remote repository on GitHub. 22 | A "repository", or a "Git project", or a "repo", is a location for storing files. A repo contains all the files and folders associated with a project and the revision history of each entity. 23 | In general, it is recommended that each project, library or discrete piece of software should have it's own repository. 24 | In this course each exercise has it's own repository on GitHub. 25 | 26 | During this course, we often start by cloning an existing repository from GitHub 27 | to our own computer using ``git clone``. Using ``git pull`` we can fetch (and merge) new changes from GitHub, 28 | and ``git push`` publishes our local changes to GitHub. Read more about sharing and updating 29 | Git projects `in here `__. 30 | 31 | .. figure:: img/pull-push-illustration.png 32 | 33 | Update your Git project using the pull and push commands. Always pull before you push (especially when working in a shared project)! 34 | 35 | Version control history consists of snapshots of all the files in our project. 36 | In order record changes to our files, we first add changes to a so called staging area (using ``git add``). The idea is, that you can have a (sometimes messy) working directory, and by using ``git add`` you tell 37 | Git which files to include in the next committed snapshot. Finally, ``git commit`` records a permanent snapshot of the staged changes. Read more about basic snapshotting `in here `__. 38 | 39 | .. figure:: img/Git_illustration.png 40 | 41 | Version control steps using Git (adapted from `Git documentation `__). 42 | 43 | 44 | Preparations 45 | ------------ 46 | 47 | Create a Personal Access Token 48 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 | 50 | Before we start cloning our repository from GitHub, we need to create a Personal Access Token for us to be able to interact with GitHub. We will go through the basic setup here, you can also find more detailed instructions in the `GitHub documentation `_. 51 | 52 | 1. If you have not already verified your email address, make sure to do so in your GitHub-settings (`GitHub email verification `_). On GitHub, go into your settings. 53 | 54 | .. image:: https://docs.github.com/assets/images/help/settings/userbar-account-settings.png 55 | :width: 200 56 | 57 | 2. Go to the **developer settings** in the left sidebar. 58 | 59 | .. image:: https://docs.github.com/assets/images/help/settings/developer-settings.png 60 | :width: 200 61 | 62 | 3. Then click on **Personal access tokens**. 63 | 64 | .. image:: https://docs.github.com/assets/images/help/settings/personal_access_tokens_tab.png 65 | :width: 200 66 | 67 | 4. Click **Tokens (classic)**. 68 | 69 | 5. Then we will create the token by clicking on **Generate new token (classic)**. 70 | 71 | .. image:: https://docs.github.com/assets/images/help/settings/generate_new_token.png 72 | :width: 500 73 | 74 | 6. Start by giving your token a name. 75 | 76 | .. image:: img/token_name.png 77 | :width: 500 78 | 79 | 7. We will then give the token a expiration date. You can choose the duration you prefer, here we set it to the end of the year. 80 | 81 | .. image:: img/token_expiration.png 82 | :width: 300 83 | 84 | 8. Next, we need to set the permissions, or scopes, that our token is granted. We are going to need it to be able to access and change our repositories. For that, we can select the check marks **repo**, **admin:repo_hook**, and **delete_repo**. 85 | 86 | .. image:: img/token_scopes.png 87 | :width: 500 88 | 89 | 9. Then we can click the **Generate token** button to create and see our token. 90 | 91 | .. image:: https://docs.github.com/assets/images/help/settings/generate_token.png 92 | :width: 350 93 | 94 | 10. We are then presented with our Personal access token. Do following: 95 | - Click the copy button to copy it to your clipboard and then paste it into your text file in the JupyterLab session. 96 | 97 | .. image:: https://docs.github.com/assets/images/help/settings/personal_access_tokens.png 98 | :width: 500 99 | 100 | Open a text document and copy and paste your Personal access token in your text file, because for now we are going to use it like this, and we will later see how we can cache it so that we don't need to copy and paste it every time we need it. If your access token is lost, then you can just follow the steps above again to create a new one. 101 | 102 | Now the first thing we need is the URL of your exercise repository from GitHub. **Go to** https://github.com/Spatial-Analytics-2023/ **and navigate to your personal Exercise-1 repository** (e.g. `exercise-1-HTenkanen`) 103 | 104 | On GitHub, find the button **Code** and copy the url under *Clone with HTTPS*. 105 | 106 | The URL looks something like this: 107 | https://github.com/Spatial-Analytics-2023/exercise-1-HTenkanen.git but with your own username. 108 | 109 | .. figure:: img/git-copy-url.png 110 | 111 | 112 | JupyterLab git plugin 113 | ------------------------ 114 | 115 | Clone a repository from GitHub 116 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117 | 118 | During this course, we will most often start working with the exercises using an existing repository from GitHub. 119 | In order to get a copy of the exercise repository on our own computer (or the cloud computer), we need to ``clone`` it. 120 | 121 | Navigate to the **exercises** folder in JupyterLab and activate the git-plugin. The plugin will tell you that **exercises** 122 | is not a Git repository and gives you some options. 123 | 124 | In our case, we want to **Clone a Repository**: 125 | 126 | .. figure:: img/git-plugin-start-cloning.png 127 | 128 | Go ahead and paste your exercise repository URL into the pop-up window: 129 | 130 | .. figure:: img/git-plugin-clone.png 131 | 132 | 133 | On the command line this action is equivalent to the ``git clone`` command. 134 | 135 | .. note:: 136 | 137 | **Pay attention to which folder you are in!** Git will create a new folder under the folder you 138 | are located in when cloning a repo. 139 | 140 | 141 | Credentials 142 | ~~~~~~~~~~~ 143 | 144 | Git needs to know who you are in order to give you access to remote repositories. 145 | 146 | **Insert your GitHub username and personall access token**: 147 | 148 | .. figure:: img/git-plugin-credentials.png 149 | 150 | Now you should see a new folder in JupyterLab that is identical to the repository on GitHub. 151 | 152 | On the command line, credentials can be managed using ``git config``. 153 | 154 | 155 | Git status 156 | ~~~~~~~~~~~~~~ 157 | 158 | Navigate to the new folder in JupyterLab and activate the Git plugin. You should now see some basic info about your repository: 159 | 160 | .. figure:: img/git-plugin-status1.png 161 | 162 | On the command line ``git status`` shows the status of the repository. 163 | 164 | 165 | Add changes 166 | ~~~~~~~~~~~~~~ 167 | 168 | Let's start making changes in the repository! Open the ``README.md`` -file and make some edits. For example, add some text at the end of the file: 169 | 170 | .. figure:: img/edit-readme.png 171 | 172 | Edit a file in JupyterLab 173 | 174 | After saving your changes, check the status of the repository. You should see ``README.md`` listed under **Changed** files: 175 | 176 | .. figure:: img/git-plugin-changed.png 177 | 178 | Changes visible in the Git plugin 179 | 180 | These changes are not yet "staged for commit", which means that we need to add them first to the staging area if we want to make a permanent snapshot of these changes. 181 | 182 | .. figure:: img/git-plugin-stage-changes.png 183 | 184 | After adding the changes, you should see the changed file under **Staged** in the Git plugin. 185 | 186 | Note that you can also **unstage** and **discard changes** using the plugin. 187 | For now, we are happy with the changes made, and are ready to commit them. 188 | 189 | On the command line, ``git add`` is the command for adding changes to the staging area. 190 | 191 | Commit changes 192 | ~~~~~~~~~~~~~~ 193 | 194 | Once the changed files are in the staging area, we can create a permanent snapshot by committing the changes. 195 | Always remember to write an informative commit message to accompany your changes: 196 | 197 | .. figure:: img/git-plugin-commit.png 198 | 199 | Once you hit the commit-button, the plugin will most likely ask your name and email. 200 | 201 | .. figure:: img/git-commit-credentials.png 202 | 203 | You can insert the same details you used when signing up to GitHub. 204 | 205 | .. figure:: img/git-plugin-commit-ok.png 206 | 207 | Once the commit succeeds, you should see the latest set of changes under the History-tab in the Git-plugin: 208 | 209 | .. figure:: img/git-plugin-history1.png 210 | 211 | *Note: You might also see some previous changes by the course instructors. These changes have been generated automatically and you can ignore them.* 212 | 213 | On the command line the syntax for committing is ``git commit -m "commit message"``. After committing, it is good practice to check the repository status using ``git status``. 214 | 215 | .. note:: 216 | 217 | We can **tell Git to remember our GitHub username and access token** to avoid typing them in all the time. Open up a Terminal window and type in this command: 218 | 219 | ``git config --global credential.helper 'store --file /home/jovyan/work/.git-credentials'`` 220 | 221 | Then change the folder you are in by typing (with your username): 222 | 223 | ``cd exercise/excercise-1-HTenkanen/`` 224 | 225 | We then pull from our GitHub repository: 226 | 227 | ``git pull`` 228 | 229 | Type your username, press enter, and go to the text file with your access token, copy it, and paste into your terminal with **ctrl+v** and press enter. Then your username and access token should be stored and you can pull and push to and from GitHub without having to type your access token every time. 230 | 231 | Push changes to GitHub 232 | ~~~~~~~~~~~~~~~~~~~~~~ 233 | Next, we want to synchronize our local changes with the remote repository on GitHub. 234 | 235 | .. figure:: img/git-plugin-pull-push-buttons.png 236 | 237 | Buttons for Pulling and Pushing changes between the local and remote repositories 238 | 239 | First, it's good to use :code:`git pull` (button with arrow down) to double check for remote changes before contributing your own changes. 240 | Unless you cached your credentials, Git will once more prompt you for username and password at this point. 241 | 242 | .. figure:: img/git-plugin-pull-ok.png 243 | 244 | In this case, the repository is probably up-to-date and no new changes are downloaded. However, it is good practice to always use Git Pull before publishing your local changes in case someone made changes in the remote repository in the meanwhile! 245 | 246 | Now we are ready to push the local changes to GitHub using :code:`git push` (button with arrow up): 247 | 248 | .. figure:: img/git-plugin-push-ok.png 249 | 250 | Now you should see the updates in GitHub! Go and have a look at your personal repository in https://github.com/Spatial-Analytics-2022/ . 251 | 252 | On the command line, ``git pull`` fetches and merges changes from the remote repository, and ``git pull`` publishes local changes. 253 | 254 | That's all you need to know about Git for now :) 255 | 256 | 257 | Git from the command line 258 | -------------------------- 259 | There are many different ways of using Git, and you might want to try out using Git from the command line at some point. 260 | 261 | Terminal 262 | ~~~~~~~~~~ 263 | 264 | .. note:: 265 | You will need to know a couple of basic command line commands in order to use Git from the command line. Code Academy's `list of command line commands `__ provides 266 | a good overview of commonly used commands for navigating trough files on the command line. For using Git on the command line, you should at least be familiar with these commands: 267 | 268 | - ``ls`` - list contents of the current directory 269 | - ``ls -a`` - list contents of the current directory including hidden files 270 | - ``cd`` - change directory. For example, ``cd exercises`` 271 | - ``cd ..`` - move one directory up 272 | 273 | 274 | **Start a new Terminal session in JupyterLab** using the icon on the Launcher, or from *File* > *New* > *Terminal*. 275 | 276 | .. figure:: img/terminal-icon.png 277 | 278 | **Check if you have git installed** by typing :code:`git --version` in the terminal window: 279 | 280 | .. code-block:: bash 281 | 282 | git --version 283 | 284 | Anything above version 2 is just fine. 285 | 286 | .. note:: 287 | 288 | You can paste text on the terminal using :code:`Ctrl + V` or :code:`Shift + Right Click --> paste` 289 | 290 | Configuring Git credentials 291 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 292 | 293 | Configure Git to remember your identity using the ``git config`` tools. You (hopefully) only need to do this once 294 | if working on your own computer, or on a cloud computer with persistent storage on CSC notebooks. 295 | 296 | .. code-block:: bash 297 | 298 | git config --global user.name "[firstname lastname]" 299 | git config --global user.email "[email@example.com]" 300 | 301 | 302 | Basic commands 303 | ~~~~~~~~~~~~~~ 304 | The basic workflow of cloning a repository, adding changes to the staging area, committing and pushing the changes can be completed using these command line commands: 305 | 306 | - ``git clone [url]`` - retrieve a repository from a remote location (often from GitHub) 307 | - ``git status``- review the status of your repository (use this command often!) 308 | - ``git add [file]`` - add files to the next commit (add files to the staging area) 309 | - ``git commit -m "[descriptive message]"`` - commit staged files as a new snapshot 310 | - ``git pull`` - bring the local branch up to date (fetch and merge changes from the remote) 311 | - ``git push`` - transmit local branch commits to the remote repository 312 | 313 | .. note:: 314 | 315 | Remember to use ``git status`` often to check the status of our repository. 316 | 317 | .. admonition:: Other useful Git commands 318 | 319 | Check out other commonly used git commands from `the GIT CHEAT SHEET `__ 320 | 321 | 322 | .. admonition:: Remote repository 323 | 324 | Remote repositories are versions of your project that are hosted on a network location (such as GitHub). 325 | When we cloned the repository using ``git clone``, Git automatically started tracking the remote repository from where we cloned the project. 326 | You can use the ``git remote -v`` command to double check which remote your repository is tracking. 327 | 328 | **A common mistake during this course is that you have accidentally cloned the template repository in stead of your own/your teams repository.** 329 | 330 | You can read more about managing remotes `in here `__. 331 | 332 | 333 | .. admonition:: Master branch 334 | 335 | **Branches and branching** are powerful features in Git that allow maintaining parallel versions of the same project. 336 | During this course you don't need to worry too much about branches. However, it is good to understand that **we are working on the master branch of our repository**. For example, when using the ``git push`` command, 337 | the full syntax is ``git push origin master`` which means that we are pushing the changes to the master branch of the remote repository called origin. Read more about git branches `in here `__. 338 | 339 | 340 | Resolving conflicts 341 | ------------------- 342 | 343 | It is possible that you will encounter a **merge conflict** at some point of this course. A merge conflict might happen if two users have edited the same content, or if you 344 | yourself have edited the same content both on GitHub and locally without properly synchronizing the changes. In short, Git will tell you if it is not able to sort out the version history of your project by announcing a merge conflict. 345 | 346 | 347 | We won't cover how to solve merge conflicts in detail during the lessons. You can read more about `how to resolve merge conflicts from the Git documentation `__. 348 | **The best thing to do to avoid merge conflicts is to always Pull before you Push new changes.** 349 | In case you encounter a merge conflict, don't panic! Read carefully the message related to the merge conflict, and try searching for a solution online and ask for help on Slack. 350 | 351 | Remember that you can always download your files on your own computer, and upload them manually to GitHub like we did in Exercise 1! 352 | 353 | .. figure:: https://imgs.xkcd.com/comics/git.png 354 | :alt: https://xkcd.com/1597/ 355 | 356 | Source: https://xkcd.com/1597/ 357 | 358 | 359 | 360 | 361 | --------------------------------------------------------------------------------