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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for intake_civis-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9f6a37d8c6a99b4ee75f0ace7d3a20d89268845585f76da41627f046cf8c3b4 |
|
MD5 | a8775ed6f56919565e63dc7190cfb2a1 |
|
BLAKE2b-256 | b9c128d889907ef4767fdfee333cc7420a683bfd73cbac1ba1232a3dacb9581a |