ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4
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 excelsior_jobs_program_tax_credit_beginning table in this repository, by referencing it like:

"ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4:latest"."excelsior_jobs_program_tax_credit_beginning"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "calendar_year", -- Calendar year in which the tax return was filed
    "jobs_credit_component", -- The dollar amount awarded to an entity for each new job created. For participants accepted into the program on or before April 1, 2011, the value of the credit cannot exceed $5,000 per new job and is computed on marginal wages plus benefit basis as follows: • 5 percent of wages plus benefits of $50,000 or less; • 4 percent of wages plus benefits between $50,001 and $75,000; and • 1.33 percent of wages plus benefits over $75,000. For taxpayers accepted into the program after April 1, 2011, the credit is equal to the gross wages multiplied by 6.85 percent.
    "real_property_tax_component", -- The dollar amount awarded to an entity based on the amount of real property taxes. The credit equals 50 percent of the property taxes assessed and paid in the year immediately prior to a taxpayer’s application to the EJP and is gradually phased out. For taxpayers accepted into the program on or before April 1, 2011, the credit is phased down ten percent a year over five years. For those accepted into the program after April 1, 2011, the credit declines by 5 percent a year over ten years.
    "tax_year", -- Tax year of the credit claim; typically the year preceding the calendar year, although extensions and fiscal years may result in claims for a tax year being filed several calendar years later
    "research_and_development_component", -- The dollar amount awarded to an entity based on research and development expenditure in New York. The credit is a percentage of the portion of the taxpayer’s federal research and development credit pertaining to expenditures attributable to New York. Eligible expenditures are defined in section 41 of the Internal Revenue Code. For taxpayers accepted into the program on or before April 1, 2011, the percentage is ten percent. For those accepted into the program after April 1, 2011, the percentage is fifty percent, subject to a limit of three percent of qualified research and development expenditures attributable to New York activity.
    "total_credit", -- The sum of the jobs credit, investment credit, research and development credit, the real property tax credit, and the child care services tax credit.
    "investment_credit_component", -- The dollar amount awarded to an entity for qualified investments. EJP participants may claim a credit equal to two percent of the cost of qualified investments in New York. The credit is increased to five percent of the cost of qualified investments for green projects and, beginning in tax year 2022, the construction of childcare service facilities. 
    "child_care_services_tax_credit_component", -- The dollar amount awarded to an entity based on child care services expenditures in New York State. Beginning in tax year 2022, the credit is equal to six percent of child care services expenditures for the operation, sponsorship, or direct financial support of a child care services program. Existing participants in the Excelsior Jobs Program are allowed to receive this credit component.
    "taxpayer_name", -- Name of the entity earning the credit
    "entity_type", -- Type of business, either a corporation or a partnership
    "notes", -- 1/ Information from amended return that supersedes a previously filed return; original filing removed from public report.  2/ Credit component amounts are those from a combined return that include credit component data from two or more projects from members of the group.
    "recapture_of_previous_tax_credit", -- The amount of all credits previously allowed and claimed prior to a revocation of a certificate of eligibility by Empire State Development. Recaptured Credit must be added back to tax for the tax year in which the revocation becomes final.
    "net_total_credit" -- The total amount of Excelsior Jobs Program Credit after subtracting the recapture amount from the total credit amount.
FROM
    "ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4:latest"."excelsior_jobs_program_tax_credit_beginning"
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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4 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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4: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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4

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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4:latest

This will download all the objects for the latest tag of ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4 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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4: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 ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4: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, ny-gov/excelsior-jobs-program-tax-credit-beginning-huva-pmc4 is just another Postgres schema.

Related Documentation:

Loading...