{"id":47819605,"url":"https://github.com/ncsu-landscape-dynamics/popsborder","last_synced_at":"2026-04-03T19:04:53.086Z","repository":{"id":41813440,"uuid":"248598945","full_name":"ncsu-landscape-dynamics/popsborder","owner":"ncsu-landscape-dynamics","description":"PoPS Border: Simulation of contaminated consignments and their inspections","archived":false,"fork":false,"pushed_at":"2025-12-19T14:59:53.000Z","size":22148,"stargazers_count":3,"open_issues_count":37,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-21T08:56:29.645Z","etag":null,"topics":["border","hacktoberfest","inspections","open-science","pathways-simulation","pest","simulation"],"latest_commit_sha":null,"homepage":"https://mybinder.org/v2/gh/ncsu-landscape-dynamics/popsborder/main?labpath=examples%2Fnotebooks%2Fbasic_with_command_line.ipynb","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ncsu-landscape-dynamics.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,"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}},"created_at":"2020-03-19T20:30:59.000Z","updated_at":"2025-12-19T14:59:56.000Z","dependencies_parsed_at":"2023-01-21T20:48:26.874Z","dependency_job_id":"49d889e5-b54e-4568-9f76-3482bcab4558","html_url":"https://github.com/ncsu-landscape-dynamics/popsborder","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ncsu-landscape-dynamics/popsborder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsu-landscape-dynamics%2Fpopsborder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsu-landscape-dynamics%2Fpopsborder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsu-landscape-dynamics%2Fpopsborder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsu-landscape-dynamics%2Fpopsborder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncsu-landscape-dynamics","download_url":"https://codeload.github.com/ncsu-landscape-dynamics/popsborder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsu-landscape-dynamics%2Fpopsborder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31371700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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"}},"keywords":["border","hacktoberfest","inspections","open-science","pathways-simulation","pest","simulation"],"created_at":"2026-04-03T19:03:19.476Z","updated_at":"2026-04-03T19:04:53.077Z","avatar_url":"https://github.com/ncsu-landscape-dynamics.png","language":"Python","readme":"# PoPS Border\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ncsu-landscape-dynamics/popsborder/main?urlpath=lab/tree/examples/notebooks/basic_with_command_line.ipynb)\n[![CI](https://github.com/ncsu-landscape-dynamics/popsborder/workflows/CI/badge.svg)](https://github.com/ncsu-landscape-dynamics/popsborder/actions/workflows/ci.yml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nPoPS Border is a simulation (simulator) of contaminated consignments and\ncontaminant presence testing which generates synthetic shipment data and\nperforms inspection on them.\n\n## Model of reality\n\nThe simulation is using the following model to understand the system:\n\n```math\nf(x) -\u003e y\n```\n\nwhere _x_ represents all shipments with all information about them\nsuch as the level of infestation, _f_ is a sampling function,\ni.e. import procedure used at the port,\nand _y_ represents the resulting record in the database.\n\nSince the simulation is generating _x_, we can compute:\n\n```math\nr = g(y) / g(x)\n```\n\nwhere _x_ and _y_ are defined in the same way as above,\n_g_ is a function giving level of infestation in each set\n(e.g. number of shipments with a pest),\nand _r_ is the success rate in detecting infestation\nusing the function _f_ from above.\n\n## Use cases\n\nThis simulation tool can help to answer various questions about influence\nof inspection protocols or pest or contaminant presence on inspection outcome.\nFor example, the tool can generate synthetic data representing consignments\nwith variations in contamination rates and test how different inspection\nmethods influence inspection outcomes.\nSee more use cases in a dedicated [documentation section](docs/use_cases.md).\n\nThe prototype of the simulation was called _pathways-simulation_ because\nfor some contaminants, such as pests, the main question is what\nare the pathways by which the contaminants are getting across the border.\n\n## Documentation\n\nAn example of how the simulation interface works is in\n[this Jupyter notebook](examples/notebooks/basic_with_command_line.ipynb).\n\nTo run the code without installing anything use Binder:\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ncsu-landscape-dynamics/popsborder/main?urlpath=lab/tree/examples/notebooks/basic_with_command_line.ipynb)\n\nIf you are not familiar with Binder, see\n[our short intro](docs/binder.md).\n\nDocumentation is included in the [docs](docs/) directory.\n[command line interface](docs/cli.md)\nand [Consignment configuration](docs/consignments.md)\npages are good ones to start with.\n\n## Install\n\nBesides Python, you will need _pipenv_ which is usually installed using _pip_.\nThe dependencies of this package will be installed into the virtual environment\ncreated by _pipenv_. Download this repository (e.g., as ZIP and unpack it).\nIn the directory with the code with _pipenv_ installed, run:\n\n```sh\npipenv install\n```\n\nAdditionally, you may want to install Jupyter and visualization libraries\nto that environment. See the contributing section below for more options.\n\n## Contributing\n\nTo contribute to this repository it is handy to have a several packages\ninstalled and then run certain tools before each commit or pull request,\nhowever you will have a chance to see and correct the errors also after\nyou open a pull request.\n\n### Install everything using pipenv\n\n```sh\npipenv install --dev\n```\n\n### Install development dependencies manually\n\nInstall the following packages:\n\n```sh\nflake8 pylint black pytest pytest-datadir\n```\n\nInstall these using _pip_ or _conda_ possibly into a (virtual)\nenvironment.\n\n### Run tests\n\nTo run these from command line use:\n\n```sh\nflake8 .\npylint popsborder\nblack .\npytest tests/\n```\n\n### Modifying notebooks\n\nWe store computed notebooks as they serve as documentation and\nexamples.\nAfter modification, notebooks should be recomputed, e.g., by\n_Restart kernel and run all cells_ to ensure that the notebook runs\nwith the cells executed in order and that there are minimal changes\nto the notebook (e.g., executed cell numbers).\n\nThe standard `git diff` is not particularly useful for `.ipynb` files,\nespecially for computed ones, but the rendered file can be viewed in PR\nand _nbdiff_ in command line can show a human-readable difference.\n\n## Authors\n\n- Vaclav Petras, NCSU Center for Geospatial Analytics\n- Kellyn P. Montgomery, NCSU Center for Geospatial Analytics\n- Anna Petrasova, NCSU Center for Geospatial Analytics\n\n## License\n\nThe simulation code is open source under GNU GPL \u003e=v2\n(see the LICENSE file for details).\n\n## Acknowledgment and Disclaimer\n\nThis research is funded by USDA APHIS. The findings do not necessarily\nrepresent the views of USDA APHIS.\n\nPlease note that this is a simulation and it needs to be calibrated\nto give any realistic or actionable results. Results presented here\nare examples for demonstration purposes only.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncsu-landscape-dynamics%2Fpopsborder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncsu-landscape-dynamics%2Fpopsborder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncsu-landscape-dynamics%2Fpopsborder/lists"}