Skip to content

Commit

Permalink
Merge pull request #21 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Update master
  • Loading branch information
jackykemboi authored Sep 4, 2018
2 parents 5ce8b6a + 65eca66 commit 8f93ca8
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 6 deletions.
1 change: 0 additions & 1 deletion instat/dlgClimaticMaps.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions instat/dlgClimaticMaps.vb
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ Public Class dlgClimaticMaps
End Sub

Private Sub cmdMapOptions_Click(sender As Object, e As EventArgs) Handles cmdPlotOptions.Click
'sdgPlots.SetRCode(clsGGplotOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsAesFunction, clsNewXScalecontinuousFunction:=clsXScaleContinuousFunction, clsNewYScalecontinuousFunction:=clsYScaleContinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, ucrNewBaseSelector:=ucrSelectorClimaticMaps, bReset:=bResetSubdialog)
'sdgPlots.ShowDialog()
'bResetSubdialog = False
sdgPlots.SetRCode(clsGGplotOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewGlobalAesFunction:=clsSfAesFunction, clsNewXScalecontinuousFunction:=clsXScaleContinuousFunction, clsNewYScalecontinuousFunction:=clsYScaleContinuousFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabFunction, clsNewLabsFunction:=clsLabsFunction, clsNewFacetFunction:=clsRFacetFunction, ucrNewBaseSelector:=ucrSelectorOutline, bReset:=bResetSubdialog)
sdgPlots.ShowDialog()
bResetSubdialog = False
End Sub

Private Sub SetRCodeForControls(bReset As Boolean)
Expand Down
9 changes: 9 additions & 0 deletions instat/instat.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@
<Compile Include="dlgExportToCMSAF.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="sdgMapOption.Designer.vb">
<DependentUpon>sdgMapOption.vb</DependentUpon>
</Compile>
<Compile Include="sdgMapOption.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgMergeAdditionalData.Designer.vb">
<DependentUpon>dlgMergeAdditionalData.vb</DependentUpon>
</Compile>
Expand Down Expand Up @@ -2673,6 +2679,9 @@
<EmbeddedResource Include="dlgMakeDate.sw-KE.resx">
<DependentUpon>dlgMakeDate.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="sdgMapOption.resx">
<DependentUpon>sdgMapOption.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgMerge.sw-KE.resx">
<DependentUpon>dlgMerge.vb</DependentUpon>
</EmbeddedResource>
Expand Down
48 changes: 48 additions & 0 deletions instat/sdgMapOption.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 168 additions & 0 deletions instat/sdgMapOption.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ucrBase.Location" type="System.Drawing.Point, System.Drawing">
<value>185, 208</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ucrBase.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="ucrBase.Size" type="System.Drawing.Size, System.Drawing">
<value>213, 46</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ucrBase.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;ucrBase.Name" xml:space="preserve">
<value>ucrBase</value>
</data>
<data name="&gt;&gt;ucrBase.Type" xml:space="preserve">
<value>instat.ucrButtonsSubdialogue, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;ucrBase.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;ucrBase.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>9, 20</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>684, 279</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Map Options </value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>sdgMapOption</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
3 changes: 3 additions & 0 deletions instat/sdgMapOption.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Public Class sdgMapOption

End Class
26 changes: 24 additions & 2 deletions instat/ucrGeom.vb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.

Imports instat

Public Class ucrGeom
'Ucr Geom is used to select the geom that will be used for a specific graph/layer. It is used in ucrGeomListWithAes and ucrLayerParameters both ucr's of sdgLayerOptions.
'It stores the definition of the different Geoms, using instances of clsGeom, including their R names, the relevant/available parameters and their description (type of values, values, default, ...).
Expand Down Expand Up @@ -151,6 +149,7 @@ Public Class ucrGeom
Dim clsgeom_ribbon As New Geoms
Dim clsgeom_rug As New Geoms
Dim clsgeom_segment As New Geoms
Dim clsgeom_sf As New Geoms
Dim clsgeom_smooth As New Geoms
Dim clsgeom_spoke As New Geoms
Dim clsgeom_step As New Geoms
Expand Down Expand Up @@ -1188,6 +1187,29 @@ Public Class ucrGeom

lstAllGeoms.Add(clsgeom_segment)

clsgeom_sf.SetGeomName("geom_sf")
clsgeom_sf.AddAesParameter("geometry", strIncludedDataTypes:={"numeric"})
clsgeom_sf.AddAesParameter("shape", strIncludedDataTypes:={"factor"})
clsgeom_sf.AddAesParameter("colour", strIncludedDataTypes:={"numeric", "factor"})
clsgeom_sf.AddAesParameter("size", strIncludedDataTypes:={"numeric"})
clsgeom_sf.AddAesParameter("fill", strIncludedDataTypes:={"factor"})
'Adding layer parameters
clsgeom_sf.AddLayerParameter("geom", "list", Chr(34) & "area" & Chr(34), lstParameterStrings:={Chr(34) & "area" & Chr(34), Chr(34) & "bar" & Chr(34), Chr(34) & "blank" & Chr(34), Chr(34) & "col" & Chr(34), Chr(34) & "contour" & Chr(34), Chr(34) & "crossbar" & Chr(34), Chr(34) & "density" & Chr(34), Chr(34) & "density_2d" & Chr(34), Chr(34) & "density2d" & Chr(34), Chr(34) & "errorbar" & Chr(34), Chr(34) & "hex" & Chr(34), Chr(34) & "line" & Chr(34), Chr(34) & "linerange" & Chr(34), Chr(34) & "path" & Chr(34), Chr(34) & "point" & Chr(34), Chr(34) & "pointrange" & Chr(34), Chr(34) & "polygon" & Chr(34), Chr(34) & "quantile" & Chr(34), Chr(34) & "raster" & Chr(34), Chr(34) & "ribbon" & Chr(34), Chr(34) & "rug" & Chr(34), Chr(34) & "smooth" & Chr(34), Chr(34) & "step" & Chr(34), Chr(34) & "tile" & Chr(34)})
clsgeom_sf.AddLayerParameter("position", "list", Chr(34) & "identity" & Chr(34), lstParameterStrings:={Chr(34) & "stack" & Chr(34), Chr(34) & "fill" & Chr(34), Chr(34) & "dodge" & Chr(34), Chr(34) & "jitter" & Chr(34), Chr(34) & "identity" & Chr(34)})
clsgeom_sf.AddLayerParameter("colour", "colour", Chr(34) & "black" & Chr(34))
clsgeom_sf.AddLayerParameter("alpha", "numeric", "1", lstParameterStrings:={2, 0, 1})
clsgeom_sf.AddLayerParameter("size", "numeric", "3", lstParameterStrings:={1, 1})
clsgeom_sf.AddLayerParameter("expand", "list", "TRUE", lstParameterStrings:={"TRUE", "FALSE"})
clsgeom_sf.AddLayerParameter("show.legend", "list", "TRUE", lstParameterStrings:={"NA", "TRUE", "FALSE"})
clsgeom_sf.AddLayerParameter("na.rm", "list", "FALSE", lstParameterStrings:={"TRUE", "FALSE"})
clsgeom_sf.AddLayerParameter("inherit.aes", "list", "TRUE", lstParameterStrings:={"TRUE", "FALSE"})
clsgeom_sf.AddLayerParameter("crs", "numeric", "1")
'TODO we are not sure what this can take. Needs to be looked at more closely
'clsgeom_sf.AddLayerParameter("datum", "numeric", "1")
clsgeom_sf.AddLayerParameter("ndiscr", "list", "NULL", lstParameterStrings:={"NA", "NULL"})
lstAllGeoms.Add(clsgeom_sf)


clsgeom_smooth.strGeomName = "geom_smooth"
' mandatory
clsgeom_smooth.AddAesParameter("x", bIsMandatory:=True)
Expand Down

0 comments on commit 8f93ca8

Please sign in to comment.