User Contributed Datasets is part of the community driven efforts to provide interesting datasets.
Sim Wei Sung Lincoln and Shahila Syed Ali Shah are students from Temasek Polytechnic who came up with an idea titled “After 12″.
The purpose of this dataset is to offer information about the amenities such as Restaurants, Clinics, Convenient Stores, etc that are opened 24 hours.
Their motivation came from the understanding that it was troublesome to think about the nearest place to have late supper with friends or the nearest clinic to head for past midnight.
Thus, they came up with the idea of collecting those datasets and build an application that could show the nearest selected amenities within a chosen distance from where they currently are.
Kudos to Lincoln and Shahila from Temasek Polytechnic!
Datasets Available
Code Snippet
.NET – How do I access a complete list of AXS
public List<AXSEntry> GetAXSSetFromNimbusUSR(string AccountKey,string UniqueUserID)
{
System.Net.WebRequest wr=
HttpWebRequest.Create(
"http://api.projectnimbus.org/usrodataservice.svc/AXSSet?");
wr.Headers.Add("AccountKey",AccountKey);
wr.Headers.Add("UniqueUserID",UniqueUserID);
wr.Method = "GET";
WebResponse res = wr.GetResponse();
string resStr
= new System.IO.StreamReader(res.GetResponseStream()).ReadToEnd();
XNamespace atomNS
= "http://www.w3.org/2005/Atom";
XNamespace dNS
= "http://schemas.microsoft.com/ado/2007/08/dataservices";
XNamespace mNS
= "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
List<AXSEntry> results
= (from item in XElement.Parse(resStr).Descendants(atomNS + "entry")
let axs = item.Element(atomNS + "content").Element(mNS +"properties")
select new AXSEntry() {
Name = axs.Element(dNS +"Name").Value,
OperatingHours = axs.Element(dNS + "OperatingHours").Value,
Address = axs.Element(dNS + "Address").Value
}).ToList();
return results;
}
Java – How do I access a complete list of movies
public ArrayList<AXS> getAXSs(String accountKey, String uniqueId) {
axsList = new ArrayList<AXS>();
try {
URL _url = new URL("http://api.projectnimbus.org/usrodataservice.svc/AXSSet?");
URLConnection _urlConn = _url.openConnection();
_urlConn.setRequestProperty("accept", "*/*");
_urlConn.addRequestProperty("AccountKey", accountKey);
_urlConn.addRequestProperty("UniqueUserID", uniqueId);
BufferedReader br = new BufferedReader(new InputStreamReader(_urlConn.getInputStream()));
String line = null;
StringBuilder strBuilder = new StringBuilder();
while ((line = br.readLine()) != null) {
strBuilder.append(line);
System.out.println(line);
}
}
String[] IProperties = strBuilder.toString().split("<m:properties>");
for (String str : IProperties) {
AXS axs = new AXS();
axs.setName(Utils.getStringBetween(str, "<d:Name>", "</d:Name>"));
axs.setOperatingHours(Utils.getStringBetween(str, "<d:OperatingHours>", "</d:OperatingHours>"));
axs.setAddress(Utils.getStringBetween(str, "<d:Address>", "</d:Address>"));
axsList.add(axs);
}
} catch (MalformedURLException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
return axsList;
}
Helpers Available
.NET – C# Proxy Classes: click here | Read this blog post for more information to use these proxy classes.
JAVA – Read this blog post for more information to use JAVA to connect to the data service.
PHP & AJAX – Read this blog post for more information to use PHP/AJAX to connect to the data service.
obj C / xcode – coming soon
Terms of Use
The datasets:
- Are here as a community technology preview for a period of time (TBD).
- Cannot be used in any public offering.
- Are offered as-is with no official support.
Support
None at this time.