Data Utilities and Processing Functions for Generalized for all CDP Instances
Project description
cdp-data
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
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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for cdp_data-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51fd3b6c580205bf0511ad2a8c05f1d110f9009dfeac9f5f2551a937b7ac59d2 |
|
MD5 | 6435c2ad42546b0ab968374f27bbe7d9 |
|
BLAKE2b-256 | d970bbf2729bb90ad7beac5c32287952a098f8469f47502210e33030cf3c9448 |