Skip to main content

Data Utilities and Processing Functions for Generalized for all CDP Instances

Project description

cdp-data

Build Status Documentation

Data Utilities and Processing Generalized for All CDP Instances


Installation

Stable Release: pip install cdp-data
Development Head: pip install git+https://github.com/CouncilDataProject/cdp-data.git

Documentation

For full package documentation please visit councildataproject.github.io/cdp-data.

Quickstart

Pulling Datasets

Install basics: pip install cdp-data

from cdp_data import CDPInstances, datasets
ds = datasets.get_session_dataset(
    infrastructure_slug=CDPInstances.Seattle,
    start_datetime="2021-01-01",
    store_transcript=True,
)

Plotting and Analysis

Seattle keyword usage over time

Install plotting support: pip install cdp-data[plot]

from cdp_data import CDPInstances, keywords
ngram_usage = keywords.compute_ngram_usage_history(
    CDPInstances.Seattle,
    start_datetime="2021-01-01",
)
grid = keywords.plot_ngram_usage_histories(
    ["police", "housing", "transportation"],
    ngram_usage,
    lmplot_kws=dict(  # extra plotting params
        col="ngram",
        hue="ngram",
        scatter_kws={"alpha": 0.2},
        aspect=1.6,
    ),
)
grid.savefig("seattle-keywords-over-time.png")

Development

See CONTRIBUTING.md for information related to developing the code.

MIT license

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

cdp-data-0.0.4.tar.gz (152.7 kB view details)

Uploaded Source

Built Distribution

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

cdp_data-0.0.4-py2.py3-none-any.whl (21.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cdp-data-0.0.4.tar.gz.

File metadata

  • Download URL: cdp-data-0.0.4.tar.gz
  • Upload date:
  • Size: 152.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for cdp-data-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2ea3166705355649dea79a2209813911905cf12eee12b69380875cef6697bd35
MD5 d51fa0da65664be3d9f4ce79b423cf56
BLAKE2b-256 38773d88f00d1dc981c75fa4f3605e59137261325d0edf8a440107942523907e

See more details on using hashes here.

File details

Details for the file cdp_data-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: cdp_data-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for cdp_data-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 51fd3b6c580205bf0511ad2a8c05f1d110f9009dfeac9f5f2551a937b7ac59d2
MD5 6435c2ad42546b0ab968374f27bbe7d9
BLAKE2b-256 d970bbf2729bb90ad7beac5c32287952a098f8469f47502210e33030cf3c9448

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