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 datasets
ds = datasets.get_session_dataset(
infrastructure_slug="cdp-seattle-21723dcf",
start_datetime="2021-01-01",
store_transcript=True,
)
Plotting and Analysis
Install plotting support: pip install cdp-data[plot]
from cdp_data import keywords
ngram_usage = keywords.compute_ngram_usage_history(
"cdp-seattle-21723dcf",
start_datetime="2021-01-01",
)
grid = keywords.plot_ngram_usage_histories(
["police", "housing", "transportation"],
ngram_usage,
)
grid.savefig("seattle-keywords-over-time.pdf")
# Or with extra kwargs like order
grid_third_order = keywords.plot_ngram_usage_histories(
["police", "housing", "transportation"],
ngram_usage,
lmplot_kws={"order": 3},
)
grid_third_order.savefig("seattle-keywords-over-time-third-order.pdf")
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.1.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for cdp_data-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1710cc262f9efc2c914873f25a237c2ae8d06e0033c7225bc359faa05b9289 |
|
MD5 | 7acaf2ef9eafcec9218087492ab3cdaa |
|
BLAKE2b-256 | 100f6b29cd90705188d9886aed2c017219e9ba37bfbc45c03722caeea031244c |