brla-gov/property-information-re5c-hrw9
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 property_information table in this repository, by referencing it like:

"brla-gov/property-information-re5c-hrw9:latest"."property_information"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "council_dist_no", -- Metropolitan Council District number (1-12) 
    "existing_land_use", -- The predominant current day land use character of the lot; definitions can be found on https://city.brla.gov/gis/ExistingLandUse.asp
    "business_name", -- The official business name as recorded in the Occupational License  
    "lot_id", -- The 9 or 10 digit identifier for each lot (property) record
    "address_point_id", -- The unique identifier for each address point record 
    "future_land_use", -- The planned land use for the lot as designated by the City-Parish comprehensive plan; definitions can be found on https://city.brla.gov/gis/FutureLandUse.asp
    "geo_location", -- Geographic location of the address consisting of Latitude and Longitude coordinates
    "area_meas_acres", -- Area of the lot measured in acres 
    "historic_landmark", -- National or Local historic landmark designation 
    "voting_district", -- 19th Judicial District ward and voting precinct number 
    "school_district", -- East Baton Rouge, Baker, Central, and Zachary school system district numbers 
    "dotd_map", -- An area number designated by the Louisiana Department of Transportation and Development 
    "block_group", -- US Census block group number 
    "plss", -- The township, range, and section that the lot is bound by 
    "block_num", -- For inner city lots that are part of a larger block or square 
    "lot_num", -- The lot number as designated on the final plat for each property record
    "pla_dist", -- The City-Parish Planning Commission district number (1-16)
    "business_naics_code", -- The designated North American Industrial Classification Standard (NAICS) Code 
    "business_id", -- The unique identifier for each business name record 
    "property_info", -- Tract or property name for lots not located in a subdivision 
    "full_address", -- Complete address number and street name
    "st_name", -- Official name of the street 
    "st_prefix_type", -- Type of street (Avenue, Boulevard, Rue, etc) 
    "address_no_complete", -- The complete street address number assigned to the property record
    "design_level", -- A range of development standards that promote and encourage consistency in the quality of design throughout the City-Parish, defined by intensity of development and preferred urban form 
    "subdivision", -- The official subdivision name 
    "geo_location_state",
    "zoning_type", -- A designation approved by the Metropolitan Council that regulates the development of property; definitions can be found on https://city.brla.gov/gis/zoning.asp
    "subd_id", -- The unique identifier for each subdivision record 
    "zip", -- The US Postal Service ZIP code  
    "lot_location", -- Jurisdiction of the lot including Baker, Baton Rouge, Central, Zachary, or unincorporated area (EBRP) 
    "st_suffix_type", -- Type of street (Drive, Road, Highway, Boulevard, etc) 
    "address_id", -- The identifier for the attribute information for each address record 
    "census_tract", -- US Census tract number
    "udod_name", -- Urban design overlay district as designated by the Unified Development Code 
    "city", -- The US Postal Service community name 
    "enterprise_zone", -- Enterprise Zone name as designated by the State of Louisiana and City-Parish 
    "fire_district", -- The fire protection district name 
    "st_suffix_dir", -- Directional suffix (N, S, E, W) of the street 
    "industrial_area", -- One of the six (6) Industrial Areas in EBRP as designated in the Plan of Government
    "redevelopment_district", -- Old Town redevelopment district as designated by the Unified Development Code 
    "historic_district", -- National or Local historic district designation 
    "police_district", -- Baton Rouge Police Department district number 
    "lb_map", -- The retired City-Parish lot and block map number (1-267) 
    "tax_section", -- Division of the Parish wards for property recordation purposes
    "st_ext", -- "EXT" is used when a street is designated as an extension of the original 
    "geo_location_zip",
    "geo_location_city",
    "geo_location_address",
    "st_prefix_dir", -- Directional prefix (N, S, E, W) of the street 
    ":@computed_region_hfgy_t898",
    ":@computed_region_8tu6_j4iw",
    ":@computed_region_idcr_7zcb",
    "udd_name", -- Urban design district as designated by the Unified Development Code 
    "ward_number", -- Division of the Parish for property legal description purposes
    "sub_area", -- Planning Districts are divided into 3-5 subareas 
    "economic_dev_zone" -- One of the four sites designated in EBRP 
FROM
    "brla-gov/property-information-re5c-hrw9:latest"."property_information"
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/property-information-re5c-hrw9 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/property-information-re5c-hrw9: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/property-information-re5c-hrw9" \
  --handler-options '{
    "domain": "data.brla.gov",
    "tables": {
        "property_information": "re5c-hrw9"
    }
}'

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/property-information-re5c-hrw9 is just another Postgres schema.