PAM

PAM: Population Activity Modeller - Published in JOSS (2024)

https://github.com/arup-group/pam

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
    1 of 29 committers (3.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

arup city-modelling city-modelling-lab cml transit

Keywords from Contributors

mesh hydrology energy-system exoplanet hydraulic-modelling polygon gravitational-lensing geoscience ode

Scientific Fields

Political Science Social Sciences - 90% confidence
Artificial Intelligence and Machine Learning Computer Science - 83% confidence
Last synced: 6 months ago · JSON representation ·

Repository

Generate and modify transport demand scenarios via a Python API.

Basic Info
  • Host: GitHub
  • Owner: arup-group
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 278 MB
Statistics
  • Stars: 60
  • Watchers: 15
  • Forks: 19
  • Open Issues: 34
  • Releases: 9
Topics
arup city-modelling city-modelling-lab cml transit
Created almost 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

PAM

Population Activity Modeller

DailyCIbadge Documentation image JOSS DOI Test coverage PyPI version Anaconda.org version

PAM is a python library for population activity sequence modelling. Example use cases:

  • Read an existing population then write to a new format.
  • Modify an existing population, for example to model activity locations.
  • Create your own activity-based model.

PAM supports common travel and activity formats, including MATSim.

Activity Sequences?

Population activity sequences (sometimes called activity plans) are used to model the activities (where and when people are at home, work, education and so on) and associated travel of a population:

PAM

Activity sequences are used by transport planners to model travel demand, but can also be used in other domains, such as for virus transmission or energy use modelling.

Brief History

PAM was originally built and shared to rapidly modify existing activity models to respond to pandemic lock-down scenarios.

PAM

This functionality used a read-modify-write pattern. Where modifications are made by applying policies. Example policies might be (a) infected persons quarantine at home, (b) only critical workers travel to work, and (c) everyone shops locally.

PAM

Features

Activity Modelling

In addition to the original read-modify-write pattern and functionality, PAM has modules for:

  • location modelling
  • discretionary activity modelling
  • mode choice modelling
  • facility sampling
  • vehicle ownership

More generally the core PAM data structure and modules can be used as a library to support your own use cases, including building your own activity-based model.

MATSim

PAM fully supports the MATSim population/plans format. This includes vehicles, unselected plans, leg routes and leg attributes. A core use case of PAM is to read-modify-write experienced plans from MATSim. This can allow new MATSim scenarios to be "warm started" from existing scenarios, significantly reducing MATSim compute time.

Documentation

For more detailed instructions, see our documentation.

Installation

To install PAM, we recommend using the mamba package manager:

As a user

shell mamba create -n pam -c conda-forge -c city-modelling-lab cml-pam mamba activate pam <!--- --8<-- [end:docs-install-user] -->

As a developer

shell git clone git@github.com:arup-group/pam.git cd pam mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt --file requirements/dev.txt mamba activate pam pip install --no-deps -e . <!--- --8<-- [end:docs-install-dev] -->

Installing with pip

Installing directly with pip as a user (pip install cml-pam) or as a developer (pip install -e '.[dev]') is also possible, but you will need the libgdal & libspatialindex geospatial non-python libraries pre-installed.

For more detailed instructions, see our documentation.

Contributing

There are many ways to make both technical and non-technical contributions to PAM. Before making contributions to the PAM source code, see our contribution guidelines and follow the development install instructions.

If you are using pip to install PAM instead of the recommended mamba, you can install the optional test and documentation libraries using the dev option, i.e., pip install -e '.[dev]'

If you plan to make changes to the code then please make regular use of the following tools to verify the codebase while you work:

  • pre-commit: run pre-commit install in your command line to load inbuilt checks that will run every time you commit your changes. The checks are: 1. check no large files have been staged, 2. lint python files for major errors, 3. format python files to conform with the pep8 standard. You can also run these checks yourself at any time to ensure staged changes are clean by simple calling pre-commit.
  • pytest - run the unit test suite, check test coverage, and test that the example notebooks successfully run.
  • pytest -p memray -m "high_mem" --no-cov (not available on Windows) - after installing memray (mamba install memray pytest-memray), test that memory and time performance does not exceed benchmarks.

For more information, see our documentation.

Building the documentation

If you are unable to access the online documentation, you can build the documentation locally. First, install a development environment of PAM, then deploy the documentation using mike:

mike deploy 0.2 mike serve

Then you can view the documentation in a browser at http://localhost:8000/.

Credits

This package was created with Cookiecutter and the arup-group/cookiecutter-pypackage project template.

Owner

  • Name: Arup
  • Login: arup-group
  • Kind: organization
  • Email: media@arup.com

We Shape a Better World

JOSS Publication

PAM: Population Activity Modeller
Published
April 23, 2024
Volume 9, Issue 96, Page 6097
Authors
Fred Shone ORCID
Arup, City Modelling Lab
Theodore Chatziioannou
Arup, City Modelling Lab
Bryn Pickering ORCID
Arup, City Modelling Lab
Kasia Kozlowska
Arup, City Modelling Lab
Michael Fitzmaurice
Arup, City Modelling Lab
Editor
Martin Fleischmann ORCID
Tags
Activity model Synthetic population MATSim

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Shone
  given-names: Fred
  orcid: "https://orcid.org/0009-0008-1079-0081"
- family-names: Chatziioannou
  given-names: Theodore
- family-names: Pickering
  given-names: Bryn
  orcid: "https://orcid.org/0000-0003-4044-6587"
- family-names: Kozlowska
  given-names: Kasia
- family-names: Fitzmaurice
  given-names: Michael
doi: 10.5281/zenodo.10948231
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Shone
    given-names: Fred
    orcid: "https://orcid.org/0009-0008-1079-0081"
  - family-names: Chatziioannou
    given-names: Theodore
  - family-names: Pickering
    given-names: Bryn
    orcid: "https://orcid.org/0000-0003-4044-6587"
  - family-names: Kozlowska
    given-names: Kasia
  - family-names: Fitzmaurice
    given-names: Michael
  date-published: 2024-04-23
  doi: 10.21105/joss.06097
  issn: 2475-9066
  issue: 96
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 6097
  title: "PAM: Population Activity Modeller"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.06097"
  volume: 9
title: "PAM: Population Activity Modeller"

GitHub Events

Total
  • Issues event: 6
  • Watch event: 4
  • Delete event: 5
  • Issue comment event: 3
  • Push event: 22
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 6
  • Create event: 4
Last Year
  • Issues event: 6
  • Watch event: 5
  • Delete event: 5
  • Issue comment event: 3
  • Push event: 22
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 6
  • Create event: 4

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 844
  • Total Committers: 29
  • Avg Commits per committer: 29.103
  • Development Distribution Score (DDS): 0.687
Past Year
  • Commits: 10
  • Committers: 1
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
fred.shone f****e@a****m 264
Bryn Pickering 1****g 160
Theodore Chatziioannou T****u@a****m 112
KasiaKoz k****a@a****m 70
Michael Fitzmaurice M****e@a****m 61
Divya Sharma d****a@a****m 23
Iseul Song I****g@a****m 19
Theodore-Chatziioannou 6****u 19
Divya Sharma d****a@L****l 16
val-ismaili v****i@a****m 15
Markus Straub m****b@a****t 11
Yuhao Sun s****a@g****m 9
Anastasia Kopytina 6****p 8
alex-kaye 7****e 8
Sean Billings s****s@L****l 8
Ella Dahan E****n@a****m 7
pre-commit-ci[bot] 6****] 6
YannisZa y****s@g****m 5
dependabot[bot] 4****] 4
Divya Sharma d****a@L****m 4
JosePazNoguera 8****a 3
Andrew Kay 6****p 3
Rory Sedgwick r****k@a****m 2
fred f****e@m****m 2
Jose_DelaPaz j****a@g****m 1
Andrew Kay a****y@a****m 1
Mark Ruddy d****y@g****m 1
Sarah Hayes s****s@a****m 1
chicken-teriyaki-cup-rice 9****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 23
  • Total pull requests: 99
  • Average time to close issues: 3 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 6
  • Total pull request authors: 15
  • Average comments per issue: 0.91
  • Average comments per pull request: 0.63
  • Merged pull requests: 85
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: 1 day
  • Average time to close pull requests: about 23 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • fredshone (13)
  • mfitz (5)
  • gac55 (2)
  • andkay (2)
  • Theodore-Chatziioannou (2)
  • KasiaKoz (1)
Pull Request Authors
  • fredshone (34)
  • mfitz (22)
  • Theodore-Chatziioannou (12)
  • KasiaKoz (7)
  • gac55 (5)
  • dependabot[bot] (4)
  • brynpickering (3)
  • elladahan (3)
  • JosePazNoguera (2)
  • pre-commit-ci[bot] (2)
  • syhwawa (2)
  • andkay (2)
  • IseulSong (2)
  • oliviaguest (1)
  • arup-sb (1)
Top Labels
Issue Labels
enhancement (6) good first issue (5) bug (4) help wanted (1)
Pull Request Labels
dependencies (4) bug (3) invalid (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 45 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: cml-pam

The Population activity Modeller (PAM) is a python API for activity sequence modelling.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 45 Last month
Rankings
Dependent packages count: 7.3%
Average: 38.0%
Dependent repos count: 68.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/daily-scheduled-ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v3 composite
  • actions/setup-python v1 composite
  • rtCamp/action-slack-notify v2.0.0 composite
Dockerfile docker
  • python 3.7-slim-stretch build
.github/workflows/commit-ci.yml actions
.github/workflows/docs.yml actions
.github/workflows/pr-ci.yml actions
.github/workflows/pre-release.yml actions
.github/workflows/release.yml actions
pyproject.toml pypi
requirements/base.txt pypi
  • Rtree >=1,<2
  • click <9
  • gdal <3.6
  • geopandas >=0.13,<0.14
  • ipykernel <7
  • lxml <5
  • matplotlib >=3,<4
  • numpy >=1,<2
  • pandas >=1.5,<3
  • plotly >=4,<6
  • prettytable >=3,<4
  • python-Levenshtein >=0.21,<0.22
  • rich >=12,<14
  • s2sphere <0.3
  • scikit-learn >=1.2,<2
  • shapely >=1,<3
  • xlrd >=2,<3
requirements/dev.txt pypi
  • jupyter <2 development
  • mike <2 development
  • mkdocs <2 development
  • mkdocs-click <0.7 development
  • mkdocs-jupyter <0.25 development
  • mkdocstrings-python <2 development
  • nbmake <2 development
  • pre-commit <4 development
  • pytest <8 development
  • pytest-cov <5 development
  • pytest-mock <4 development
  • pytest-timeout <3 development
  • pytest-xdist <4 development