Difference between revisions of "Template:Extrasolar planet counts/doc"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
(→‎Data source: update doc)
imported>Primefac
(moving some more stuff to the /numbers subpage)
Line 14: Line 14:
  
 
The first parameter specifies the data value to be inserted:
 
The first parameter specifies the data value to be inserted:
*'''asof''' - the date as of which the data is valid.  With '''asof''' only, a second parameter can be specified indicating the format of the date to be inserted. [[Template:date]] is used, and the format codes are defined there.
+
*'''asof''' - the date as of which the data is valid.  With '''asof''' only, a second parameter can be specified indicating the format of the date to be inserted. {{t|date}} is used, and the format codes are defined there.
 
*'''planet_count''' - the number of extrasolar planets
 
*'''planet_count''' - the number of extrasolar planets
 
*'''system_count''' - the number of systems with extrasolar planets
 
*'''system_count''' - the number of systems with extrasolar planets
Line 24: Line 24:
 
These numbers are sourced from the frequently updated [[Extrasolar Planets Encyclopaedia|Interactive Extra-solar Planets Catalog]], [http://exoplanet.eu/catalog.php located here].
 
These numbers are sourced from the frequently updated [[Extrasolar Planets Encyclopaedia|Interactive Extra-solar Planets Catalog]], [http://exoplanet.eu/catalog.php located here].
  
'''[[Template:Extrasolar planet counts/numbers|Click here to update the data.]]'''
+
'''[[Template:Extrasolar planet counts/numbers|Click here to update the data.]]''' The numbers can be updated by locating the switch statement in the template source code, and updating the four data items therein.
 
 
The numbers can be updated by locating the switch statement in the template source code, and updating the four data
 
items therein.  The switch, with the data items to be updated in bold, currently looks like this:
 
-->{{#switch: {{{1|}}}
 
  | asof = {{date|'''{{Extrasolar planet counts|asof}}'''|{{{2|}}}}}
 
  | planet_count = '''{{Extrasolar planet counts|planet_count}}'''
 
  | system_count = '''{{Extrasolar planet counts|system_count}}'''
 
  | multiplanetsystem_count = '''{{Extrasolar planet counts|multiplanetsystem_count}}'''
 
  | ref = <nowiki><ref name="Exoplanet Catalog (epc)">{{cite web|last1=Schneider |first1=J. |title=Interactive Extra-solar Planets Catalog |url=http://exoplanet.eu/catalog.php|work=[[The Extrasolar Planets Encyclopedia]]}}</ref></nowiki>
 
  | full = As of &#123;&#123;date|'''{{Extrasolar planet counts|asof}}'''|&#123;&#123;&#123;2|&#125;&#125;&#125;&#125;&#125;, there are '''{{Extrasolar planet counts|planet_count}}''' [[exoplanet|planets]] in '''{{Extrasolar planet counts|system_count}}''' [[planetary system|systems]], with '''{{Extrasolar planet counts|multiplanetsystem_count}}''' [[List of multiplanetary systems|systems]] having more than one [[planet]].<nowiki><ref name="Exoplanet Catalog (epc)">{{cite web|last1=Schneider |first1=J. |title=Interactive Extra-solar Planets Catalog |url=http://exoplanet.eu/catalog.php|work=[[The Extrasolar Planets Encyclopedia]]}}</ref></nowiki>
 
  | #default = &#123;&#123;error|invalid parameter&#125;&#125; &#125;&#125;&lt;!--
 
 
 
Verify that you are looking at the Extrasolar Planets Encyclopaedia "Catalog" page, and that the filter is set for "Confirmed/All planets". Note that the "Confirmed" is hidden unless the pulldown list is displayed.  Immediately above the list of planets, a total line similar to the following will be displayed:
 
 
 
Showing '''{{Extrasolar planet counts|system_count}}''' planetary systems / '''{{Extrasolar planet counts|planet_count}}''' planets / '''{{Extrasolar planet counts|multiplanetsystem_count}}''' multiple planet systems
 
 
 
In the switch statement, '''asof''' should be set to the current date, and '''system_count''', '''planet_count'''
 
and '''multiplanetsystem_count''' should be copied from the "Showing..." line displayed above.
 
  
 
Historical note: Prior to 10-Jul-2012, the Extrasolar Planets Encyclopaedia displayed this data in a different format, and a different procedure was used to update this template.  See a version of this documentation page from before that date for the older procedure.
 
Historical note: Prior to 10-Jul-2012, the Extrasolar Planets Encyclopaedia displayed this data in a different format, and a different procedure was used to update this template.  See a version of this documentation page from before that date for the older procedure.

Revision as of 15:15, 1 October 2017

Purpose

The {{Extrasolar planet counts}} template centralizes the counts of verified extrasolar planets and systems. These are used in several articles, and sometimes more than once. Placing them here allows them all to be updated at once, and avoids the problem of only one count in an article getting updated. This template should not be subst'd.

Syntax

The template is used as follows:

{{Extrasolar planet counts|parameter}}

The first parameter specifies the data value to be inserted:

  • asof - the date as of which the data is valid. With asof only, a second parameter can be specified indicating the format of the date to be inserted. Template:T is used, and the format codes are defined there.
  • planet_count - the number of extrasolar planets
  • system_count - the number of systems with extrasolar planets
  • multiplanetsystem_count - the number of systems with more than one extrasolar planet
  • ref - adds a reference to http://exoplanet.eu/catalog/
  • full - if the entire message displayed on this template is desired

Data source

These numbers are sourced from the frequently updated Interactive Extra-solar Planets Catalog, located here.

Click here to update the data. The numbers can be updated by locating the switch statement in the template source code, and updating the four data items therein.

Historical note: Prior to 10-Jul-2012, the Extrasolar Planets Encyclopaedia displayed this data in a different format, and a different procedure was used to update this template. See a version of this documentation page from before that date for the older procedure.