{"id":184021,"name":"Geocomputation with Python","description":"An open source book and online resource for getting started in this space with Python.","url":"https://github.com/geocompx/geocompy","last_synced_at":"2026-04-10T16:03:15.644Z","repository":{"id":39993681,"uuid":"447558863","full_name":"geocompx/geocompy","owner":"geocompx","description":"Geocomputation with Python: an open source book","archived":false,"fork":false,"pushed_at":"2025-09-06T22:06:44.000Z","size":375458,"stargazers_count":420,"open_issues_count":4,"forks_count":90,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-10-28T07:37:05.108Z","etag":null,"topics":["book","geo","geocomputation","geocompx","geopython","python","spatial"],"latest_commit_sha":null,"homepage":"https://py.geocompx.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geocompx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["geocompx"]}},"created_at":"2022-01-13T10:35:45.000Z","updated_at":"2025-10-26T23:45:02.000Z","dependencies_parsed_at":"2025-03-09T12:33:13.846Z","dependency_job_id":"e52ed9b8-9048-461b-97a9-e6650837708c","html_url":"https://github.com/geocompx/geocompy","commit_stats":{"total_commits":1149,"total_committers":16,"mean_commits":71.8125,"dds":0.6779808529155787,"last_synced_commit":"4f82c185f1e370c3d99e8ea17ad81923b0ddddcf"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/geocompx/geocompy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geocompx","download_url":"https://codeload.github.com/geocompx/geocompy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425537,"owners_count":26499026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"geocompx","name":"geocompx","uuid":"108929306","kind":"organization","description":"The geocompx project is a community-driven effort to provide resources for learning and teaching about geocomputation in multiple programming languages.","email":null,"website":"https://geocompx.org/","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/108929306?v=4","repositories_count":16,"last_synced_at":"2025-12-12T13:23:41.286Z","metadata":{"has_sponsors_listing":true,"funding":{"github":["geocompx"]}},"html_url":"https://github.com/geocompx","funding_links":["https://github.com/sponsors/geocompx"],"total_stars":2311,"followers":156,"following":0,"created_at":"2023-02-28T01:31:22.933Z","updated_at":"2025-12-12T13:23:41.286Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geocompx","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geocompx/repositories"},"packages":[],"commits":{"id":1471000,"full_name":"geocompx/geocompy","default_branch":"main","total_commits":1270,"total_committers":16,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":79.375,"dds":0.48425196850393704,"past_year_total_commits":17,"past_year_total_committers":4,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":4.25,"past_year_dds":0.5294117647058824,"last_synced_at":"2025-10-22T23:59:36.338Z","last_synced_commit":"13806bbec09d5ae83a5ad9eafac158b98fcdfe7c","created_at":"2024-02-11T22:17:36.312Z","updated_at":"2025-10-22T23:58:37.381Z","committers":[{"name":"Michael Dorman","email":"dorman@post.bgu.ac.il","login":"michaeldorman","count":655},{"name":"Robin Lovelace","email":"rob00x@gmail.com","login":"Robinlovelace","count":342},{"name":"Jakub Nowosad","email":"tupiszakaczki@gmail.com","login":"Nowosad","count":180},{"name":"github-actions","email":"github-actions@github.com","login":"invalid-email-address","count":51},{"name":"anitagraser","email":"anitagraser@gmx.at","login":"anitagraser","count":22},{"name":"Will Deakin","email":"will.deakin@crinstitute.org.uk","login":"anisotropi4","count":10},{"name":"robinlovelace-ate","email":"robin.lovelace@activetravelengland.gov.uk","login":"robinlovelace-ate","count":1},{"name":"Steve Kerr","email":"52094088+smkerr","login":"smkerr","count":1},{"name":"Sean Gillies","email":"sean.gillies@gmail.com","login":"sgillies","count":1},{"name":"Jt Miclat","email":"jtmiclat@gmail.com","login":"jtmiclat","count":1},{"name":"JoshCole-DTA","email":"118358844+JoshCole-DTA","login":"JoshCole-DTA","count":1},{"name":"Jakidxav","email":"37963153+Jakidxav","login":"Jakidxav","count":1},{"name":"Eduardo Lacerda","email":"eduardolacerdageo@gmail.com","login":"sacridini","count":1},{"name":"Anshul Singhvi","email":"anshulsinghvi@gmail.com","login":"asinghvi17","count":1},{"name":"Robin Lovelace","email":"robinadmin@UOL-LAP-300496.ds.leeds.ac.uk","login":null,"count":1},{"name":"Robin Lovelace","email":"georl@leeds.ac.uk","login":null,"count":1}],"past_year_committers":[{"name":"Jakub Nowosad","email":"tupiszakaczki@gmail.com","login":"Nowosad","count":8},{"name":"Robin Lovelace","email":"Robinlovelace","login":"Robinlovelace","count":6},{"name":"Michael Dorman","email":"dorman@bgu.ac.il","login":"michaeldorman","count":2},{"name":"Eduardo Lacerda","email":"eduardolacerdageo@gmail.com","login":"sacridini","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2025-10-26T00:00:38.633Z","repositories_count":6088098,"commits_count":922374706,"contributors_count":35991456,"owners_count":1109173,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"geocompx/geocompy","html_url":"https://github.com/geocompx/geocompy","last_synced_at":"2025-09-09T07:22:15.501Z","status":"active","issues_count":88,"pull_requests_count":81,"avg_time_to_close_issue":12682142.265822785,"avg_time_to_close_pull_request":579548.6623376623,"issues_closed_count":79,"pull_requests_closed_count":77,"pull_request_authors_count":12,"issue_authors_count":15,"avg_comments_per_issue":4.25,"avg_comments_per_pull_request":1.3580246913580247,"merged_pull_requests_count":72,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":18,"past_year_pull_requests_count":26,"past_year_avg_time_to_close_issue":392717.14285714284,"past_year_avg_time_to_close_pull_request":88038.5652173913,"past_year_issues_closed_count":14,"past_year_pull_requests_closed_count":23,"past_year_pull_request_authors_count":6,"past_year_issue_authors_count":9,"past_year_avg_comments_per_issue":0.8888888888888888,"past_year_avg_comments_per_pull_request":0.5769230769230769,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":22,"created_at":"2024-02-11T22:18:06.552Z","updated_at":"2025-09-09T07:22:15.502Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocompx%2Fgeocompy/issues","issue_labels_count":{"enhancement":6,"waiting":3,"question":3,"help wanted":2,"future ideas":1,"documentation":1},"pull_request_labels_count":{},"issue_author_associations_count":{"CONTRIBUTOR":36,"COLLABORATOR":29,"MEMBER":13,"NONE":10},"pull_request_author_associations_count":{"COLLABORATOR":37,"CONTRIBUTOR":36,"MEMBER":4,"NONE":4},"issue_authors":{"Robinlovelace":35,"michaeldorman":21,"Nowosad":13,"anitagraser":8,"lwasser":1,"anisotropi4":1,"zehuiyin":1,"Rapsodia86":1,"chrisjkuch":1,"ausdpy":1,"martinfleis":1,"felixcremer":1,"shriv":1,"benz0li":1,"jeromemaiquez":1},"pull_request_authors":{"michaeldorman":33,"Robinlovelace":27,"anitagraser":4,"Nowosad":4,"anisotropi4":2,"asinghvi17":2,"smkerr":2,"Jakidxav":2,"sacridini":2,"JoshCole-DTA":1,"sgillies":1,"jtmiclat":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2025-10-31T00:00:39.152Z","repositories_count":11270521,"issues_count":34994096,"pull_requests_count":113577999,"authors_count":11042245,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{"enhancement":1,"question":1},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"CONTRIBUTOR":3,"NONE":3},"past_year_pull_request_author_associations_count":{"CONTRIBUTOR":4},"past_year_issue_authors":{"Robinlovelace":3,"ausdpy":1,"Rapsodia86":1,"zehuiyin":1},"past_year_pull_request_authors":{"Robinlovelace":4},"maintainers":[{"login":"michaeldorman","count":54,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/michaeldorman"},{"login":"Nowosad","count":17,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/Nowosad"},{"login":"anitagraser","count":12,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/anitagraser"}],"active_maintainers":[]},"events":{"total":{"CreateEvent":2,"ReleaseEvent":1,"IssuesEvent":11,"WatchEvent":112,"DeleteEvent":3,"IssueCommentEvent":20,"PushEvent":28,"PullRequestReviewEvent":4,"PullRequestReviewCommentEvent":1,"PullRequestEvent":4,"ForkEvent":34},"last_year":{"CreateEvent":2,"ReleaseEvent":1,"IssuesEvent":11,"WatchEvent":102,"DeleteEvent":3,"IssueCommentEvent":16,"PushEvent":27,"PullRequestReviewEvent":4,"PullRequestReviewCommentEvent":1,"PullRequestEvent":3,"ForkEvent":31}},"keywords":["book","geo","geocomputation","geocompx","geopython","python","spatial"],"dependencies":[{"ecosystem":"actions","filepath":".github/workflows/convert.yml","sha":null,"kind":"manifest","created_at":"2023-09-22T13:23:00.036Z","updated_at":"2023-09-22T13:23:00.036Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/convert.yml","dependencies":[{"id":13874907894,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/main.yaml","sha":null,"kind":"manifest","created_at":"2023-09-22T13:23:00.146Z","updated_at":"2023-09-22T13:23:00.146Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/main.yaml","dependencies":[{"id":13874907897,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13874907898,"package_name":"peaceiris/actions-gh-pages","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/netlify.yml","sha":null,"kind":"manifest","created_at":"2023-09-22T13:23:00.275Z","updated_at":"2023-09-22T13:23:00.275Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/netlify.yml","dependencies":[{"id":13874908088,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13874908089,"package_name":"nwtgck/actions-netlify","ecosystem":"actions","requirements":"v1.2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/pr.yml","sha":null,"kind":"manifest","created_at":"2023-09-22T13:23:00.450Z","updated_at":"2023-09-22T13:23:00.450Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/pr.yml","dependencies":[{"id":13874908430,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2023-09-22T13:23:02.000Z","updated_at":"2023-09-22T13:23:02.000Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/requirements.txt","dependencies":[{"id":13874910292,"package_name":"folium","ecosystem":"pypi","requirements":"==0.14.0","direct":true,"kind":"runtime","optional":false},{"id":13874910293,"package_name":"geopandas","ecosystem":"pypi","requirements":"==0.12.2","direct":true,"kind":"runtime","optional":false},{"id":13874910294,"package_name":"jupyter","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13874910295,"package_name":"mapclassify","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13874910296,"package_name":"matplotlib","ecosystem":"pypi","requirements":"==3.6.2","direct":true,"kind":"runtime","optional":false},{"id":13874910297,"package_name":"numpy","ecosystem":"pypi","requirements":"==1.24.0","direct":true,"kind":"runtime","optional":false},{"id":13874910298,"package_name":"pandas","ecosystem":"pypi","requirements":"==1.5.2","direct":true,"kind":"runtime","optional":false},{"id":13874910299,"package_name":"pyproj","ecosystem":"pypi","requirements":"==3.4.1","direct":true,"kind":"runtime","optional":false},{"id":13874910300,"package_name":"PyYAML","ecosystem":"pypi","requirements":"==6.0","direct":true,"kind":"runtime","optional":false},{"id":13874910301,"package_name":"rasterio","ecosystem":"pypi","requirements":"==1.3.4","direct":true,"kind":"runtime","optional":false},{"id":13874910302,"package_name":"rasterstats","ecosystem":"pypi","requirements":"==0.17.0","direct":true,"kind":"runtime","optional":false},{"id":13874910303,"package_name":"requests","ecosystem":"pypi","requirements":"==2.28.1","direct":true,"kind":"runtime","optional":false},{"id":13874910304,"package_name":"scipy","ecosystem":"pypi","requirements":"==1.9.3","direct":true,"kind":"runtime","optional":false},{"id":13874910305,"package_name":"shapely","ecosystem":"pypi","requirements":"==2.0.0","direct":true,"kind":"runtime","optional":false},{"id":13874910306,"package_name":"topojson","ecosystem":"pypi","requirements":"==1.5","direct":true,"kind":"runtime","optional":false},{"id":13874910307,"package_name":"xarray","ecosystem":"pypi","requirements":"==2022.12.0","direct":true,"kind":"runtime","optional":false},{"id":13874910308,"package_name":"Cartopy","ecosystem":"pypi","requirements":"==0.22.0","direct":true,"kind":"runtime","optional":false},{"id":13874910309,"package_name":"osmnx","ecosystem":"pypi","requirements":"==1.6.0","direct":true,"kind":"runtime","optional":false},{"id":13874910310,"package_name":"contextily","ecosystem":"pypi","requirements":"==1.3.0","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/upstream.yml","sha":null,"kind":"manifest","created_at":"2023-12-16T00:06:36.877Z","updated_at":"2023-12-16T00:06:36.877Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/upstream.yml","dependencies":[{"id":15118935519,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/prep-book-package.yml","sha":null,"kind":"manifest","created_at":"2024-01-11T11:28:46.879Z","updated_at":"2024-01-11T11:28:46.879Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/.github/workflows/prep-book-package.yml","dependencies":[{"id":15552557192,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"conda","filepath":"environment.yml","sha":null,"kind":"manifest","created_at":"2025-03-09T12:33:12.462Z","updated_at":"2025-03-09T12:33:12.462Z","repository_link":"https://github.com/geocompx/geocompy/blob/main/environment.yml","dependencies":[{"id":22191957174,"package_name":"bokeh","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957180,"package_name":"branca","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957181,"package_name":"cartopy","ecosystem":"conda","requirements":"\u003e=0.22","direct":true,"kind":"runtime","optional":false},{"id":22191957194,"package_name":"contextily","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957200,"package_name":"cython","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957227,"package_name":"fiona","ecosystem":"conda","requirements":"\u003e=1.9","direct":true,"kind":"runtime","optional":false},{"id":22191957228,"package_name":"folium","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957235,"package_name":"geopandas","ecosystem":"conda","requirements":"\u003e=1.0.0","direct":true,"kind":"runtime","optional":false},{"id":22191957236,"package_name":"geopy","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957247,"package_name":"geoviews","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957248,"package_name":"hvplot","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957253,"package_name":"jupyter","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957254,"package_name":"jupyterlab","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957255,"package_name":"mapclassify","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957256,"package_name":"matplotlib","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957257,"package_name":"nbformat","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957259,"package_name":"numpy","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957260,"package_name":"osmnx","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957261,"package_name":"pandas","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957262,"package_name":"proj","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957264,"package_name":"pyogrio","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957269,"package_name":"quarto","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957281,"package_name":"rasterio","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957282,"package_name":"rasterstats","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957283,"package_name":"richdem","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957287,"package_name":"shapely","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false},{"id":22191957288,"package_name":"topojson","ecosystem":"conda","requirements":"","direct":true,"kind":"runtime","optional":false}]}],"score":8.822322177471738,"created_at":"2024-02-04T00:08:15.017Z","updated_at":"2026-04-10T16:03:15.646Z","avatar_url":"https://github.com/geocompx.png","language":"Python","category":"Sustainable Development","sub_category":"Education","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# geocompy\n\n\n[![Render](https://github.com/geocompx/geocompy/actions/workflows/main.yaml/badge.svg)](https://github.com/geocompx/geocompy/actions/workflows/main.yaml)\n\u003c!-- [![Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geocompr/py/main?urlpath=lab/tree/ipynb) --\u003e\n[![Open in GitHub\nCodespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=447558863)\n\nGeocomputation with Python is an open source book project that will be\npublished as a physical book. We are developing it in the open and\npublishing an up-to-date online version at \u003chttps://py.geocompx.org\u003e.\n\n## Dependencies\n\nRunning the code that is part of Geocomputation with Python (geocompy\nfor short) requires the following dependencies to be installed:\n\n1.  Python dependencies, which can be installed with\n    [`pip`](https://pypi.org/project/pip/), a package manager or a\n    [Docker](https://docs.docker.com/get-docker/) container (see below)\n2.  An integrated development environment (IDE) such as [VS\n    Code](https://code.visualstudio.com/) (running locally or on\n    [Codespaces](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=447558863)/other\n    host) or [Jupyter\n    Notebook](https://github.com/geocompx/geocompy/tree/main/ipynb) for\n    running and exploring the Python code interactively\n3.  [Quarto](https://quarto.org/docs/get-started/), which is used to\n    generate the book\n\n\u003c!-- ## Reproduce the book in Binder\n\u0026#10;To reproduce this book you can simply click on the link below to see the code running in your web browser (see details of how this works at [mybinder.org](https://mybinder.org/)):\n\u0026#10;[![Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geocompx/geocompy/readme-clean?urlpath=lab/tree/ipynb)\n --\u003e\n\n## Reproduce the book with GitHub Codespaces\n\nGitHub [Codespaces](https://github.com/features/codespaces) minimise\nset-up costs by providing access to a modern IDE (VS Code) plus\ndependencies in your browser. This can save time on package\ninstallation. Codespaces allow you to make and commit changes, providing\na way to test changes and contribute fixes in an instant.\n\nTo run the book in Codespaces, click on the link below.\n\n[![Open in GitHub\nCodespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=447558863)\n\nYou should [see](https://github.com/geocompx/geocompy/issues/114)\nsomething like this, the result of running all the code in the book by\nopening the terminal (e.g. with the command Ctrl+J) and entering the\nfollowing command:\n\n    quarto preview\n\n![](https://user-images.githubusercontent.com/1825120/202933280-e313c076-f188-4efd-9de1-5625eb169045.png)\n\n## Reproduce the book with Docker (devcontainer)\n\nIf you can install [Docker](https://docs.docker.com/desktop/install/)\nthis is likely to be the quickest way to reproduce the contents of this\nbook. To do this from within VS Code:\n\n1.  Install Microsoft’s official [Dev\n    Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)\n    extension\n2.  Open the folder containing the repo in VS Code and click on the\n    ‘Reopen in container’ button that should appear, as shown below (you\n    need to have Docker installed on your computer for this to work)\n\n![](https://user-images.githubusercontent.com/1825120/202933928-eb6de086-f9a5-43cd-9932-e6ec84746d45.png)\n\nEdit the code in the containerised instance of VS Code that will appear\n🎉\n\nSee details below for other ways to get the dependencies and reproduce\nthe book.\n\n## Install dependencies with pip\n\n\u003cdetails\u003e\n\nUse `pip` to install the dependencies as follows, after cloning the repo\nand opening a terminal in the root folder of the repo.\n\nFirst we’ll set-up a virtual environment to install the dependencies in:\n\n``` sh\n# Create a virtual environment called geocompy\npython -m venv geocompy\n# Activate the virtual environment\nsource geocompy/bin/activate\n```\n\nThen install the dependencies (with the optional\n[`python -m`](https://fosstodon.org/deck/@hugovk@mastodon.social/111311327842154267)\nprefix specifying the Python version):\n\n``` sh\n# Install dependencies from the requirements.txt file\npython -m pip install -r requirements.txt\n```\n\nYou can also install packages individually, e.g.:\n\n``` sh\npip install jupyter-book\n```\n\nDeactivate the virtual environment when you’re done:\n\n``` sh\ndeactivate\n```\n\n\u003c/details\u003e\n\n## Install dependencies with a package manager\n\n\u003cdetails\u003e\n\nThe [`environment.yml`](environment.yml) file contains a list of\ndependencies that can be installed with a package manager such as\n`conda`, `mamba` or `micromamba`. The instructions below are for\n[micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)\nbut should work for any package manager.\n\n``` bash\n# For Linux, the default shell is bash:\ncurl -L micro.mamba.pm/install.sh | bash\n# For macOS, the default shell is zsh:\ncurl -L micro.mamba.pm/install.sh | zsh\n```\n\nAfter answering the questions, install dependencies with the following\ncommand:\n\n``` bash\nmicromamba env create -f environment.yml\n```\n\nActivate the environment as follows:\n\n``` bash\nmicromamba activate geocompy\n```\n\nInstall kernel, this will allow you to select the environment in vscode\nor IPython as follows:\n\n``` bash\npython -m ipykernel install --user\n```\n\nYou can now reproduce the book (requires quarto to be installed):\n\n``` bash\nmicromamba run -n geocompy quarto preview\n```\n\n\u003c/details\u003e\n\n### Reproduce chapters with jupyter\n\n\u003cdetails\u003e\n\nVS Code’s `quarto.quarto` plugin can Python code in the chunks in the\n.qmd files in this book interactively.\n\nHowever, you can also run any of the chapters in a Jupyter Notebook,\ne.g. as follows:\n\n``` sh\ncd ipynb\n# jupyter notebook . # open a notebook showing all chapters\njupyter notebook 02-spatial-data.ipynb\n```\n\nYou should see something like this:\n\n![](https://user-images.githubusercontent.com/1825120/176920562-d2e7f9af-84b4-4352-8a50-9d9946084c66.png)\n\nSee documentation on running and developing Python code in a Jupyter\nnotebook at [docs.jupyter.org](https://docs.jupyter.org/en/latest/).\n\n\u003c/details\u003e\n\n# Additional information\n\nIf you’re interested in how to auto-generate and run the .py and .ipynb\nfiles from the .qmd files, see below.\n\n\u003cdetails\u003e\n\n## Updating the .py and .ipynb files\n\nThe Python scripts and IPython notebook files stored in the [code](code)\nand [ipynb](ipynb) folders are generated from the .qmd files. To\nregenerate them, you can use the following commands, to generate .ipynb\nand .py files for local versions of Chapter 2, for example:\n\n``` bash\nquarto convert 02-spatial-data.qmd # generate .ipynb file\njupytext --to py *.ipynb # generate .py files .ipynb files\n```\n\nDo this for all chapters with the following bash script in the repo:\n\n``` bash\n./convert.sh\n```\n\n## Updating .py and .ipynb files with GitHub Actions\n\nWe have set-up a GitHub Action to do this automatically: every commit\nmessage that contains the text string ‘convert’ will create and push\nupdated .ipynb and .py files.\n\n## Executing the .py and .ipynb files\n\nRunning the code chunks in the .qmd files in an IDE such as VSCode or\ndirectly with quarto is the main way code in this book is designed to be\nrun interactively, but you can also execute the .py and .ipynb files\ndirectly. To run the code for chapter 2, for example, you can run one of\nthe following commands from your system shell:\n\n``` bash\npython code/chapters/02-spatial-data.py # currently requires manual intervention to complete, see #71\nipython ipynb/02-spatial-data.ipynb # currently requires manual intervention to complete, see #71\nbash ./run-code.sh # run all .python files\n```\n\n## Updating packages\n\nWe pin package versions in the [environment.yml](environment.yml) and\n[requirements.txt](requirements.txt) files to ensure reproducibility.\n\nTo update the `requirements.txt` run the following:\n\n``` bash\npython -m pip install pur\npur -r requirements.txt\npython -m pip install -r requirements.txt\n```\n\nTo update the `environment.yml` file in the same way based on your newly\ninstalled packages, run the following:\n\n``` bash\nmicromamba list export \u003e environment.yml\n```\n\n\u003c/details\u003e\n\u003c!-- \nNote: we don't need this here but commenting out the content rather than deleting because some of it could be ported into the README.\nReasonable? \nHappy for these lines to be deleted also (RL 2022-12)\n\u0026#10;## Reproducing this book\n\u0026#10;An important aspect of scientific research that results can be independently verified by others.\nInformation that is generated by scientific means does not on auguments of authority or other [logical fallacies](https://bookofbadarguments.com/) as the basis for belief.\nInstead science relies on a network of people who are open minded yet skeptical to test assumptions and in some cases 'bust myths'.\n\u0026#10;In the digital age, trust in claims depends on computational reproducibility.\n\u0026#10;### Local with Quarto\n\u0026#10;To run the code locally, recommended for using the material on real data, you need to have a reasonable computer, e.g., with 8 GB RAM.\nYou'll need administrative rights to install the requirements, which include:\n\u0026#10;- A suitable integrated development environment (IDE) such as VS Code, RStudio or Jupyter Notebook\n- Quarto, if you want to reproduce the book's open access website\n- Either an Anaconda-like environment (we recommend `miniconda3`) or Docker to get systems dependencies\n\u0026#10;See the [project's README](https://github.com/geocompx/geocompy) for details on getting set-up.\nAfter you have installed the necessary dependencies and cloned or [unzipped](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) the book's source code, you should be able to reproduce the code in its entirety with the following command:\n\u0026#10;```bash\nquarto preview\n```\n\u0026#10;If you see output like that below (with the IDE and browser arranged to see live updates after editing the source code), congratulations, it has worked!\n\u0026#10;![](https://user-images.githubusercontent.com/1825120/161321382-ac36aeab-5628-4bef-b3dd-7b2becdd4860.png)\n\u0026#10;### Local with Jupyter\n\u0026#10;Alternatively, you can [download](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) and unzip the book's source code. The unzipped directory `py-main/code/chapters/` contains:\n\u0026#10;* The source `ipynb` files, one for each chapter\n* The `data` sub-directory with the sample data used in the code sections\n\u0026#10;Assuming that all required packages are installed (see beginning of each chapter), you can execute the `ipynb` files through your chosen working environment (VScode, Jupyter Notebook, etc.).  --\u003e\n","funding_links":["https://github.com/sponsors/geocompx"],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["gdal","geospatial-data","geography","transportation","routes","cycling","geos","mapping-tools","rspatial","simple-features"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/184021","html_url":"https://ost.ecosyste.ms/projects/184021"}