Skip to main content

Summarizing the Google Maps attributes of places within a specified area

Project description

Places Summarized

Build Status License: MIT

Places Summarized is a wrapper around Google Maps' Places API that summarizes the attributes of the locations nearby the specified coordinate.

Installation

Install Places Summarized via pip using

$ pip install places-summarized

Requirements

  • A Google Maps API key.
  • Python 3

Usage

This example uses a Google Maps API key.

from places_summarized.client import Client
import pprint

pp = pprint.PrettyPrinter(indent=4)


client = Client(key='your-key')
# Google Sydney offices
summary = client.places_summary(location=(-33.8670522, 151.1957362), radius=1000)
pp.pprint(summary.result())
# Print the ratings of the locations of type "point_of_interest."
# You can find the full list of types
# at: https://developers.google.com/places/web-service/supported_types
print(summary.ratings_by_type('point_of_interest'))
# Print the average price level of all the places
print(summary.average_price_level())

Or, you can test it without a key, using the TestClient.

from places_summarized.fake_client import FakeClient
import pprint

pp = pprint.PrettyPrinter(indent=4)

fclient = FakeClient()
summary = fclient.places_summary()
pp.pprint(summary.result())

Documentation

TO DO... :/ maybe you want to help?

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

places-summarized-0.0.8.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

places_summarized-0.0.8-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file places-summarized-0.0.8.tar.gz.

File metadata

  • Download URL: places-summarized-0.0.8.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.10

File hashes

Hashes for places-summarized-0.0.8.tar.gz
Algorithm Hash digest
SHA256 ec8d64af40e641214eb3cdbfc7d064b26a16448cfdc44a1481887981ef7cdddf
MD5 6aee9cdc352e3fca5f0ab03a8863100d
BLAKE2b-256 bf7ad7355727bb03003603beaae236e29e8c3cfef7a24febc97140450a5deda4

See more details on using hashes here.

File details

Details for the file places_summarized-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: places_summarized-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.10

File hashes

Hashes for places_summarized-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 950004381bc1e8b4f1e6618658c9a98d19023a7b4eff097deb30abd5e1d5c04a
MD5 cf7a4c8987842696df915d8b29a528cd
BLAKE2b-256 ad75e94d1285b3823da63a0f4547347afac0288fd2ccca7b6e093712d4644852

See more details on using hashes here.

Supported by

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