Choropleth.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <chapter id="VizBundleGeospatialMethods">
  5. <title><emphasis>Geospatial Methods</emphasis></title>
  6. <para>This section covers the Geospatial methods that create geographical
  7. map visualizations contained in the Choropleth module. These methods project
  8. data onto maps using shading to depict values.</para>
  9. <para></para>
  10. <sect1 id="VizUSStates">
  11. <title>USStates</title>
  12. <para><emphasis role="bold">Visualizer.Choropleth.USStates(<indexterm>
  13. <primary>Visualizer.Choropleth.USStates</primary>
  14. </indexterm><indexterm>
  15. <primary>Choropleth.USStates</primary>
  16. </indexterm><indexterm>
  17. <primary>USStates</primary>
  18. </indexterm>(</emphasis> <emphasis>id</emphasis> , <emphasis
  19. role="bold">[</emphasis>.<emphasis>dataSource</emphasis><emphasis
  20. role="bold">], [</emphasis><emphasis>outputName</emphasis><emphasis
  21. role="bold">], [</emphasis><emphasis>mappings</emphasis><emphasis
  22. role="bold">], [</emphasis><emphasis>properties</emphasis><emphasis
  23. role="bold">]);</emphasis></para>
  24. <para></para>
  25. <informaltable colsep="1" frame="all" rowsep="1">
  26. <tgroup cols="2">
  27. <colspec colwidth="80.50pt" />
  28. <colspec />
  29. <tbody>
  30. <row>
  31. <entry><emphasis>id</emphasis></entry>
  32. <entry>Unique identifier for the visualization</entry>
  33. </row>
  34. <row>
  35. <entry><emphasis>dataSource</emphasis></entry>
  36. <entry>Location of the result set (WUID, Logical File, Roxie Query
  37. result), defaults to the current WU</entry>
  38. </row>
  39. <row>
  40. <entry><emphasis>outputName</emphasis></entry>
  41. <entry>Result set name (ignored for Logical Files)</entry>
  42. </row>
  43. <row>
  44. <entry><emphasis>mappings</emphasis></entry>
  45. <entry>Maps Column Name &lt;--&gt; field ID</entry>
  46. </row>
  47. <row>
  48. <entry><emphasis>filteredBy</emphasis></entry>
  49. <entry>Filter condition (also useful for widget
  50. interactions)</entry>
  51. </row>
  52. <row>
  53. <entry><emphasis>properties</emphasis></entry>
  54. <entry>Dermatology properties. See <link
  55. linkend="VizDermProp">Dermatology Properties</link></entry>
  56. </row>
  57. <row>
  58. <entry>Return:<emphasis></emphasis></entry>
  59. <entry>A "meta" output describing the visualization.</entry>
  60. </row>
  61. </tbody>
  62. </tgroup>
  63. </informaltable>
  64. <para>The <emphasis role="bold">USStates </emphasis>visualization method
  65. depicts data on a map of U.S. States.</para>
  66. <para>Example:</para>
  67. <programlisting format="linespecific">IMPORT Visualizer;
  68. _usStates := DATASET([ {'AL', 4779736},
  69. {'AK', 710231},
  70. {'AZ', 6392017},
  71. {'AR', 2915918}],
  72. {STRING State, INTEGER4 weight});
  73. data_usStates := OUTPUT(_usStates, NAMED('choro_usStates'));
  74. data_usStates;
  75. viz_usstates := Visualizer.Choropleth.USStates('usStates',, 'choro_usStates');
  76. viz_usstates;
  77. </programlisting>
  78. </sect1>
  79. <sect1 id="VizUSCounties">
  80. <title>USCounties</title>
  81. <para><emphasis role="bold">Visualizer.Choropleth.USCounties(<indexterm>
  82. <primary>Visualizer.Choropleth.USCounties</primary>
  83. </indexterm><indexterm>
  84. <primary>Choropleth.USCounties</primary>
  85. </indexterm><indexterm>
  86. <primary>USCounties</primary>
  87. </indexterm>(</emphasis> <emphasis>id</emphasis> , <emphasis
  88. role="bold">[</emphasis>.<emphasis>dataSource</emphasis><emphasis
  89. role="bold">], [</emphasis><emphasis>outputName</emphasis><emphasis
  90. role="bold">], [</emphasis><emphasis>mappings</emphasis><emphasis
  91. role="bold">], [</emphasis><emphasis>properties</emphasis><emphasis
  92. role="bold">]);</emphasis></para>
  93. <para></para>
  94. <informaltable colsep="1" frame="all" rowsep="1">
  95. <tgroup cols="2">
  96. <colspec colwidth="80.50pt" />
  97. <colspec />
  98. <tbody>
  99. <row>
  100. <entry><emphasis>id</emphasis></entry>
  101. <entry>Unique identifier for the visualization</entry>
  102. </row>
  103. <row>
  104. <entry><emphasis>dataSource</emphasis></entry>
  105. <entry>Location of the result set (WUID, Logical File, Roxie Query
  106. result), defaults to the current WU</entry>
  107. </row>
  108. <row>
  109. <entry><emphasis>outputName</emphasis></entry>
  110. <entry>Result set name (ignored for Logical Files)</entry>
  111. </row>
  112. <row>
  113. <entry><emphasis>mappings</emphasis></entry>
  114. <entry>Maps Column Name &lt;--&gt; field ID</entry>
  115. </row>
  116. <row>
  117. <entry><emphasis>filteredBy</emphasis></entry>
  118. <entry>Filter condition (also useful for widget
  119. interactions)</entry>
  120. </row>
  121. <row>
  122. <entry><emphasis>properties</emphasis></entry>
  123. <entry>Dermatology properties. See <link
  124. linkend="VizDermProp">Dermatology Properties</link></entry>
  125. </row>
  126. <row>
  127. <entry>Return:<emphasis></emphasis></entry>
  128. <entry>A "meta" output describing the visualization.</entry>
  129. </row>
  130. </tbody>
  131. </tgroup>
  132. </informaltable>
  133. <para>The <emphasis role="bold">USCounties </emphasis>visualization method
  134. depicts data on a map of U.S. counties.</para>
  135. <para>Example:</para>
  136. <programlisting format="linespecific">IMPORT Visualizer;
  137. _usCounties := DATASET([ {1073,29.946185501741},
  138. {1097,0.79566003616637},
  139. {1117,1.5223596574691},
  140. {4005,27.311773623042}],
  141. {STRING FIPS, INTEGER4 weight});
  142. data_usCounties := OUTPUT(_usCounties, NAMED('choro_usCounties'));
  143. data_usCounties;
  144. viz_uscounties := Visualizer.Choropleth.USCounties('usCounties',, 'choro_usCounties');
  145. viz_uscounties;
  146. </programlisting>
  147. </sect1>
  148. <sect1 id="VizEuro">
  149. <title>Euro</title>
  150. <para><emphasis role="bold">Visualizer.Choropleth.Euro(<indexterm>
  151. <primary>Visualizer.Choropleth.Euro</primary>
  152. </indexterm><indexterm>
  153. <primary>Choropleth.Euro</primary>
  154. </indexterm><indexterm>
  155. <primary>Euro</primary>
  156. </indexterm><indexterm>
  157. <primary>EuroGB</primary>
  158. </indexterm><indexterm>
  159. <primary>EuroIE</primary>
  160. </indexterm>(</emphasis> <emphasis>id</emphasis> ,<emphasis
  161. role="bold">[</emphasis><emphasis>region</emphasis><emphasis
  162. role="bold">]</emphasis> <emphasis
  163. role="bold">[</emphasis>.<emphasis>dataSource</emphasis><emphasis
  164. role="bold">], [</emphasis><emphasis>outputName</emphasis><emphasis
  165. role="bold">], [</emphasis><emphasis>mappings</emphasis><emphasis
  166. role="bold">], [</emphasis><emphasis>properties</emphasis><emphasis
  167. role="bold">]);</emphasis></para>
  168. <para></para>
  169. <informaltable colsep="1" frame="all" rowsep="1">
  170. <tgroup cols="2">
  171. <colspec colwidth="80.50pt" />
  172. <colspec />
  173. <tbody>
  174. <row>
  175. <entry><emphasis>id</emphasis></entry>
  176. <entry>Unique identifier for the visualization</entry>
  177. </row>
  178. <row>
  179. <entry><emphasis>region</emphasis></entry>
  180. <entry>2 Letter European Code (GB, IE, etc.)</entry>
  181. </row>
  182. <row>
  183. <entry><emphasis>dataSource</emphasis></entry>
  184. <entry>Location of the result set (WUID, Logical File, Roxie Query
  185. result), defaults to the current WU</entry>
  186. </row>
  187. <row>
  188. <entry><emphasis>outputName</emphasis></entry>
  189. <entry>Result set name (ignored for Logical Files)</entry>
  190. </row>
  191. <row>
  192. <entry><emphasis>mappings</emphasis></entry>
  193. <entry>Maps Column Name &lt;--&gt; field ID</entry>
  194. </row>
  195. <row>
  196. <entry><emphasis>filteredBy</emphasis></entry>
  197. <entry>Filter condition (also useful for widget
  198. interactions)</entry>
  199. </row>
  200. <row>
  201. <entry><emphasis>properties</emphasis></entry>
  202. <entry>Dermatology properties. See <link
  203. linkend="VizDermProp">Dermatology Properties</link></entry>
  204. </row>
  205. <row>
  206. <entry>Return:<emphasis></emphasis></entry>
  207. <entry>A "meta" output describing the visualization.</entry>
  208. </row>
  209. </tbody>
  210. </tgroup>
  211. </informaltable>
  212. <para>The <emphasis role="bold">Euro </emphasis>visualization method
  213. depicts data on a map of Europe. The <emphasis
  214. role="bold">EuroIE</emphasis> and <emphasis role="bold">EuroGB</emphasis>
  215. methods are provided as examples. To create other country-specific
  216. methods, merely use the Euro method and provide the two-character country
  217. code in the _region parameter.</para>
  218. <para>Example:</para>
  219. <programlisting format="linespecific">IMPORT Visualizer;
  220. _euroIE := DATASET([ {'Carlow', '27431', '27181', '54612'},
  221. {'Dublin City', '257303', '270309', '527612'},
  222. {'Kilkenny', '47788', '47631', '95419'},
  223. {'Cork', '198658', '201144', '399802'}],
  224. {STRING region, INTEGER4 males, INTEGER4 females, INTEGER4 total});
  225. data_euroIE := OUTPUT(_euroIE, NAMED('choro_euroIE'));
  226. data_euroIE;
  227. viz_euroIE := Visualizer.Choropleth.EuroIE('euroIE',, 'choro_euroIE', DATASET([{'County', 'region'}, {'Population', 'total'}], Visualizer.KeyValueDef),, DATASET([{'paletteID', 'Greens'}], Visualizer.KeyValueDef));
  228. viz_euroIE;</programlisting>
  229. </sect1>
  230. </chapter>