{"id":19259940,"url":"https://github.com/unicef/magicbox-download-shapefiles","last_synced_at":"2026-05-02T22:40:38.438Z","repository":{"id":42363480,"uuid":"108161591","full_name":"unicef/magicbox-download-shapefiles","owner":"unicef","description":"Downloads shapefiles for each country from gadm.org and unzips them.","archived":false,"fork":false,"pushed_at":"2022-12-07T17:30:56.000Z","size":177,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-05T09:42:35.757Z","etag":null,"topics":["data","data-science","docker","downloads-shapefiles","emergency-response","gadm","geospatial","geospatial-data","humanitarian","javascript","magicbox","nodejs","shapefile","unicef"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unicef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-24T17:35:17.000Z","updated_at":"2024-08-29T12:35:41.000Z","dependencies_parsed_at":"2023-01-24T19:18:49.961Z","dependency_job_id":null,"html_url":"https://github.com/unicef/magicbox-download-shapefiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicef%2Fmagicbox-download-shapefiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicef%2Fmagicbox-download-shapefiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicef%2Fmagicbox-download-shapefiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicef%2Fmagicbox-download-shapefiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicef","download_url":"https://codeload.github.com/unicef/magicbox-download-shapefiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356907,"owners_count":19788636,"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","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"}},"keywords":["data","data-science","docker","downloads-shapefiles","emergency-response","gadm","geospatial","geospatial-data","humanitarian","javascript","magicbox","nodejs","shapefile","unicef"],"created_at":"2024-11-09T19:18:23.560Z","updated_at":"2025-10-16T14:45:06.852Z","avatar_url":"https://github.com/unicef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"magicbox-download-shapefiles\n============================\n\n[![Chat on Gitter](https://badges.gitter.im/unicef-innovation-dev/Lobby.png)](https://gitter.im/unicef-innovation-dev/Lobby)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n**Component of [MagicBox](https://github.com/unicef/magicbox)**\n\n\n## About\n\nMagicBox uses various shapefiles from different datasets to support MagicBox's\npurpose. This repository downloads all zipped shape files from a primary source,\n[Global Administrative Areas Database](http://gadm.org/) (GADM) and unzips them.\n\nIf you're using this repo, you likely want to use\n[magicbox-import-shapefiles](https://github.com/unicef/magicbox-import-shapefiles)\nto import the shapefiles into a PostgreSQL database.\n\n\n## How it works\n\nThis downloads zipped shapefiles from GADM to:\n\n`./data/zipfiles/`\n\n…and unzips them to:\n\n`./data/shapefiles/gadm3-6/`\n\n\n## Installation\n\nUse [Docker](https://www.docker.com/) to build this image and run the\ndownloader. These steps assume you have a working Docker installation. If not,\nreview the Docker documentation first.\n\n* [Docker - Installation](https://docs.docker.com/engine/installation/)\n* [Docker - Getting started](https://docs.docker.com/get-started/)\n\n### Build image, create volume\n\nCreate a config.js file based in config-sample.js\n\n```bash\ncp config-sample.js config.js\n```\n\nBuild this image locally on your machine with this command.\n\n```bash\ndocker build -t unicef/download-shapefiles .\n```\n\nThis builds the Docker image locally on your machine.\n\nNext, create a volume. A volume is a shared data volume we use across multiple\ncontainers. We'll use it again later in the\n[magicbox-import-shapefiles](https://github.com/unicef/magicbox-import-shapefiles)\nrepo.\n\n```bash\ndocker volume create --name shapefiles_dbvolume\n```\n\n### Run image\n\nNow you can run the image. Start up the image with this command (it will use the\nvolume we created in the previous step to hold the data).\n\n```bash\ndocker run --rm -it -v shapefiles_dbvolume:/app/magicbox-download-shapefiles/data:z unicef/download-shapefiles\n```\n\nYou should see output like this:\n\n```\nDownloading AFG\nAbout to write zip to file\nFile saved.\nBegin store to unzip AFG\nwait...\n[...]\n```\n\n\n## Legal\n\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nThis project is licensed under the [BSD 3-Clause\nLicense](https://opensource.org/licenses/BSD-3-Clause).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicef%2Fmagicbox-download-shapefiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicef%2Fmagicbox-download-shapefiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicef%2Fmagicbox-download-shapefiles/lists"}