Skip to main content

Intake driver for Civis platform

Project description

intake-civis

This is an intake data source for data warehoused in the Civis platform.

Requirements

civis-python
intake

Installation

intake-civis is published on PyPI. You can install it by running the following in your terminal:

pip install intake-civis

Usage

You can specify Civis schemas and tables using a YAML intake catalog:

sources:
  # An entry representing a catalog for an entire schema.
  postgres:
    driver: "civis_cat"
    args:
      database: "City of Los Angeles - Postgres"
      schema: "transporatation"
  # An entry representing a single table
  bike_trips:
    driver: "civis"
    args:
      database: "City of Los Angeles - Postgres"
      table: "transportation.bike_trips"

For more examples, see this demo notebook.

Geospatial support

Both Redshift and Postgres support geospatial values. We can tell the source to read in a table/query as a GeoDataFrame by passing in a string or list of strings in the geometry argument. You can also pass in a GeoPandas-compatible crs argument to set the coordinate reference system for the GeoDataFrame. When more than one column is provided, the primary geometry column for the GeoDataFrame is assumed to be the first in the list.

The CivisCatalog object attempts to automatically determine the geometry columns and coordinate reference systems from the database table metadata.

Ibis support

TODO

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

intake-civis-0.1.0.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

intake_civis-0.1.0-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

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