CSharp Demographics Examples

From CDYNE Wiki
Jump to: navigation, search

Contents

GetIncomeHouseValueByAddress

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetIncomeHouseValueByAddress.WSDL;
 
namespace GetIncomeHouseValueByAddress
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.IncomeAndHouseValue IAHV = new IncomeAndHouseValue();
 
IAHV = DQ.GetIncomeHouseValueByAddress("505 Independence Parkway","Chesapeake", "VA", "23320", "YOUR LICENSE KEY");
 
Console.WriteLine("Error: " + IAHV.ErrorString + "\n" +
"Place ID: " + IAHV.PlaceInformation.PlaceID + "\n" +
"State Abbreviation: " + IAHV.PlaceInformation.StateAbbrev + "\n" +
"Median Income: " + IAHV.MedianIncome + "\n" +
"Median House Value: " + IAHV.MedianHouseValue);
Console.ReadLine();
}
}
}

GetLocationInformationByAddress

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetLocationInformationByAddress.WSDL;
 
namespace GetLocationInformationByAddress
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.SummaryInformation SI = new SummaryInformation();
 
SI = DQ.GetLocationInformationByAddress("505 Independence Parkway","Chesapeake", "VA", "23320", "YOUR LICENSE KEY");
 
Console.WriteLine("Error: " + SI.ErrorString + "\n" +
"Place ID: " + SI.PlaceInformation.PlaceID + "\n" +
"State Abbreviation: " + SI.PlaceInformation.StateAbbrev + "\n" +
"Median Age: " + SI.MedianAge + "\n" +
"Median Income: " + SI.MedianIncome + "\n" +
"Median Rooms in House: " + SI.MedianRoomsInHouse + "\n" +
"Median House Value: " + SI.MedianHouseValue + "\n" +
"Median Vehicles per Household: " + SI.MedianVehicles + "\n" +
"Percentage Never Married: " + SI.MaritalStatusPercentages.NeverMarried + "\n" +
"Percentage Married: " + SI.MaritalStatusPercentages.Married + "\n" +
"Percentage Separated: " + SI.MaritalStatusPercentages.Separated + "\n" +
"Percentage Married (Other): " + SI.MaritalStatusPercentages.MarriedOther + "\n" +
"Percentage Widowed: " + SI.MaritalStatusPercentages.Widowed + "\n" +
"Percentage Divorced: " + SI.MaritalStatusPercentages.Divorced + "\n" +
"Percentage Asian: " + SI.RacePercentages.Asian + "\n" +
"Percentage Black: " + SI.RacePercentages.Black + "\n" +
"Percentage Inidan: " + SI.RacePercentages.Indian + "\n" +
"Percentage Mixed: " + SI.RacePercentages.Mixed + "\n" +
"Percentage Native Hawaiian: " + SI.RacePercentages.NativeHawaiian + "\n" +
"Percentage Other: " + SI.RacePercentages.Other + "\n" +
"Percentage White: " + SI.RacePercentages.White + "\n" +
"Percentage Female: " + SI.GenderPercentages.Female + "\n" +
"Percentage Male: " + SI.GenderPercentages.Male);
Console.ReadLine();
}
}
}

GetLocationInformationByLatitudeLongitude

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetLocationInformationByLatitudeLongitude.WSDL;
 
namespace GetLocationInformationByLatitudeLongitude
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.SummaryInformation SI = new WSDL.SummaryInformation();
 
SI = DQ.GetLocationInformationByLatitudeLongitude(36.761560m, -76.259964m, "YOUR LICENSE KEY");
 
Console.WriteLine("Error: " + SI.ErrorString + "\n" +
"PlaceID: " + SI.PlaceInformation.PlaceID + "\n" +
"State Abbreviation: " + SI.PlaceInformation.StateAbbrev + "\n" +
"Rural: " + SI.PlaceInformation.Rural + "\n" +
"Median Age: " + SI.MedianAge + "\n" +
"Median Income: " + SI.MedianIncome + "\n" +
"Median Rooms in House: " + SI.MedianRoomsInHouse + "\n" +
"Median House Value: " + SI.MedianHouseValue + "\n" +
"Median Vehicles per Household: " + SI.MedianVehicles + "\n" +
"Percentage Never Married: " + SI.MaritalStatusPercentages.NeverMarried + "\n" +
"Percentage Married: " + SI.MaritalStatusPercentages.Married + "\n" +
"Percentage Separated: " + SI.MaritalStatusPercentages.Separated + "\n" +
"Percentage Married (Other): " + SI.MaritalStatusPercentages.MarriedOther + "\n" +
"Percentage Widowed: " + SI.MaritalStatusPercentages.Widowed + "\n" +
"Percentage Divorced: " + SI.MaritalStatusPercentages.Divorced + "\n" +
"Percentage Asian: " + SI.RacePercentages.Asian + "\n" +
"Percentage Black: " + SI.RacePercentages.Black + "\n" +
"Percentage Inidan: " + SI.RacePercentages.Indian + "\n" +
"Percentage Mixed: " + SI.RacePercentages.Mixed + "\n" +
"Percentage Native Hawaiian: " + SI.RacePercentages.NativeHawaiian + "\n" +
"Percentage Other: " + SI.RacePercentages.Other + "\n" +
"Percentage White: " + SI.RacePercentages.White + "\n" +
"Percentage Female: " + SI.GenderPercentages.Female + "\n" +
"Percentage Male: " + SI.GenderPercentages.Male);
Console.ReadLine();
}
}
}

GetNeighborhoodAgeGenderFemaleInDataSet

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodAgeGenderFemaleInDataSet.WSDL;
 
namespace GetNeighborhoodAgeGenderFemaleInDataSet
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodAgeGenderFemaleInDataSet("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodAgeGenderMaleInDataSet

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodAgeGenderMaleInDataSet.WSDL;
 
namespace GetNeighborhoodAgeGenderMaleInDataSet
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodAgeGenderMaleInDataSet("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodAgeInDataSet

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodAgeInDataSet.WSDL;
 
namespace GetNeighborhoodAgeInDataSet
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodAgeInDataSet("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodLinguisticIsolation

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodLinguisticIsolation.WSDL;
 
namespace GetNeighborhoodLinguisticIsolation
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new WSDL.CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodLinguisticIsolation("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset.WSDL;
 
namespace GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodRealtyValueInDataSet

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodRealtyValueInDataSet.WSDL;
 
namespace GetNeighborhoodRealtyValueInDataSet
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodRealtyValueInDataSet("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodVehiclesPerHouseholdInDataset

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodVehiclesPerHouseholdInDataset.WSDL;
 
namespace GetNeighborhoodVehiclesPerHouseholdInDataset
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodVehiclesPerHouseholdInDataset("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetNeighborhoodYearStructuresBuilt

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetNeighborhoodYearStructuresBuilt.WSDL;
 
namespace GetNeighborhoodYearStructuresBuilt
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.CensusInfoWithDataSet CIWDS = new CensusInfoWithDataSet();
 
CIWDS = DQ.GetNeighborhoodYearStructuresBuilt("VA", "0018466");
 
Console.WriteLine("Error: " + CIWDS.ErrorString + "\n" +
"Data: " + CIWDS.CensusDataSet.GetXml());
Console.ReadLine();
}
}
}

GetPlaceIDbyAddress

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetPlaceIDbyAddress.WSDL;
 
namespace GetPlaceIDbyAddress
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.PlaceInfo PI = new WSDL.PlaceInfo();
 
PI = DQ.GetPlaceIDbyAddress("505 Independence Parkway", "Chesapeake", "VA", "23320", "YOUR LICENSE KEY");
 
Console.WriteLine("Error: " + PI.ErrorString + "\n" +
"Place ID: " + PI.PlaceInformation.PlaceID + "\n" +
"State Abbreviation: " + PI.PlaceInformation.StateAbbrev + "\n" +
"Rural: " + PI.PlaceInformation.Rural);
Console.ReadLine();
}
}
}

GetPlaceIDbyCensusTractAndBlock

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetPlaceIDbyCensusTractAndBlock.WSDL;
 
namespace GetPlaceIDbyCensusTractAndBlock
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.PlaceInfo PI = new PlaceInfo();
 
PI = DQ.GetPlaceIDbyCensusTractAndBlock("VA", "0209.01", "2001", "YOUR LICENSE KEY");
 
Console.WriteLine("Error: " + PI.ErrorString + "\n" +
"PlaceID: " + PI.PlaceInformation.PlaceID);
Console.ReadLine();
}
}
}

GetSummaryInformationByPlaceID

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetSummaryInformationByPlaceID.WSDL;
 
namespace GetSummaryInformationByPlaceID
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.SummaryInformation SI = new WSDL.SummaryInformation();
 
SI = DQ.GetSummaryInformationByPlaceID("VA", "0018466");
 
Console.WriteLine("Error: " + SI.ErrorString + "\n" +
"Place ID: " + SI.PlaceInformation.PlaceID + "\n" +
"State Abbreviation: " + SI.PlaceInformation.StateAbbrev + "\n" +
"Median Age: " + SI.MedianAge + "\n" +
"Median Income: " + SI.MedianIncome + "\n" +
"Median Rooms in House: " + SI.MedianRoomsInHouse + "\n" +
"Median House Value: " + SI.MedianHouseValue + "\n" +
"Median Vehicles per Household: " + SI.MedianVehicles + "\n" +
"Percentage Never Married: " + SI.MaritalStatusPercentages.NeverMarried + "\n" +
"Percentage Married: " + SI.MaritalStatusPercentages.Married + "\n" +
"Percentage Separated: " + SI.MaritalStatusPercentages.Separated + "\n" +
"Percentage Married (Other): " + SI.MaritalStatusPercentages.MarriedOther + "\n" +
"Percentage Widowed: " + SI.MaritalStatusPercentages.Widowed + "\n" +
"Percentage Divorced: " + SI.MaritalStatusPercentages.Divorced + "\n" +
"Percentage Asian: " + SI.RacePercentages.Asian + "\n" +
"Percentage Black: " + SI.RacePercentages.Black + "\n" +
"Percentage Inidan: " + SI.RacePercentages.Indian + "\n" +
"Percentage Mixed: " + SI.RacePercentages.Mixed + "\n" +
"Percentage Native Hawaiian: " + SI.RacePercentages.NativeHawaiian + "\n" +
"Percentage Other: " + SI.RacePercentages.Other + "\n" +
"Percentage White: " + SI.RacePercentages.White + "\n" +
"Percentage Female: " + SI.GenderPercentages.Female + "\n" +
"Percentage Male: " + SI.GenderPercentages.Male);
Console.ReadLine();
}
}
}

GetVersion

/*http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx?wsdl was added as a Web Reference and given the name WSDL*/
 
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetVersion.WSDL;
 
namespace GetVersion
{
class Program
{
static void Main(string[] args)
{
WSDL.DemographixQuery DQ = new WSDL.DemographixQuery();
WSDL.SummaryInformation SI = new WSDL.SummaryInformation();
 
string Version = DQ.GetVersion();
 
Console.WriteLine("Demographics API Version: " + Version);
 
Console.WriteLine();
}
}
}
Personal tools
Namespaces

Variants
Actions
Navigation
Tools

Trial Key