brla-gov/ebrp-tax-roll-myfc-nh6n
Icon for Socrata external plugin

Query the Data Delivery Network

Query the DDN

The easiest way to query any data on Splitgraph is via the "Data Delivery Network" (DDN). The DDN is a single endpoint that speaks the PostgreSQL wire protocol. Any Splitgraph user can connect to it at data.splitgraph.com:5432 and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.

For example, you can query the ebrp_tax_roll table in this repository, by referencing it like:

"brla-gov/ebrp-tax-roll-myfc-nh6n:latest"."ebrp_tax_roll"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "lot_no", -- Lot number of the tax parcel
    "taxpayer_addr_1", -- Mailing address of the taxpayer
    "taxpayer_addr_3", -- Mailing city, state and ZIP code of the taxpayer
    "units", -- Total number of structures attached to the tax parcel
    "vacant_lot_yn", -- Tax parcel with no structure attached
    "instrument_type", -- The transaction type of the last conveyance
    "conv_instrument_no", -- The conveyance instrument number or deed number associated with the last transaction of the parcel.
    "legal_description", -- Full description of the tax parcel which serves as the legal record
    "homestead_exempt_type", -- Determination whether the tax parcel qualifies to receive a homestead exemption
    "total_value", -- A percentage of the fair market value determined by the use of the property (commercial or residential)
    "taxpayer_val", -- The taxable amount for determining Parish taxes derived from the sum of land/acreage value and any improvement value minus any applicable homestead exemption
    "tax_year", -- Indicates the year of the Tax Roll
    "homestead_exemption", -- A homeowner is entitled to one homestead exemption which is a maximum of $7,500 of the assessed value
    "fair_market_val", -- The price at which the property would change hands between a willing buyer and a willing seller
    "transfer_date", -- Date of last conveyance
    "unit_type", -- The type of unit on the tax parcel which may include a structure, lot, or acreage
    "structure_use", -- Type of use of the structure including commercial, residential or not determined
    "parcel_address", -- The physical or situs address of the tax parcel
    "assessment_no_new", -- The unique property number assigned to each tax parcel. Also referred to as the Assessment Number.
    "assessment_type", -- The type of assessment used to determine taxes including personal property, real property, or public service.  Personal property includes machinery and equipment, fixtures, furniture, and other items that are movable in nature and utilized in a business.  Real property includes land and all buildings, structures, improvement to the land, and mobile homes.  Public service are government and other tax-exempted properties.
    "restora_tax_abatements", -- Determination whether the tax parcel has a property tax reduction for the renovation of existing structures from a qualifying historic or economic development district
    "assessment_no", -- The unique property number assigned to each tax parcel for the tax rolls prior to 2017.
    "taxpayer_addr_2", -- Mailing subaddress of the taxpayer
    "subdivision_name", -- Name of the subdivision in which the tax parcel is located
    "block_no", -- Block or square number in which the tax parcel is located
    "tax_freeze", -- Indicates if a tax freeze is applied to this record
    "assessment_status", -- Taxing status of the parcel including actual, adjudicated, exempt or restoration abatement (RS).  Actual property is real estate that can be taxed and all tax payments are up to date.  Property with unpaid taxes is adjudicated to the Parish of East Baton Rouge in accordance with the laws of the State of Louisiana.  Public service type property is exempted from taxation. Restoration abatement property is exempt from any new building renovations, but taxes are still owed for the original value.
    "taxpayer_name", -- Name of the taxpayer
    "ward_no" -- Ward number of the tax parcel
FROM
    "brla-gov/ebrp-tax-roll-myfc-nh6n:latest"."ebrp_tax_roll"
LIMIT 100;

Connecting to the DDN is easy. All you need is an existing SQL client that can connect to Postgres. As long as you have a SQL client ready, you'll be able to query brla-gov/ebrp-tax-roll-myfc-nh6n with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at data.brla.gov. When you querybrla-gov/ebrp-tax-roll-myfc-nh6n:latest on the DDN, we "mount" the repository using the socrata mount handler. The mount handler proxies your SQL query to the upstream data source, translating it from SQL to the relevant language (in this case SoQL).

We also cache query responses on the DDN, but we run the DDN on multiple nodes so a CACHE_HIT is only guaranteed for subsequent queries that land on the same node.

Query Your Local Engine

Install Splitgraph Locally
bash -c "$(curl -sL https://github.com/splitgraph/splitgraph/releases/latest/download/install.sh)"
 

Read the installation docs.

Splitgraph Cloud is built around Splitgraph Core (GitHub), which includes a local Splitgraph Engine packaged as a Docker image. Splitgraph Cloud is basically a scaled-up version of that local Engine. When you query the Data Delivery Network or the REST API, we mount the relevant datasets in an Engine on our servers and execute your query on it.

It's possible to run this engine locally. You'll need a Mac, Windows or Linux system to install sgr, and a Docker installation to run the engine. You don't need to know how to actually use Docker; sgrcan manage the image, container and volume for you.

There are a few ways to ingest data into the local engine.

For external repositories (like this repository), the Splitgraph Engine can "mount" upstream data sources by using sgr mount. This feature is built around Postgres Foreign Data Wrappers (FDW). You can write custom "mount handlers" for any upstream data source. For an example, we blogged about making a custom mount handler for HackerNews stories.

For hosted datasets, where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Mounting Data

This repository is an external repository. It's not hosted by Splitgraph. It is hosted by data.brla.gov, and Splitgraph indexes it. This means it is not an actual Splitgraph image, so you cannot use sgr clone to get the data. Instead, you can use the socrata adapter with the sgr mount command. Then, if you want, you can import the data and turn it into a Splitgraph image that others can clone.

First, install Splitgraph if you haven't already.

Mount the table with sgr mount

sgr mount socrata \
  "brla-gov/ebrp-tax-roll-myfc-nh6n" \
  --handler-options '{
    "domain": "data.brla.gov",
    "tables": {
        "ebrp_tax_roll": "myfc-nh6n"
    }
}'

That's it! Now you can query the data in the mounted table like any other Postgres table.

Query the data with your existing tools

Once you've loaded the data into your local Splitgraph engine, you can query it with any of your existing tools. As far as they're concerned, brla-gov/ebrp-tax-roll-myfc-nh6n is just another Postgres schema.