cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e
Loading...

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 revised_notice_of_property_value_rnopv table in this repository, by referencing it like:

"cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest"."revised_notice_of_property_value_rnopv"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "original_exemption", -- The amount of AV excluded from the calculation of tax. May be different from Actual and Transitional. 
    "borough",
    "rc_1", -- A	Alteration NP	New Building in Progress S	Gain or Loss to Street	E1	Economics 	 X	Exempt Value Change other than fully exempt restored  B	Building In Progress Last Year	 D	Demolition 	 T	Transfer to or from REUC	 E4	Economics  (Taxpayer Initiated Change)	 P	Physical Change N	New Building 	 AP	Apportionment	 E0	Sales  E	Fully Exempt and is now restored to taxable status 	 M	MV only change 
    "tax_class", -- "Every property in the city is assigned to one of four tax classes (Classes 1, 2, 3, and 4), based on the use of the property. " 
    "country", -- The property's country. 
    "revised_transitional_assessed_value", -- The changed original transitional assessed value 
    "rc2", -- A	Alteration NP	New Building in Progress S	Gain or Loss to Street	E1	Economics 	 X	Exempt Value Change other than fully exempt restored  B	Building In Progress Last Year	 D	Demolition 	 T	Transfer to or from REUC	 E4	Economics  (Taxpayer Initiated Change)	 P	Physical Change N	New Building 	 AP	Apportionment	 E0	Sales  E	Fully Exempt and is now restored to taxable status 	 M	MV only change 
    "address_1", -- "The street address of the property as listed on the Sales File. Coop sales include the apartment number in the address field. " 
    "ease", -- "An easement is a right, such as a right of way, which allows an entity to make limited use of another’s real property. For example: MTA railroad tracks that run across a portion of another property. " 
    "boro", -- The name of the borough in which the property is located. 
    "revised_assessed_value", -- The changed original assessed value 
    "longitude",
    "lot", -- A Tax Lot is a subdivision of a Tax Block and represents the property unique location. 
    "original_market_value",
    "original_taxable_value", -- Assessed Valuation. The financial worth assigned to property by taxing authorities that is used as a basis or factor against which the tax rate is applied. 
    "revised_taxable_value", -- The changed original taxable value 
    "rc5", -- A	Alteration NP	New Building in Progress S	Gain or Loss to Street	E1	Economics 	 X	Exempt Value Change other than fully exempt restored  B	Building In Progress Last Year	 D	Demolition 	 T	Transfer to or from REUC	 E4	Economics  (Taxpayer Initiated Change)	 P	Physical Change N	New Building 	 AP	Apportionment	 E0	Sales  E	Fully Exempt and is now restored to taxable status 	 M	MV only change 
    "rc4", -- A	Alteration NP	New Building in Progress S	Gain or Loss to Street	E1	Economics 	 X	Exempt Value Change other than fully exempt restored  B	Building In Progress Last Year	 D	Demolition 	 T	Transfer to or from REUC	 E4	Economics  (Taxpayer Initiated Change)	 P	Physical Change N	New Building 	 AP	Apportionment	 E0	Sales  E	Fully Exempt and is now restored to taxable status 	 M	MV only change 
    "postcode",
    "latitude",
    "community_council",
    "community_board",
    "bin",
    "original_assessed_value", -- The most probable price that a property should command in a competitive and open market. The Department of Finance uses one of three approaches to value a property: sales, cost, or income. New York State law requires Finance to value cooperative and residential condominium buildings as if they were rental apartment buildings, using the income approach. Financeʼs value is not based on the sales price of individual co-op or condo units but on an estimate of the rent that would be charged for the units if they were rental apartments. 
    "block", -- "A Tax Block is a sub-division of the borough on which real properties are located. The Department of Finance uses a Borough-Block-Lot classification to label all real property in the City. “Whereas” addresses describe the street location of a property, the block and lot distinguishes one unit of real property from another, such as the different condominiums in a single building. Also, block and lots are not subject to name changes based on which side of the parcel the building puts its entrance on. " 
    "original_transitional_assessed_value", -- Transitional Assessed Value = for properties with 5-year 20% phase-ins, the Assessed Value as limited by phase-ins.
    "address_3", -- "The street address of the property as listed on the Sales File. Coop sales include the apartment number in the address field. " 
    "address_2", -- "The street address of the property as listed on the Sales File. Coop sales include the apartment number in the address field. " 
    "city_state_zip", -- The property’s city, state and zip. 
    "original_transitional_exemption", -- The amount of AV excluded from the calculation of tax, but limited by phase-in. 
    "revised_transitional_exemption", -- The changed original transitional exemption 
    "mailed_date", -- Date when letter was mailed 
    "bld_class", -- "The Building Classification is used to describe a property’s constructive use. The first position of the Building Class is a letter that is used to describe a general class of properties (for example “A” signifies one-family homes, “O” signifies office buildings. “R” signifies condominiums). The second position, a number, adds more specific information about the property’s use or construction style (using our previous examples “A0” is a Cape Cod style one family home, “O4” is a tower type office building and “R5” is a commercial condominium unit). The term Building Class used by the Department of Finance is interchangeable with the term Building Code used by the Department of Buildings" 
    "nta",
    "revised_market_value", -- The changed  original market value  
    "revised_exemption", -- The changed original exemption 
    "rc3", -- A	Alteration NP	New Building in Progress S	Gain or Loss to Street	E1	Economics 	 X	Exempt Value Change other than fully exempt restored  B	Building In Progress Last Year	 D	Demolition 	 T	Transfer to or from REUC	 E4	Economics  (Taxpayer Initiated Change)	 P	Physical Change N	New Building 	 AP	Apportionment	 E0	Sales  E	Fully Exempt and is now restored to taxable status 	 M	MV only change 
    "census_tract",
    "bbl"
FROM
    "cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest"."revised_notice_of_property_value_rnopv"
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 cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e with SQL in under 60 seconds.

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, 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 (like this repository), where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Cloning Data

Because cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest is a Splitgraph Image, you can clone the data from Spltgraph Cloud to your local engine, where you can query it like any other Postgres database, using any of your existing tools.

First, install Splitgraph if you haven't already.

Clone the metadata with sgr clone

This will be quick, and does not download the actual data.

sgr clone cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e

Checkout the data

Once you've cloned the data, you need to "checkout" the tag that you want. For example, to checkout the latest tag:

sgr checkout cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest

This will download all the objects for the latest tag of cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e and load them into the Splitgraph Engine. Depending on your connection speed and the size of the data, you will need to wait for the checkout to complete. Once it's complete, you will be able to query the data like you would any other Postgres database.

Alternatively, use "layered checkout" to avoid downloading all the data

The data in cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest is 0 bytes. If this is too big to download all at once, or perhaps you only need to query a subset of it, you can use a layered checkout.:

sgr checkout --layered cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e:latest

This will not download all the data, but it will create a schema comprised of foreign tables, that you can query as you would any other data. Splitgraph will lazily download the required objects as you query the data. In some cases, this might be faster or more efficient than a regular checkout.

Read the layered querying documentation to learn about when and why you might want to use layered queries.

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, cityofnewyork-us/revised-notice-of-property-value-rnopv-8vgb-zm6e is just another Postgres schema.

Related Documentation:

Loading...