energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp
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 energy_star_certified_light_fixtures table in this repository, by referencing it like:

"energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp:latest"."energy_star_certified_light_fixtures"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "color_rendering_index_cri", -- The Color Rendering Index (CRI) of a light source represents the degree of color shift objects undergo when illuminated by the light source as compared with the color of those same objects when illuminated by a reference source of comparable color temperature. The ENERGY STAR specifications require a CRI of at least 80. Incandescent lighting has a CRI of 100. Early fluorescent lighting had CRIs in the 60s, resulting in unpleasant appearance of skin tones.
    "lighting_technology_used", -- The light source technology utilized by the fixture: compact fluorescent light (CFL), light emitting diode (LED), or halogen.
    "additional_model_information", -- This column includes for the qualified model or family, family members, additional model names, model numbers and other identifying information associated with a  product or family/series of products for sales and marketing purposes. Other identifying information includes, but is not limited to, SKUs, UPC codes, retail numbers, and/or descriptions of models included/not included in the reported Model Family.
    "total_input_power_watts", -- Total power consumed by the luminaire while in use.
    "can_size_s", -- The aperture size in inches for recessed downlight fixtures.
    "special_features_dimming_motion_sensing_etc", -- Most fixtures are designed to operate on an on/off switch. However, some fixtures have been designed with features to perform in specialized applications, such as with dimmers, three-way, or photo cell controls. Special features and compatibility with controls should be clearly marked on the product packaging, cut sheet or web site for the product. For light fixtures shipped with ENERGY STAR bulbs, the special features may apply to either the bulb or fixture.
    "model_number", -- A distinguishing, alphanumeric identifier, assigned to a product by the manufacturer or private labeler. The model number may include a wildcard that can be replaced by any letter or digit and still accurately capture what is covered by the model’s ENERGY STAR certification; an asterisk symbol (*) represents a letter, and a number symbol (#) a digit.
    "json_additional_model_information",
    "markets", -- Includes products sold in the U.S. and/or Canada and other ENERGY STAR partner countries.
    "light_source_connection_base_type", -- Light sources can be fully integrated into a light kit or removable by a consumer by custom connectors, wire nuts, pronged plugs like GU10, GU24 or sockets e.g. E26 known as the Edison base.
    "bulb_dimmability", -- Indicates if the lamp manufacturer claims that the lamp is dimmable and meets the requirements in the specification. 
    "indoor_outdoor",
    "brand_name", -- An identifier assigned by the manufacturer or private labeler to a product or family/series of products for sales and marketing purposes.
    "luminaire_efficacy", -- Measured outside the Fixture (lm/W): The quotient of the total luminous flux (lumens) emitted by the fixture over the total power input (Watts). It is expressed in lumens per watt (lm/W). For ENERGY STAR qualified fixtures this applies to light fixtures that are measured at the fixture level. This includes the following residential grade directional fixture types: line-voltage track lights, ceiling fan light kits, undercabinet and cove lighting, downlights, recessed, pendant or surface mounted and includes retrofit kits for existing recessed cans. This also includes the following LIMITED commercial fixture types: Accent lights such as line-voltage track lights, under cabinet task lights, portable desk task lights, downlights, recessed, pendant or surface-mounts BUT EXCLUDES typical commercial and industrial fixtures such as recessed troffers or linear forms (e.g. linear fluorescent pendants) typically used in office spaces.
    "pd_id", -- The ENERGY STAR Unique ID (ESUID) is a string of seven numbers EPA assigns to an ENERGY STAR model or set of models with unique performance characteristics. This ESUID is unique to both the model and product specification version and is assigned by EPA upon receipt of certification information from the certification body. Each row within the product list will have a unique ESUID. Developers may wish to use this ESUID to track information on certified models in their information systems. 
    "power_factor", -- The ratio of real power that flows to the light source versus the amount of power actually consumed.  A light fixture with a lower power factor will draw more current than a luminaire with a higher power factor for the same amount of power consumed.
    "light_sources_per_fixture",
    "can_rating_s", -- Indicates if a recessed downlight fixture is insulation contact (IC) rated or airtight.
    "bulb_model_number", -- An identifier assigned by the manufacturer or private labeler to a product or family/series of products for sales and marketing purposes.
    "notes", -- Indicates information on certification relevant to the consumer (i.e. product variations, unique issues concerning the model’s listing, etc.).
    "light_source_option_s",
    "energy_star_partner", -- An organization that signed a Partnership Agreement with EPA to manufacture or private label ENERGY STAR qualified products.
    "model_name", -- An identifier assigned by the manufacturer or private labeler to a product or family/series of products for sales and marketing purposes.
    "upc", -- UPC codes provided by partners for ENERGY STAR certified products. The brand, model name and model number continue to serve as the identifiers used to establish certification. The UPC code data below is intended to aid in identification of ENERGY STAR models. UPC code data is not provided for all certified models.
    "fixture_type",
    "light_output_lumens", -- The amount of light emitted by the light source or light fixture. Non directional fixtures (with removable light sources i.e. GU24 base bulbs) are measured at the light source and do not account for light lost from the fixture, while other fixtures meant to put light on a specific application (e.g. recessed downlights, under cabinet lights, accent lights, cove lights) are measured at the fixture level, only counting the light that escapes the fixture.
    "source_efficacy", -- The quotient of the total light source/lamp luminous flux (lumens) emitted over the total lamp power input (Watts). It is expressed in lm/W. For ENERGY STAR qualified fixtures this applies to light fixtures that are residential only, considered "non-directional" and have been measured at the light source level.
    "correlated_color_temperature_kelvin", -- A description of the "color" of a light source measured on the Kelvin (K) scale. CFLs are available in a range of color temperatures. Lower values (2700-3000K) mean the white light has a warmer (red-yellow) tone, while higher kelvin (4100-6500K) mean the white light has a cooler (bluer) tone.
    "light_source_life_hours", -- The expected useful life of the light source. Measured differently depending on the technology of the light source. For example, LED lighting expected useful life is based on the estimated point at which only 70% of the original light output remains, while for older technologies, like fluorescent and halogen, estimated useful life is based on the measured median sample life.
    "light_source_shape", -- For fixtures with removable light sources, the shape of the light source.
    "r9", -- The R9 value is not included in the Color Rendering Index (CRI) score but important for a light source to show red in objects with red in them, such as skin tones, natural wood tones, produce, meats, and artwork. Higher numbers represent more accurate rendering of red.
    "bulb_energy_star_partner", -- The ENERGY STAR Manufacturing Partner is the organization that has signed an ENERGY STAR Partnership Agreement and labels the model. This organization is typically the brand owner.	
    "bulb_light_appearance_kelvin", -- The appearance of the light is indicated by the Correlated Color Temperature (CCT) on the Kelvin scale. Lower Kelvin numbers like 2700-3000K mean the light appears more “warm” like incandescent; a CCT of 3500-4100K mean the light is whiter and higher temperatures like 5000-6500K would appear slightly bluer. Light appearance is indicated on bulb packaging.
    "energy_star_lamp_esuid", -- The ENERGY STAR Unique ID (ESUID) is a string of seven numbers EPA assigns to an ENERGY STAR model or set of models with unique performance characteristics. This ESUID is unique to both the model and product specification version and is assigned by EPA upon receipt of certification information from the certification body. Each row within the product list will have a unique ESUID. Developers may wish to use this ESUID to track information on certified models in their information systems.
    "alternate_energy_star_lamps_esuid", -- The ENERGY STAR Unique ID (ESUID) is a string of seven numbers EPA assigns to an ENERGY STAR model or set of models with unique performance characteristics. This ESUID is unique to both the model and product specification version and is assigned by EPA upon receipt of certification information from the certification body. Each row within the product list will have a unique ESUID. Developers may wish to use this ESUID to track information on certified models in their information systems.
    "date_available_on_market", -- The date that the model is available for purchase.
    "date_qualified", -- The date on which the product was confirmed to meet the ENERGY STAR specification.
    "energy_star_model_identifier" -- A unique string of characters assigned by certification bodies (CBs) to identify a model or set of models with the same performance characteristics. This identifier should remain the same for a model even if it is recertified to a new version of an ENERGY STAR specification. This string of characters is determined by CBs and is not the ENERGY STAR Unique ID assigned by EPA. 
FROM
    "energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp:latest"."energy_star_certified_light_fixtures"
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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp 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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp: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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp

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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp:latest

This will download all the objects for the latest tag of energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp 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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp: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 energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp: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, energystar-gov/energy-star-certified-light-fixtures-wyt9-72bp is just another Postgres schema.

Related Documentation:

Loading...