Difference between revisions of "Template:EZPolicySearchIncentives"

From Open Energy Information

(Fix techdsc and policy type to allow for multiple values selected)
(Fix technology and incentive type search terms, add download button. Also uses Concept:EZFeed Biomass and Biogas Policies)
Line 5: Line 5:
 
Edit the page to see the template text.
 
Edit the page to see the template text.
 
[[Category:Incentive Templates]]
 
[[Category:Incentive Templates]]
</noinclude><includeonly>{{#if:{{{place|}}} | {{#vardefine:newplace |{{#replace:{{{place|}}}|, |{{!}}{{!}} }} }}
+
</noinclude><includeonly>{{#if:{{{place|}}} | {{#vardefine:newplace |{{#replace:{{{place|}}}|, |{{!}}{{!}} }} }}   {{#vardefine:theplace | [[Place::{{#var:newplace}}]] }} {{#vardefine:theplace2 | [[Place.PartOf::{{#var:newplace}}]] }} }} {{#ifeq:{{{place|}}}|United States| {{#vardefine:theplace2 | [[Place::{{#var:newplace}}]] }} | }} {{#if:{{{activeflag|}}} | {{#vardefine:theactiveflag | [[Incentive/Active::{{{activeflag|}}}]]}}|}} {{#if:{{{implsector|}}} | {{#vardefine:theimplsector|[[Incentive/ImplSector::{{{implsector|}}}]]}} }} {{#if:{{{policytype|}}} | {{#vardefine:thetype1|[[Incentive/Type::{{#replace:{{{policytype|}}}|,|{{!}}{{!}} }}]]}} }} {{#vardefine:thetype2|{{#replace:{{#var:thetype1}}|Bond Program|~*Bond* }}}} {{#vardefine:thetype3|{{#replace:{{#var:thetype2}}|Corporate Tax Incentive|~*Corporate*}} }} {{#vardefine:thetype4|{{#replace:{{#var:thetype3}}|Grant Program|~*Grant*}} }}  {{#vardefine:thetype5|{{#replace:{{#var:thetype4}}|Loan Program|~*Loan*}} }}  {{#vardefine:thetype6|{{#replace:{{#var:thetype5}}|Personal Tax Incentives|~*Personal*}} }}  {{#vardefine:thetype7|{{#replace:{{#var:thetype6}}|Rebate Program|~*Rebate*}} }} {{#vardefine:thetype8|{{#replace:{{#var:thetype7}}|Renewables Portfolio Standards and Goals|~*Portfolio Standard*}} }} {{#vardefine:thetype9|{{#replace:{{#var:thetype8}}|Siting and Permitting|~*Permitting*}} }}
{{#vardefine:theplace | [[Place::{{#var:newplace}}]] }} {{#vardefine:theplace2 | [[Place.PartOf::{{#var:newplace}}]] }} }}
+
{{#vardefine:thetype|{{#var:thetype9}}}}     {{#if:{{{thesubcategory|}}} | {{#vardefine:thecategory|[[Incentive/PolicyType::{{{thesubcategory|}}}]]}} }}   {{#ifeq:{{{techdsc|}}}|Biomass and Biogas|{{#vardefine:td1|[[Concept:EZFeed Biomass and Biogas Policies]]}}|{{#vardefine:td1|[[Incentive/TechDsc::{{{techdsc|}}}]] }} }}  {{#vardefine:td2|{{#replace:{{#var:td1}}|Concentrating Solar Power|~*Concentrating Solar* {{!}}{{!}} ~*Solar Thermal Electric*}}}}  {{#vardefine:td3|{{#replace:{{#var:td2}}|Energy Storage|Energy Storage {{!}}{{!}} Hydrogen {{!}}{{!}} Microturbines {{!}}{{!}} ~Compressed* {{!}}{{!}} ~Pumped*}}}}  {{#vardefine:td4|{{#replace:{{#var:td3}}|Fuel Cells|~*Fuel* }}}}  {{#vardefine:td5|{{#replace:{{#var:td4}}|Solar Photovoltaic|~*Photovoltaic* {{!}}{{!}} ~*PV* }}}}  {{#vardefine:td6|{{#replace:{{#var:td5}}|Wind energy|Wind {{!}}{{!}} Small  Wind {{!}}{{!}} Wind Energy{{!}}{{!}}Wind energy }}}}  {{#vardefine:thetechdesc|{{#var:td6}}}}
{{#ifeq:{{{place|}}}|United States| {{#vardefine:theplace2 | [[Place::{{#var:newplace}}]] }} | }}
+
 
{{#if:{{{activeflag|}}} | {{#vardefine:theactiveflag | [[Incentive/Active::{{{activeflag|}}}]]}}|}}
 
{{#if:{{{implsector|}}} | {{#vardefine:theimplsector|[[Incentive/ImplSector::{{{implsector|}}}]]}} }}
 
{{#if:{{{techdsc|}}} | {{#vardefine:thetechdsc|[[Incentive/TechDsc::{{#replace:{{{techdsc|}}}|,|{{!}}{{!}} }}]]}} }}
 
{{#if:{{{policytype|}}} | {{#vardefine:thetype|[[Incentive/Type::{{#replace:{{{policytype|}}}|,|{{!}}{{!}} }}]]}} }}
 
{{#if:{{{thesubcategory|}}} | {{#vardefine:thecategory|[[Incentive/PolicyType::{{{thesubcategory|}}}]]}} }}
 
 
'''Policy Programs'''
 
'''Policy Programs'''
 +
<div class="right" style="margin-bottom:20px;">'''Download EZFeed Policies''' {{EZFeedCsvDownloadCount|techType=[[EZFeed/Relevant::Yes]] {{#var:thetechdesc}} {{#var:theplace}} {{#var:theactiveflag}} {{#var:theimplsector}}  {{#var:thetype}}{{#var:thecategory}}  OR [[Category:Incentive Programs]][[EZFeed/Relevant::Yes]]{{#var:thetechdesc}} {{#var:theplace2}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}} {{#var:thecategory}}  }}
 +
</div><div class="clear">
 +
{{#vardefine:nbrincentives|{{#ask: [[Category:Incentive Programs]][[EZFeed/Relevant::Yes]] {{#var:thetechdesc}} {{#var:theplace}} {{#var:theactiveflag}} {{#var:theimplsector}}  {{#var:thetype}}{{#var:thecategory}}  OR [[Category:Incentive Programs]][[EZFeed/Relevant::Yes]]{{#var:thetechdesc}} {{#var:theplace2}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}} {{#var:thecategory}}  |format=count}} }}{{#ifeq:{{#var:nbrincentives}}|0| |{{#!:{{#var:nbrincentives}} policies available. A maximum 500 are shown in the table below.  If needed, click the "further results" to see more results. }} }}
  
{{#vardefine:nbrincentives|{{#ask: [[Category:EZFeed Policies]] {{#var:theplace}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetechdsc}} {{#var:thetype}}{{#var:thecategory}} OR [[Category:EZFeed Policies]] {{#var:theplace2}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}} {{#var:thetechdsc}}{{#var:thecategory}}|format=count}} }}{{#ifeq:{{#var:nbrincentives}}|0| |{{#!:{{#var:nbrincentives}} policies available. A maximum 500 are shown in the table below.  If needed, click the "further results" to see more results. }} }}
+
{{#ask: [[Category:Incentive Programs]][[EZFeed/Relevant::Yes]] {{#var:thetechdesc}} {{#var:theplace}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}}{{#var:thecategory}}
 +
OR [[Category:Incentive Programs]][[EZFeed/Relevant::Yes]]{{#var:thetechdesc}} {{#var:theplace2}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}} {{#var:thecategory}}  
  
{{#ask: [[Category:EZFeed Policies]] {{#var:theplace}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetechdsc}} {{#var:thetype}}{{#var:thecategory}} 
 
OR [[Category:EZFeed Policies]] {{#var:theplace2}} {{#var:theactiveflag}} {{#var:theimplsector}} {{#var:thetype}} {{#var:thetechdsc}}{{#var:thecategory}} 
 
 
|?Place=State/Territory
 
|?Place=State/Territory
 
|?Incentive/Type=Policy Type
 
|?Incentive/Type=Policy Type

Revision as of 06:29, 13 February 2015

This is the 'EZPolicySearchIncentives' template. It should be used with the Form:EZPolicySearchIncentives which is used via the special 'run query' page.

Edit the page to see the template text.