Skip to main content

Transportation Infrastructure Data Toolbox

Project description

PavData (Python)

UFC    PavData

Version Lifecycle: experimental

pavdata is a Python package for storing, validating, and exploring transportation infrastructure data with a lightweight, human-readable .pavdata format based on JSON. There is also an equivalent R package that reads and writes the same format.

It is designed for pavement and materials workflows where researchers need to:

  • create structured objects for samples, binders, aggregates, mixtures, and tests
  • validate required fields and plausible numeric ranges
  • serialize data to a portable file format
  • reload collections into an indexed in-memory library
  • inspect objects with familiar methods

Installation

pip install pavdata

For the plotting functions, also install matplotlib:

pip install matplotlib

Why pavdata?

Laboratory and field datasets in pavement engineering are often fragmented across spreadsheets, scripts, and reports. pavdata provides a small relational layer so those records can be created, checked, saved, and reused more consistently.

The package focuses on four practical ideas aligned with the FAIR Principles:

  • explicit object types for common pavement entities
  • built-in validation for required fields and plausible ranges
  • reproducible read/write support through .pavdata files
  • simple tools for browsing collections during analysis

Quick Start

Create a few linked objects:

import pavdata

binder = pavdata.pav_new(
    "binder",
    id="binder-cap-50-70",
    name="CAP 50/70",
    binder_type="CAP 50/70",
    penetration_mm=52,
    softening_point_c=49,
)

aggregate = pavdata.pav_new(
    "aggregate",
    id="aggregate-basalt",
    name="Basalt aggregate",
    bulk_specific_gravity=2.71,
    water_absorption_pct=1.2,
)

mixture = pavdata.pav_new(
    "mixture",
    id="mixture-dense-graded",
    name="Dense graded mix",
    binder_id=binder.id,
    aggregate_id=aggregate.id,
    binder_content_pct=5.3,
)

volumetrics = pavdata.pav_new(
    "mixture_test",
    id="test-volumetrics-dense-graded",
    name="Dense graded mix volumetrics",
    mixture_id=mixture.id,
    test_type="volumetrics",
    volumetrics={
        "air_voids_pct": 4.1,
        "voids_mineral_aggregate_pct": 15.4,
        "voids_filled_asphalt_pct": 73.4,
        "filler_binder_ratio": 1.1,
    },
)

Validate the objects:

pavdata.pav_check(binder)
pavdata.pav_check(mixture)
pavdata.pav_check(volumetrics)

Save them to disk and read them back:

path = "example.pavdata"
pavdata.pav_write([binder, aggregate, mixture, volumetrics], path)

objects = pavdata.pav_read(path)

Load them into a library for indexed access:

lib = pavdata.pav_library()
lib.load(path)

lib.pav_list(obj_type="mixture")
lib.pav_view(mixture.id)

Inspecting Objects

Use summary() to display the populated fields of an object:

volumetrics.summary()

In Python, graphical exploration is done through the explore module, which generates figures from a .pavdata file:

from pavdata import explore

explore.pav_explore(path)           # completeness dashboard
explore.pav_plot_volumetrics(path)  # air voids vs binder content
explore.pav_plot_mr(path)           # resilient modulus by binder

The R package produces equivalent plots through its plot() method, for example for the volumetric properties of a mixture:

Bar plot of volumetric properties

Main Functions

Function Purpose
pav_new() Create a new PavData object
pav_check() Validate one object
pav_check_integrity() Validate a collection and its foreign keys
pav_write() Write objects to a .pavdata file
pav_read() Read objects from a .pavdata file
pav_load() Read a file and validate all objects
pav_library() Create an in-memory indexed library
pav_completeness() Report field completeness across a set

Object Types

pavdata currently supports these object families:

  • sample
  • binder
  • aggregate
  • mixture
  • binder_test
  • aggregate_test
  • mixture_test
  • reference

Each object shares common metadata such as id, name, type, version, created_at, source, and notes.

UML Data Model

The UML diagram below summarizes the data classes and their relationships (open full diagram).

Built-In Example Data

The package ships with a dataset of 296 real samples, accessible through the SAMPLE_DATA_PATH constant:

import pavdata
data = pavdata.pav_read(pavdata.SAMPLE_DATA_PATH)

Related Publications

  • Melo, C. D. R., Carvalho, P. H. J., Mariano, L. G., Babadopulos, L. F. A. L., Parente Junior, E., and Soares, J. B. (2025). Proposta preliminar de um repositório nacional aberto de ensaios de misturas asfálticas. In Anais do 39º Congresso de Pesquisa e Ensino em Transportes (39º ANPET). Associação Nacional de Pesquisa e Ensino em Transportes. Goiânia, GO.

Authors and Contributions

PavData is developed by the following authors:

Affiliation

License

The software is distributed under the MIT license. The example data that ships with the library is distributed under the CC-BY-4.0 license.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pavdata-0.1.3.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pavdata-0.1.3-py3-none-any.whl (94.0 kB view details)

Uploaded Python 3

File details

Details for the file pavdata-0.1.3.tar.gz.

File metadata

  • Download URL: pavdata-0.1.3.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pavdata-0.1.3.tar.gz
Algorithm Hash digest
SHA256 71a3caf7b5f029e4d9b2f1e960ba8c48a2636b1671ae749e319e972e5e1b092a
MD5 74687b72610d6fc39db265ce3985d8c4
BLAKE2b-256 96a7fa575782168c6119c6cc2b19bd44051e695725395e311a2528af23bc80a3

See more details on using hashes here.

File details

Details for the file pavdata-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pavdata-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pavdata-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 64962a874e03b5c1aafe7f3eb8810686d332951ab5bc6ac3de22721fbc333843
MD5 7c4de46ab5efc71657426ec8ce597532
BLAKE2b-256 83a8875f292893ea2588295508502cdb10f2009c49a524ec97fe7464a9d920d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page