VBScript Demographics Examples

From CDYNE Wiki
Jump to navigation Jump to search

GetIncomeHouseValueByAddress

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetIncomeHouseValueByAddress xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<AddressLine1>505 Independence Parkway</AddressLine1>" & _
 9 "<City>Chesapeake</City>" & _
10 "<StateAbbrev>VA</StateAbbrev>" & _
11 "<ZipCode>23320</ZipCode>" & _
12 "<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
13 "</GetIncomeHouseValueByAddress>" & _
14 "</soap:Body>" & _
15 "</soap:Envelope>"
16 
17 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
18 oXMLHttp.open "POST", url, False
19 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
20 oXMLHttp.send request
21 response = oXMLHttp.responseText
22 
23 MsgBox oXMLHTTP.responseText

GetLocationInformationByAddress

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetLocationInformationByAddress xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<AddressLine1>505 Independence Parkway</AddressLine1>" & _
 9 "<City>Chesapeake</City>" & _
10 "<StateAbbrev>VA</StateAbbrev>" & _
11 "<ZipCode>23320</ZipCode>" & _
12 "<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
13 "</GetLocationInformationByAddress>" & _
14 "</soap:Body>" & _
15 "</soap:Envelope>"
16 
17 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
18 oXMLHttp.open "POST", url, False
19 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
20 oXMLHttp.send request
21 response = oXMLHttp.responseText
22 
23 MsgBox oXMLHTTP.responseText

GetLocationInformationByLatitudeLongitude

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetLocationInformationByLatitudeLongitude xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<Latitude>36.761560</Latitude>" & _
 9 "<Longitude-76.259964</Longitude>" & _
10 "<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
11 "</GetLocationInformationByLatitudeLongitude>" & _
12 "</soap:Body>" & _
13 "</soap:Envelope>"
14 
15 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
16 oXMLHttp.open "POST", url, False
17 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
18 oXMLHttp.send request
19 response = oXMLHttp.responseText
20 
21 MsgBox oXMLHTTP.responseText

GetNeighborhoodAgeGenderFemaleInDataSet

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodAgeGenderFemaleInDataSet xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbrev>VA</StateAbbrev>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodAgeGenderFemaleInDataSet>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodAgeGenderMaleInDataSet

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodAgeGenderMaleInDataSet xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbrev>VA</StateAbbrev>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodAgeGenderMaleInDataSet>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodAgeInDataSet

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodAgeInDataSet xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbrev>VA</StateAbbrev>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodAgeInDataSet>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodLinguisticIsolation

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodLinguisticIsolation xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbr>VA</StateAbbr>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodLinguisticIsolation>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbr>VA</StateAbbr>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodRealtyValueInDataSet

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodRealtyValueInDataSet xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbrev>VA</StateAbbrev>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodRealtyValueInDataSet>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodVehiclesPerHouseholdInDataset

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodVehiclesPerHouseholdInDataset xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbr>VA</StateAbbr>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodVehiclesPerHouseholdInDataset>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetNeighborhoodYearStructuresBuilt

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetNeighborhoodYearStructuresBuilt xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<StateAbbr>VA</StateAbbr>" & _
 9 "<PlaceID>0018466</PlaceID>" & _
10 "</GetNeighborhoodYearStructuresBuilt>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetPlaceIDbyAddress

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetPlaceIDbyAddress xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<AddressLine1>505 Independence Parkway</AddressLine1>" & _
 9 "<City>Chesapeake</City>" & _
10 "<StateAbbrev>VA</StateAbbrev>" & _
11 "<ZipCode>23320</ZipCode>" & _
12 "<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
13 "</GetPlaceIDbyAddress>" & _
14 "</soap:Body>" & _
15 "</soap:Envelope>"
16 
17 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
18 oXMLHttp.open "POST", url, False
19 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
20 oXMLHttp.send request
21 response = oXMLHttp.responseText
22 
23 MsgBox oXMLHTTP.responseText

GetPlaceIDbyCensusTractAndBlock

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetPlaceIDbyCensusTractAndBlock xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<CensusTract>0209.01</CensusTract>" & _
 9 "<CensusBlock>2001</CensusBlock>" & _
10 "<StateAbbrev>VA</StateAbbrev>" & _
11 "<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
12 "</GetPlaceIDbyCensusTractAndBlock>" & _
13 "</soap:Body>" & _
14 "</soap:Envelope>"
15 
16 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
17 oXMLHttp.open "POST", url, False
18 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
19 oXMLHttp.send request
20 response = oXMLHttp.responseText
21 
22 MsgBox oXMLHTTP.responseText

GetSummaryInformationByPlaceID

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetSummaryInformationByPlaceID xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "<PlaceID>0018466</PlaceID>" & _
 9 "<StateAbbrev>VA</StateAbbrev>" & _
10 "</GetSummaryInformationByPlaceID>" & _
11 "</soap:Body>" & _
12 "</soap:Envelope>"
13 
14 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
15 oXMLHttp.open "POST", url, False
16 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
17 oXMLHttp.send request
18 response = oXMLHttp.responseText
19 
20 MsgBox oXMLHTTP.responseText

GetVersion

 1 Dim request, oXMLHttp, url
 2 url = "http://ws.cdyne.com/DemographixWS/DemographixQuery.asmx"
 3 
 4 request = "<?xml version='1.0' encoding='utf-8'?>" & _
 5 "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
 6 "<soap:Body>" & _
 7 "<GetVersion xmlns=""http://ws.cdyne.com/DemographixWS"">" & _
 8 "</GetVersion>" & _
 9 "</soap:Body>" & _
10 "</soap:Envelope>"
11 
12 Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
13 oXMLHttp.open "POST", url, False
14 oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
15 oXMLHttp.send request
16 response = oXMLHttp.responseText
17 
18 MsgBox oXMLHTTP.responseText