Git Product home page Git Product logo

parsons's Introduction

Parsons

Downloads PyPI - Python Version PyPI CircleCI

A Python package that provides a simple interface to a variety of utilities and tools frequently used by progressive organizations, political and issue campaigns, activists, and other allied actors.

Parsons offers simplified interactions with these services and tools, including a growing number of CRMs, organizing tools, cloud compute service providers, as well as tools to easily transform data in transit.

This project is maintained by The Movement Cooperative and is named after Lucy Parsons. The Movement Cooperative is a member-led organization focused on providing data, tools, and strategic support for the progressive community.

Parsons is only compatible with Python 3.7-10

Table of Contents

License and Usage

Usage of Parsons is governed by a modified Apache License with author attribution statement.

Documentation

To gain a full understanding of all of the features of Parsons, please review the Parsons documentation.

Installation

PYPI

You can install the most recent release by running: pip install parsons[all]

Install from Github

To access the most recent code base that may contain features not yet included in the latest release, download this repository and then run python setup.py develop.

Docker Container

We have a Parsons Docker container hosted on DockerHub for each release of Parsons, including the latest.

Quickstart

For this Quickstart, we are looking to generate a list of voters with cell phones using a dummy data file. We use the assert statements to verify that the data has been loaded correctly.

# Download the Census data from the Parsons GitHub repository
from parsons import GitHub
github = GitHub()
dummy_data = github.download_table('move-coop/parsons', 'docs/quickstart.csv')
assert dummy_data.num_rows == 1000  # Check that we got all 1,000 people

# Filter down to people with cell phones
people_with_cell_phones = dummy_data.select_rows(lambda row: row['is_cell'] == 'true')
assert people_with_cell_phones.num_rows == 498  # Check that we filtered down to our 498 people

# Extract only the columns we need (first name, last name, phone number)
people_with_cell_phones = people_with_cell_phones.cut('first_name', 'last_name', 'phone_number')
assert people_with_cell_phones.columns == ['first_name', 'last_name', 'phone_number'] # Check columns

# Output the list to a local CSV file
filename = people_with_cell_phones.to_csv()  # filename will be the path to the local CSV file

# In order to upload data to a Google Sheet, you will need to set the GOOGLE_DRIVE_CREDENTIALS
# environment variable
from parsons import GoogleSheets
sheets = GoogleSheets()
sheet_id = sheets.create_spreadsheet('Voter Cell Phones')
sheets.append_to_sheet(sheet_id, people_with_cell_phones)

Community

We hope to foster a strong and robust community of individuals who use and contribute to further development. Individuals are encouraged to submit issues with bugs, suggestions and feature requests. Here are the guidelines and best practices for contributing to Parsons.

You can also stay up to date by joining the Parsons Slack group, an active community of Parsons contributors and progressive data engineers. For an invite, just reach out to [email protected]!

parsons's People

Contributors

jburchard avatar rgriff23 avatar dannyboy15 avatar ydamit avatar shaunagm avatar sorenspicknall avatar schuyler1d avatar chrisc avatar cmc333333 avatar crayolakat avatar dependabot[bot] avatar bzupnick avatar jason94 avatar mkwoods927 avatar pjsier avatar tomiiwa avatar tonywhittaker avatar ehrenfoss avatar tmc-automation avatar shduttacheezit avatar tiburona avatar andrewrook avatar bxjw avatar coreyhaines avatar davidpablocohn avatar joemcl avatar shepardjma avatar scmora avatar neverett avatar mirabuck avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.