# Voter Participation Analysis for QOL
This package provides a Python class `voters` for analyzing voter participation rate for Urban Institute's Quality of Life (QOL) variables. It includes methods for spatial joining, summarizing voter data by NPA (Neighborhood Planning Area), and exporting the results to a CSV file.
# Installation
Install `voters` from PyPI using pip:
pip install qolvoters
# Usage
import pandas as pd
import arcpy
import qolvoters as vt
# Example usage:
voter_analysis = vt.voters('GeocodedVoterPointAddresses', 'NPA_FeatureClass', 'SummaryTable')
# Summarize voter data by NPA
voter_analysis.summary('ActiveVoters', 'Join_Count')
# Export summarized results to a CSV file
voter_analysis.export('OutputDirectory', 'VoterParticipationSummary.csv')
# Methods
`__init__(self, voterparticipation, NPA, SummaryTableName)`
Initialize the voters class with the following parameters:
* voterparticipation: Geocoded voter participation feature class.
* NPA: NPA feature class.
* SummaryTableName: Name of the summary table for voters in each NPA.
Assign NPA IDs to each voter by performing a spatial join between the voter participation feature class and the NPA feature class.
`summary(self, *FieldsToBeSummarized)`
Compute the summary of all voters within each NPA. Takes parameters for the fields to be summarized (e.g., active voters field and the 'Join_Count' field).
`export(self, OutputDirectory, FinalCSVName)`
Export the results of the voter participation analysis to a CSV file. Renames columns and computes additional fields before exporting the final CSV file.
# License
This project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/ProvidenceAdu/qolvoters",
"name": "qolvoters",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "urban institute, python, Mecklenburg County, quality of life explorer, voters, NPA",
"author": "Providence Adu,Ph.D.",
"author_email": "<padu@charlotte.edu>",
"download_url": "https://files.pythonhosted.org/packages/74/f1/6f8576b34ec1ea0f6d074228c15d8bcbfb5e98c021d50acd62bb98ffdcdd/qolvoters-1.0.tar.gz",
"platform": null,
"description": "\n# Voter Participation Analysis for QOL\n\nThis package provides a Python class `voters` for analyzing voter participation rate for Urban Institute's Quality of Life (QOL) variables. It includes methods for spatial joining, summarizing voter data by NPA (Neighborhood Planning Area), and exporting the results to a CSV file.\n\n# Installation\n\nInstall `voters` from PyPI using pip:\n\n\npip install qolvoters\n\n\n# Usage\nimport pandas as pd \nimport arcpy\nimport qolvoters as vt\n\n# Example usage:\nvoter_analysis = vt.voters('GeocodedVoterPointAddresses', 'NPA_FeatureClass', 'SummaryTable')\n\n# Summarize voter data by NPA\nvoter_analysis.summary('ActiveVoters', 'Join_Count')\n\n# Export summarized results to a CSV file\nvoter_analysis.export('OutputDirectory', 'VoterParticipationSummary.csv')\n\n# Methods \n\n`__init__(self, voterparticipation, NPA, SummaryTableName)`\n\nInitialize the voters class with the following parameters:\n\n* voterparticipation: Geocoded voter participation feature class.\n\n* NPA: NPA feature class.\n\n* SummaryTableName: Name of the summary table for voters in each NPA.\n\nAssign NPA IDs to each voter by performing a spatial join between the voter participation feature class and the NPA feature class.\n\n`summary(self, *FieldsToBeSummarized)`\n\nCompute the summary of all voters within each NPA. Takes parameters for the fields to be summarized (e.g., active voters field and the 'Join_Count' field).\n\n`export(self, OutputDirectory, FinalCSVName)`\n\nExport the results of the voter participation analysis to a CSV file. Renames columns and computes additional fields before exporting the final CSV file.\n\n# License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "This library execute voter participation rate analysis for the Quality of Life Exporer variables",
"version": "1.0",
"project_urls": {
"Homepage": "https://github.com/ProvidenceAdu/qolvoters"
},
"split_keywords": [
"urban institute",
" python",
" mecklenburg county",
" quality of life explorer",
" voters",
" npa"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b75bfe33f746775a8cf7ab91dc364de71a6bb66458c4eeb20f29e3bad3d49a6c",
"md5": "18945c4ae8b4359428ad64d31121c434",
"sha256": "9099c28a6ca7e7792fd2569204262b6f88a2318b5ee0ca0402929014fc9d6688"
},
"downloads": -1,
"filename": "qolvoters-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "18945c4ae8b4359428ad64d31121c434",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4511,
"upload_time": "2024-07-18T21:36:41",
"upload_time_iso_8601": "2024-07-18T21:36:41.939890Z",
"url": "https://files.pythonhosted.org/packages/b7/5b/fe33f746775a8cf7ab91dc364de71a6bb66458c4eeb20f29e3bad3d49a6c/qolvoters-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "74f16f8576b34ec1ea0f6d074228c15d8bcbfb5e98c021d50acd62bb98ffdcdd",
"md5": "bd511f03d73cf8297dd13d50f1556e24",
"sha256": "43ba4895251999a72b2fa2df3bb1cd8e58d6c557c6770acb331f19a0590cf158"
},
"downloads": -1,
"filename": "qolvoters-1.0.tar.gz",
"has_sig": false,
"md5_digest": "bd511f03d73cf8297dd13d50f1556e24",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3760,
"upload_time": "2024-07-18T21:36:43",
"upload_time_iso_8601": "2024-07-18T21:36:43.162068Z",
"url": "https://files.pythonhosted.org/packages/74/f1/6f8576b34ec1ea0f6d074228c15d8bcbfb5e98c021d50acd62bb98ffdcdd/qolvoters-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 21:36:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ProvidenceAdu",
"github_project": "qolvoters",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "qolvoters"
}