Skip to main content

This library serves as an extension of and for the election campaign API, https://research-questions-api.herokuapp.com/redoc.

Project description

Election-Campaign-TPL

Purpose of the Package

  • This library serves as an extension of and for the election campaign API (https://research-questions-api.herokuapp.com/docs#/). It is intended to aid developers who decide to use the API in a python IDE for research work related to election campaign and governance.

Features

  • Collection of Research Questions Focus Areas
    • general_trends
      • get_alltweets()
      • get_limitedtweets()
      • get_filteredtweets()
    • politicians_reputation
      • get_alltweets()
      • count_alltwets()
    • citizens_sentiment
    • complaints_areas

Getting Started

The package can be found on pypi hence you can install it using pip

Installation

pip install election_campaign 

Usage

politicians_reputation

>>> from election_campaign import general_trends
>>>
>>> #Retrieve Nigeria centered-tweets using the general_trends.get_alltweets() function
>>> alltweets = general_trends.get_alltweets(data_type='json')
>>>
>>> #Retrieve limited Nigeria centered-tweets using the general_trends.get_limitedtweets() function
>>> limitedtweets = general_trends.get_limitedtweets(limit=10, data_type='pandas.dataframe')

Example

>>> from election_campaign import politicians_reputation
>>>
>>> #Retrieve the number of tweets about a certain politician from Nigeria centered-tweets using the politicians_reputation.get_alltweets() function
>>> tweetcount = politicians_reputation.count_alltweets(filter='Atiku Abubakar', data_type='json')
>>> print(tweetcount)
>>>
>>> '{"count": 1049}'
>>>
>>> tweetcount = politicians_reputation.count_alltweets(filter='Peter Obi', data_type='json')
>>> print(tweetcount)
>>>
>>> '{"count": 21261}'

Contribution

This Project is open to contribution and collaboration. Feel free to connect.

Author

  • Main Maintainer: Michael Dubem Igbomezie

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

election_campaign-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

election_campaign-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file election_campaign-0.0.1.tar.gz.

File metadata

  • Download URL: election_campaign-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for election_campaign-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a951faf1d63af3100e33e9cc21b7074540ffc7dd9741dc910c1e9ec00f734fc8
MD5 52083b6af9c8df41c7880822e7c068fc
BLAKE2b-256 f1e084b727fb8d0d7c3d9bbe7b559d92af488c67a18c44c7d447920b522dadcb

See more details on using hashes here.

File details

Details for the file election_campaign-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for election_campaign-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d45c3ec51bbd7a8a94c8c1385b9cca0698bcf0b57a22a8f869e07185367250e
MD5 e3485165007e419b0e3bb2bab5b06d54
BLAKE2b-256 7fa56e590d66e5e263eaead68eaaedf58a089604ef8fa4bbba66f0b1c8866063

See more details on using hashes here.

Supported by

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