VB.Net Demographics Examples

From CDYNE Wiki
Jump to navigation Jump to search

GetIncomeHouseValueByAddress

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetIncomeHouseValueByAddress.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New DemographixQuery
 9         Dim IAHV As New IncomeAndHouseValue
10 
11         IAHV = DQ.GetIncomeHouseValueByAddress("505 Independence Parkway","Chesapeake", "VA", "23320", "YOUR LICENSE KEY")
12 
13         Console.WriteLine("Error: " & IAHV.ErrorString & Environment.NewLine &
14                         "Place ID: " & IAHV.PlaceInformation.PlaceID & Environment.NewLine &
15                         "State Abbreviation: " & IAHV.PlaceInformation.StateAbbrev & Environment.NewLine &
16                         "Median Income: " & IAHV.MedianIncome & Environment.NewLine &
17                         "Median House Value: " & IAHV.MedianHouseValue)
18         Console.ReadLine()
19 
20     End Sub
21 
22 End Module

GetLocationInformationByAddress

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetLocationInformationByAddress.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim SI As New SummaryInformation
10 
11         SI = DQ.GetLocationInformationByAddress("505 Independence Parkway","Chesapeake", "VA", "23320", "YOUR LICENSE KEY")
12 
13         Console.WriteLine("Error: " & SI.ErrorString & Environment.NewLine &
14                         "Place ID: " & SI.PlaceInformation.PlaceID & Environment.NewLine &
15                         "State Abbreviation: " & SI.PlaceInformation.StateAbbrev & Environment.NewLine &
16                         "Median Age: " & SI.MedianAge & Environment.NewLine &
17                         "Median Income: " & SI.MedianIncome & Environment.NewLine &
18                         "Median Rooms in House: " & SI.MedianRoomsInHouse & Environment.NewLine &
19                         "Median House Value: " & SI.MedianHouseValue & Environment.NewLine &
20                         "Median Vehicles per Household: " & SI.MedianVehicles & Environment.NewLine &
21                         "Percentage Never Married: " & SI.MaritalStatusPercentages.NeverMarried & Environment.NewLine &
22                         "Percentage Married: " & SI.MaritalStatusPercentages.Married & Environment.NewLine &
23                         "Percentage Separated: " & SI.MaritalStatusPercentages.Separated & Environment.NewLine &
24                         "Percentage Married (Other): " & SI.MaritalStatusPercentages.MarriedOther & Environment.NewLine &
25                         "Percentage Widowed: " & SI.MaritalStatusPercentages.Widowed & Environment.NewLine &
26                         "Percentage Divorced: " & SI.MaritalStatusPercentages.Divorced & Environment.NewLine &
27                         "Percentage Asian: " & SI.RacePercentages.Asian & Environment.NewLine &
28                         "Percentage Black: " & SI.RacePercentages.Black & Environment.NewLine &
29                         "Percentage Inidan: " & SI.RacePercentages.Indian & Environment.NewLine &
30                         "Percentage Mixed: " & SI.RacePercentages.Mixed & Environment.NewLine &
31                         "Percentage Native Hawaiian: " & SI.RacePercentages.NativeHawaiian & Environment.NewLine &
32                         "Percentage Other: " & SI.RacePercentages.Other & Environment.NewLine &
33                         "Percentage White: " & SI.RacePercentages.White & Environment.NewLine &
34                         "Percentage Female: " & SI.GenderPercentages.Female & Environment.NewLine &
35                         "Percentage Male: " & SI.GenderPercentages.Male)
36         Console.ReadLine()
37 
38     End Sub
39 
40 End Module

GetLocationInformationByLatitudeLongitude

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetLocationInformationByLatitudeLongitude.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim SI As New SummaryInformation
10 
11         SI = DQ.GetLocationInformationByLatitudeLongitude(36.761560, -76.259964, "YOUR LICENSE KEY")
12 
13         Console.WriteLine("Error: " & SI.ErrorString & Environment.NewLine &
14                         "Place ID: " & SI.PlaceInformation.PlaceID & Environment.NewLine &
15                         "State Abbreviation: " & SI.PlaceInformation.StateAbbrev & Environment.NewLine &
16                         "Median Age: " & SI.MedianAge & Environment.NewLine &
17                         "Median Income: " & SI.MedianIncome & Environment.NewLine &
18                         "Median Rooms in House: " & SI.MedianRoomsInHouse & Environment.NewLine &
19                         "Median House Value: " & SI.MedianHouseValue & Environment.NewLine &
20                         "Median Vehicles per Household: " & SI.MedianVehicles & Environment.NewLine &
21                         "Percentage Never Married: " & SI.MaritalStatusPercentages.NeverMarried & Environment.NewLine &
22                         "Percentage Married: " & SI.MaritalStatusPercentages.Married & Environment.NewLine &
23                         "Percentage Separated: " & SI.MaritalStatusPercentages.Separated & Environment.NewLine &
24                         "Percentage Married (Other): " & SI.MaritalStatusPercentages.MarriedOther & Environment.NewLine &
25                         "Percentage Widowed: " & SI.MaritalStatusPercentages.Widowed & Environment.NewLine &
26                         "Percentage Divorced: " & SI.MaritalStatusPercentages.Divorced & Environment.NewLine &
27                         "Percentage Asian: " & SI.RacePercentages.Asian & Environment.NewLine &
28                         "Percentage Black: " & SI.RacePercentages.Black & Environment.NewLine &
29                         "Percentage Inidan: " & SI.RacePercentages.Indian & Environment.NewLine &
30                         "Percentage Mixed: " & SI.RacePercentages.Mixed & Environment.NewLine &
31                         "Percentage Native Hawaiian: " & SI.RacePercentages.NativeHawaiian & Environment.NewLine &
32                         "Percentage Other: " & SI.RacePercentages.Other & Environment.NewLine &
33                         "Percentage White: " & SI.RacePercentages.White & Environment.NewLine &
34                         "Percentage Female: " & SI.GenderPercentages.Female & Environment.NewLine &
35                         "Percentage Male: " & SI.GenderPercentages.Male)
36         Console.ReadLine()
37 
38     End Sub
39 
40 End Module

GetNeighborhoodAgeGenderFemaleInDataSet

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodAgeGenderFemaleInDataSet.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodAgeGenderFemaleInDataSet("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodAgeGenderMaleInDataSet

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodAgeGenderMaleInDataSet.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodAgeGenderMaleInDataSet("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodAgeInDataSet

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodAgeInDataSet.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodAgeInDataSet("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodLinguisticIsolation

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodLinguisticIsolation.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New WSDL.CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodLinguisticIsolation("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodRealtyValueInDataSet

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodRealtyValueInDataSet.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet()
10 
11         CIWDS = DQ.GetNeighborhoodRealtyValueInDataSet("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodVehiclesPerHouseholdInDataset

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodVehiclesPerHouseholdInDS.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New WSDL.CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodVehiclesPerHouseholdInDataset("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " + CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetNeighborhoodYearStructuresBuilt

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetNeighborhoodYearStructuresBuilt.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim CIWDS As New CensusInfoWithDataSet
10 
11         CIWDS = DQ.GetNeighborhoodYearStructuresBuilt("VA", "0018466")
12 
13         Console.WriteLine("Error: " & CIWDS.ErrorString & Environment.NewLine &
14                         "Data: " & CIWDS.CensusDataSet.GetXml())
15         Console.ReadLine()
16 
17     End Sub
18 
19 End Module

GetPlaceIDbyAddress

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetPlaceIDbyAddress.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New DemographixQuery
 9         Dim PI As New PlaceInfo
10 
11         PI = DQ.GetPlaceIDbyAddress("505 Independence Parkway","Chesapeake", "VA", "23320", "YOUR LICENSE KEY")
12 
13         Console.WriteLine("Error: " & PI.ErrorString & Environment.NewLine &
14                         "Place ID: " & PI.PlaceInformation.PlaceID & Environment.NewLine &
15                         "State Abbreviation: " & PI.PlaceInformation.StateAbbrev & Environment.NewLine &
16                         "Rural: " & PI.PlaceInformation.Rural)
17         Console.ReadLine()
18 
19     End Sub
20 
21 End Module

GetPlaceIDbyCensusTractAndBlock

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetPlaceIDbyCensusTractAndBlock.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New DemographixQuery
 9         Dim PI As New PlaceInfo
10 
11         PI = DQ.GetPlaceIDbyCensusTractAndBlock("VA", "0209.01", "2001", "YOUR LICENSE KEY")
12 
13         Console.WriteLine("Error: " & PI.ErrorString & Environment.NewLine &
14                         "PlaceID: " & PI.PlaceInformation.PlaceID)
15         Console.WriteLine()
16 
17     End Sub
18 
19 End Module

GetSummaryInformationByPlaceID

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetSummaryInformationByPlaceID.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim SI As New SummaryInformation
10 
11         SI = DQ.GetSummaryInformationByPlaceID("VA", "0018466")
12 
13         Console.WriteLine("Error: " & SI.ErrorString & Environment.NewLine &
14                         "Place ID: " & SI.PlaceInformation.PlaceID & Environment.NewLine &
15                         "State Abbreviation: " & SI.PlaceInformation.StateAbbrev & Environment.NewLine &
16                         "Median Age: " & SI.MedianAge & Environment.NewLine &
17                         "Median Income: " & SI.MedianIncome & Environment.NewLine &
18                         "Median Rooms in House: " & SI.MedianRoomsInHouse & Environment.NewLine &
19                         "Median House Value: " & SI.MedianHouseValue & Environment.NewLine &
20                         "Median Vehicles per Household: " & SI.MedianVehicles & Environment.NewLine &
21                         "Percentage Never Married: " & SI.MaritalStatusPercentages.NeverMarried & Environment.NewLine &
22                         "Percentage Married: " & SI.MaritalStatusPercentages.Married & Environment.NewLine &
23                         "Percentage Separated: " & SI.MaritalStatusPercentages.Separated & Environment.NewLine &
24                         "Percentage Married (Other): " & SI.MaritalStatusPercentages.MarriedOther & Environment.NewLine &
25                         "Percentage Widowed: " & SI.MaritalStatusPercentages.Widowed & Environment.NewLine &
26                         "Percentage Divorced: " & SI.MaritalStatusPercentages.Divorced & Environment.NewLine &
27                         "Percentage Asian: " & SI.RacePercentages.Asian & Environment.NewLine &
28                         "Percentage Black: " & SI.RacePercentages.Black & Environment.NewLine &
29                         "Percentage Inidan: " & SI.RacePercentages.Indian & Environment.NewLine &
30                         "Percentage Mixed: " & SI.RacePercentages.Mixed & Environment.NewLine &
31                         "Percentage Native Hawaiian: " & SI.RacePercentages.NativeHawaiian & Environment.NewLine &
32                         "Percentage Other: " & SI.RacePercentages.Other & Environment.NewLine &
33                         "Percentage White: " & SI.RacePercentages.White & Environment.NewLine &
34                         "Percentage Female: " & SI.GenderPercentages.Female & Environment.NewLine &
35                         "Percentage Male: " & SI.GenderPercentages.Male)
36         Console.ReadLine()
37 
38     End Sub
39 
40 End Module

GetVersion

 1 'http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL
 2 
 3 Imports GetVersion.WSDL
 4 Module Module1
 5 
 6     Sub Main()
 7 
 8         Dim DQ As New WSDL.DemographixQuery
 9         Dim SI As New WSDL.SummaryInformation
10         Dim Version As String
11 
12         Version = DQ.GetVersion()
13 
14         Console.WriteLine("Demographics API Version: " & Version)
15 
16         Console.ReadLine()
17 
18     End Sub
19 
20 End Module