| Vendor | MindTouch |
| Type | Script |
| Categories | Misc |
| Requires | MindTouch Core 1.8.3 or later |
| Status | Stable |
| License | Free/Open Source |
| Manifest | http://scripts.mindtouch.com/sunlight-capitol.xml |
Install Script
Table of Contents
See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.
This extension retrieves the total number of times one word was used on a specific date
Parameters:
| Name | Type | Description |
| word | string | Word |
| month | string | Month (ex., 12 for the month of December) |
| day | string | Day of month |
| year | string | Year |
This extension retrieves the number of times daily one word was used over a month
Parameters:
| Name | Type | Description |
| word | string | Word |
| month | string | Month (ex., 12 for the month of December) |
| year | string | Year |
This extension retrieves the daily number of times one word was used in one month, formatted as a table
Parameters:
| Name | Type | Description |
| word | string | Word |
| month | string | Month (ex., 12 for the month of December) |
| year | string | Year |
This extension retrieves the number of times daily one word was used over a month
Parameters:
| Name | Type | Description |
| word | string | Word |
| year | string | Year |
This extension retrieves the daily number of times one word was used in one year, formatted as a table. The table generated here is quite large.
Parameters:
| Name | Type | Description |
| word | string | Word |
| year | string | Year |
This extension retrieves the number of times daily one word was used over a range of dates
Parameters:
| Name | Type | Description |
| word | string | Word |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
This extension retrieves the number of times daily one word was used over a range of dates, formatted as a sortable table
Parameters:
| Name | Type | Description |
| word | string | Word |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
This extension retrieves the number of times one word was used in one day, formatted as a table
Parameters:
| Name | Type | Description |
| word | string | Word |
| month | string | Month (ex., 12 for the month of December) |
| day | string | Day of month |
| year | string | Year |
This extension retrieves the top words used by a lawmaker for the latest date available
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for latest date available, formatted as a table
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single date
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| month | string | Month (as a number, e.g., 12 for December) |
| day | string | Day of month |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single date, formatted as a table
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| month | string | Month (as a number, e.g., 12 for December) |
| day | string | Day of month |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single single month
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| month | string | Month (as a number, e.g., 12 for December) |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single month, formatted as a table
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| month | string | Month (as a number, e.g., 12 for December) |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker over a range of dates
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
| words | string | Total number of top words to return |
TThis extension retrieves the top words used by a lawmaker over a range of dates, formatted as a sortable table
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single year
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| words | string | Total number of top words to return |
This extension retrieves the top words used by a lawmaker for a single year, formatted as a table
Parameters:
| Name | Type | Description |
| bioguideId | string | BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov) |
| year | string | Year |
| month | string | Month (as a number, e.g., 12 for December) |
| words | string | Total number of top words to return |
This extension retrieves the top words of the day for the last available day.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
This extension retrieves the top words of the day for a single day.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| month | string | Month (ex., 12 for the month of December) |
| day | string | Day of month |
| year | string | Year |
This extension retrieves the top words of the day for a single day, formatted as a table.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| month | string | Month (ex., 12 for the month of December) |
| day | string | Day of month |
| year | string | Year |
This extension retrieves the top words of the day for every day for a single month. Note: This may generate a VERY large number of results if the Top Words field is set too high.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| month | string | Month (ex., 12 for the month of December) |
| year | string | Year |
This extension retrieves the top words of the day for a each day of a single month, formatted as a table. Note: This may generate a VERY large table and take a long time to loadif the Top Words field is set too high.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| month | string | Month (ex., 12 for the month of December) |
| year | string | Year |
This extension retrieves the top words of the day for every day for a range of dates. Note: This may generate a VERY large data set if the Top Words field or range is set too high.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
This extension retrieves the top words of the day for a range of dates, formatted as a table. Note: This may generate a VERY large table if the Top Words field or range is set too high.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| sYear | string | Starting year |
| sMonth | string | Starting month (as a number, e.g., 12 for December) |
| sDay | string | Starting day of month |
| eYear | string | Ending year |
| eMonth | string | Ending month (as a number, e.g., 12 for December) |
| eDay | string | Ending day of month |
This extension retrieves the top words of the day for the last available day, formatted as a table.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
This extension retrieves the top words of the day for every day for a single year. This may return a VERY large number of results and take a long time to load if the Top Words field is set higher than 1.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| year | string | Year |
This extension retrieves the top words of the day for every day for a single year, formatted as a table. Note: This generates a VERY large table and takes a long time to load.
Parameters:
| Name | Type | Description |
| words | string | Number of top words |
| year | string | Year |
<extension>
<title>Capitol Words</title>
<copyright>Copyright (c) 2009, MindTouch, Inc.</copyright>
<namespace>capitol</namespace>
<function>
<name>WordOfDay</name>
<description>This extension retrieves the top words of the day for the last available day.</description>
<param name="words" type="string">Number of top words</param>
<return type="list">
var api = 'http://capitolwords.org/api/wod/latest' & ('top'.. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
[entry foreach var entry in wordResult]
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>WordOfDayTable</name>
<description>This extension retrieves the top words of the day for the last available day, formatted as a table.</description>
<param name="words" type="string">Number of top words</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = WordOfDay($words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word of the day for <eval:expr value="date.format(wordList[0].word_date, 'd')"/> (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="wordDaily.word"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>WordOfDayDate</name>
<description>This extension retrieves the top words of the day for a single day.</description>
<param name="words" type="string">Number of top words</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="day" type="string">Day of month</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/wod/' & $year & $month & $day & ('top'.. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
[entry foreach var entry in wordResult]
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>WordOfDayDateTable</name>
<description>This extension retrieves the top words of the day for a single day, formatted as a table.</description>
<param name="words" type="string">Number of top words</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="day" type="string">Day of month</param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = WordOfDayDate($words, $month, $day, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="wordDaily.word"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>WordOfDayMonth</name>
<description>This extension retrieves the top words of the day for every day for a single month. Note: This may generate a VERY large number of results if the Top Words field is set too high.</description>
<param name="words" type="string">Number of top words</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/wod/' & $year & $month & ('top'.. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList = [entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>WordOfDayMonthTable</name>
<description>This extension retrieves the top words of the day for a each day of a single month, formatted as a table. Note: This may generate a VERY large table and take a long time to loadif the Top Words field is set too high.</description>
<param name="words" type="string">Number of top words</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = WordOfDayMonth($words, $month, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="date.format(wordDaily.word_date, 'd')"/>
</td>
<td>
<eval:expr value="wordDaily.word"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>WordOfDayYear</name>
<description>This extension retrieves the top words of the day for every day for a single year. This may return a VERY large number of results and take a long time to load if the Top Words field is set higher than 1.</description>
<param name="words" type="string">Number of top words</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/wod/' & $year & ('top'.. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList = [entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>WordOfDayYearTable</name>
<description>This extension retrieves the top words of the day for every day for a single year, formatted as a table. Note: This generates a VERY large table and takes a long time to load.</description>
<param name="words" type="string">Number of top words</param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = WordOfDayYear($words, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="wordDaily.word_date"/>
</td>
<td>
<eval:expr value="wordDaily.word"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>WordOfDayRange</name>
<description>This extension retrieves the top words of the day for every day for a range of dates. Note: This may generate a VERY large data set if the Top Words field or range is set too high.</description>
<param name="words" type="string">Number of top words</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<return type="list">
var api = 'http://capitolwords.org/api/wod/' & $sYear & $sMonth & $sDay & $eYear & $eMonth & $eDay & ('top'.. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList = [entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>WordOfDayRangeTable</name>
<description>This extension retrieves the top words of the day for a range of dates, formatted as a table. Note: This may generate a VERY large table if the Top Words field or range is set too high.</description>
<param name="words" type="string">Number of top words</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = WordOfDayRange($words, $sYear, $sMonth, $sDay, $eYear, $eMonth, $eDay)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="wordDaily.word_date"/>
</td>
<td>
<eval:expr value="wordDaily.word"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>dailySum</name>
<description>This extension retrieves the total number of times one word was used on a specific date</description>
<param name="word" type="string">Word</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="day" type="string">Day of month</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/word/' & $word & '/' & $year & '/' & $month & '/' & $day & '/' & 'feed.json';
var wordResult = web.json(api);
if(#wordResult > 0){
[entry foreach var entry in wordResult]
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>dailySumTable</name>
<description>This extension retrieves the number of times one word was used in one day, formatted as a table</description>
<param name="word" type="string">Word</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="day" type="string">Day of month </param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = dailySum($word, $month, $day, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount for "<eval:expr value="$word"/>" (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="date.format(wordDaily.word_date, 'd')"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>dailySumForMonth</name>
<description>This extension retrieves the number of times daily one word was used over a month</description>
<param name="word" type="string">Word</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/word/' & $word & $year & $month & 'feed.json';
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>dailySumForYear</name>
<description>This extension retrieves the number of times daily one word was used over a month</description>
<param name="word" type="string">Word</param>
<param name="year" type="string">Year</param>
<return type="list">
var api = 'http://capitolwords.org/api/word/' & $word & '/' & $year & '/' & '/' & 'feed.json';
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>dailySumForMonthTable</name>
<description>This extension retrieves the daily number of times one word was used in one month, formatted as a table</description>
<param name="word" type="string">Word</param>
<param name="month" type="string">Month (ex., 12 for the month of December)</param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = dailySumForMonth($word, $month, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong># Wordcount for "<eval:expr value="$word"/>" (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="date.format(wordDaily.word_date, 'd')"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>dailySumForYearTable</name>
<description>This extension retrieves the daily number of times one word was used in one year, formatted as a table. The table generated here is quite large.</description>
<param name="word" type="string">Word</param>
<param name="year" type="string">Year</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = dailySumForYear($word, $year)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount for "<eval:expr value="$word"/>" (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordDaily in wordList">
<td>
<eval:expr value="date.format(wordDaily.word_date, 'd')"/>
</td>
<td>
<eval:expr value="wordDaily.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>dailySumRange</name>
<description>This extension retrieves the number of times daily one word was used over a range of dates</description>
<param name="word" type="string">Word</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<return type="list">
var api = 'http://capitolwords.org/api/word/' & $word & '/' & $sYear & '/' & $sMonth & '/' & $sDay & '/' & $eYear & '/' & $eMonth & '/' & $eDay & '/' & 'feed.json';
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>dailySumRangeTable</name>
<description>This extension retrieves the number of times daily one word was used over a range of dates, formatted as a sortable table</description>
<param name="word" type="string">Word</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = dailySumRange($word, $sYear, $sMonth, $sDay, $eYear, $eMonth, $eDay)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount "<eval:expr value="$word"/>" (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordRange in wordList">
<td>
<eval:expr value="date.format(wordRange.word_date, 'd')"/>
</td>
<td>
<eval:expr value="wordRange.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>lawmakerLatestTopWords</name>
<description>This extension retrieves the top words used by a lawmaker for the latest date available</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="words" type="string">Total number of top words to return</param>
<return type="list">
var api = 'http://capitolwords.org/api/lawmaker/' & $bioguideId & 'latest' & ('top' .. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>lawmakerLatestTopWordsTable</name>
<description>This extension retrieves the top words used by a lawmaker for latest date available, formatted as a table</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="words" type="string">Total number of top words to return</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = lawmakerLatestTopWords($bioguideId, $words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordLatest in wordList">
<td>
<eval:expr value="wordLatest.word"/>
</td>
<td>
<eval:expr value="wordLatest.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>lawmakerTopWordsDate</name>
<description>This extension retrieves the top words used by a lawmaker for a single date</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="month" type="string">Month (as a number, e.g., 12 for December)</param>
<param name="day" type="string">Day of month</param>
<param name="words" type="string">Total number of top words to return</param>
<return type="list">
var api = 'http://capitolwords.org/api/lawmaker/' & $bioguideId & $year & $month & $day & ('top' .. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>lawmakerTopWordsDateTable</name>
<description>This extension retrieves the top words used by a lawmaker for a single date, formatted as a table</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="month" type="string">Month (as a number, e.g., 12 for December)</param>
<param name="day" type="string">Day of month</param>
<param name="words" type="string">Total number of top words to return</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = lawmakerTopWordsDate($bioguideId, $year, $month, $day, $words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordMonthly in wordList">
<td>
<eval:expr value="wordMonthly.word"/>
</td>
<td>
<eval:expr value="wordMonthly.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>lawmakerTopWordsMonth</name>
<description>This extension retrieves the top words used by a lawmaker for a single single month</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="month" type="string">Month (as a number, e.g., 12 for December)</param>
<param name="words" type="string">Total number of top words to return</param>
<return type="list">
var api = 'http://capitolwords.org/api/lawmaker/' & $bioguideId & $year & $month & ('top' .. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>lawmakerTopWordsMonthTable</name>
<description>This extension retrieves the top words used by a lawmaker for a single month, formatted as a table</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="month" type="string">Month (as a number, e.g., 12 for December)</param>
<param name="words" type="string">Total number of top words to return</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = lawmakerTopWordsMonth($bioguideId, $year, $month, $words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordMonthly in wordList">
<td>
<eval:expr value="wordMonthly.word"/>
</td>
<td>
<eval:expr value="wordMonthly.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>lawmakerTopWordsYear</name>
<description>This extension retrieves the top words used by a lawmaker for a single year</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="words" type="string">Total number of top words to return</param>
<return type="list">
var api = 'http://capitolwords.org/api/lawmaker/' & $bioguideId & $year & ('top' .. $words .. '.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>lawmakerTopWordsYearTable</name>
<description>This extension retrieves the top words used by a lawmaker for a single year, formatted as a table</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="year" type="string">Year</param>
<param name="month" type="string">Month (as a number, e.g., 12 for December)</param>
<param name="words" type="string">Total number of top words to return</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = lawmakerTopWordsYear($bioguideId, $year, $words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Word (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordYearly in wordList">
<td>
<eval:expr value="wordYearly.word"/>
</td>
<td>
<eval:expr value="wordYearly.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
<function>
<name>lawmakerTopWordsRange</name>
<description>This extension retrieves the top words used by a lawmaker over a range of dates</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<param name="words" type="string">Total number of top words to return</param>
<return type="list">
var api = 'http://capitolwords.org/api/lawmaker/' & $bioguideId & '/' & $sYear & '/' & $sMonth & '/' & $sDay & '/' & $eYear & '/' & $eMonth & '/' & $eDay & ('top'..$words..'.json');
var wordResult = web.json(api);
if(#wordResult > 0){
var wordList=[entry foreach var entry in wordResult];
list.sort(wordList, "word_date");
} else {
{result:"Word not found."}
}
</return>
</function>
<function>
<name>lawmakerTopWordsRangeTable</name>
<description>TThis extension retrieves the top words used by a lawmaker over a range of dates, formatted as a sortable table</description>
<param name="bioguideId" type="string">BioGuide ID (shown in the URL returned from a profile search at http://bioguide.congress.gov)</param>
<param name="sYear" type="string">Starting year</param>
<param name="sMonth" type="string">Starting month (as a number, e.g., 12 for December)</param>
<param name="sDay" type="string">Starting day of month</param>
<param name="eYear" type="string">Ending year</param>
<param name="eMonth" type="string">Ending month (as a number, e.g., 12 for December)</param>
<param name="eDay" type="string">Ending day of month</param>
<param name="words" type="string">Total number of top words to return</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"/>
<eval:block value="var wordList = lawmakerTopWordsRange($bioguideId, $sYear, $sMonth, $sDay, $eYear, $eMonth, $eDay, $words)">
<table cellspacing="1" cellpadding="1" border="1" width="67%" style="table-layout: fixed;" class="sortable">
<tbody>
<tr>
<td style="background-color:#6699FF" align="center">
<strong>Date (click to sort)</strong>
</td>
<td style="background-color:#6699FF" align="center">
<strong>
Wordcount (click to sort)
</strong>
</td>
</tr>
<tr foreach="var wordRange in wordList">
<td>
<eval:expr value="wordRange.word "/>
</td>
<td>
<eval:expr value="wordRange.word_count"/>
</td>
</tr>
</tbody>
</table>
</eval:block>
</body>
</html>
</return>
</function>
</extension>
{{ capitol.WordOfDay{words: "5"} }}
[ { word : "health", word_count : 1082, word_date : "2010-03-16" }, { word : "care", word_count : 877, word_date : "2010-03-16" }, { word : "insurance", word_count : 392, word_date : "2010-03-16" }, { word : "reform", word_count : 378, word_date : "2010-03-16" }, { word : "percent", word_count : 255, word_date : "2010-03-16" } ]
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |