What should be the best data source for problem related to product that can measure the affluence in localities of metro cities in India? - cluster-analysis

You are tasked with an open-ended problem statement to develop a data product that can measure the affluence in localities of metro cities in India.
Choose the city that you are most comfortable with.
How would go about solving this problem?
Which data sources would you use?

You would be looking for a data source which is:
recent
official (possible from the government of India)
in a public format, or with a public API allowing you to query data,
The censusindia "Population Enumeration Data" (Final Population) of 2011 is promising.
It has a Population Finder 2011 page, but also a data.gov.in API page, especially the Town Amenities, Census 2011, which you can use/script.

Related

Schema.org type for collectibles or catalogs?

There is the coins catalog https://colnect.com/en/coins/list/year/1889
Each item in list has Product Microdata, some items in marketplace have the offers property. For example: this stamp.
Recently the Structured Data Testing Tool began to show error instead of warning for missing offers property on Product pages against it still described as recommended property in product rich result docs. Also here are 'Either "offers", "review", or "aggregateRating" should be specified' errors in Google Search Console.
What kind of structured data will be most suitable for those items?
How to avoid these structured data errors? Will it be correct to have Thing type for catalog items and then change it to Product when the item will be placed in marketplace?
Update 2019-10-15: Structured Data for mentioned above stamp are here. At the moment it has offers so there are 3 warnings only.
And Structured Data for some other stamp without offers, here is the missing offers filed error.
It seems Google does not allow schema.org Product markup without offers.
Hard to answer your issue (Next time please add some code examples).
In general in this URL:
https://colnect.com/en/stamps/stamp/2376-Snowstorm_-_Steamer_off_a_Harbours_Mouth-Birth_Bicentenary_of_JMW_Turner_painter-United_Kingdom_of_Great_Britain_Northern_Ireland
Without this warning:
'Either "offers", "review", or "aggregateRating" should be specified'
- But read this:
https://www.checkerboard.com/web-development/fix-offers-review-aggregaterating-specified/
Product VS Thing - it's better to use more specific object-type (This is not related to the "marketplace" option to pay Online) (Google rich-snippet related to products).
productontology:
For coins/Sports Cards and so on you could add extra-data by productontology (not mandatory):
http://www.productontology.org/
Related:
Can we make structured page data for any type of entities?

need a list for all countries with their states and cities including latitude and longitude

I am creating an App which needs data for countries, states and cities which is available at lots of places but here for some reason I need to know the latitude and longitude of each country including its state and city. From which one source can I find all these? I need to store this data in mongoDb.
I tried downloading allCountries.zip file from here GeoNames but I found that data is not in proper tsv format and it's very complicated to get the expected output data from here.
Is there anything else from which I can get the desired result?
Please help if anyone knows
Thanks a lot in advance :)
There is a webservice provided by geoNames which gives all the information about countries, states and cities.
http://ws.geonames.org/childrenJSON?geonameId=8505026&username=demo
this is an API which gives children i.e if you provide countries geonameId then it will give its states. If you provide states geonameId it will give its cities.
So in that way we can have all the information about countries states and cities. To get all geonameId of countries for that they have provided another API
http://api.geonames.org/countryInfoCSV?username=demo
There is just one thing we should keep in mind that for username we have to create an account and whose credit limit is approx 2000 per day. So if we want to hit the API more than 2000 a day we have to create another account :)
Pretty good thing and very useful thing provided by geoNames

Bing Maps REST API Basic key returns different results than Enterprise key

This unstructured format
http://dev.virtualearth.net/REST/v1/Locations?addressLine=3712%20Adelaide&adminDistrict=TX&locality=The%20Colony&countryRegion=US&postalCode=75056&maxRes=1&key=YourKey
does not seem to return the same result as this structured format
http://dev.virtualearth.net/REST/v1/Locations/US/TX/75056/The%20Colony/3712%20Adelaide?o=json&key=YourKey
The structured format is returning high confidence and the unstructured format is returning medium. What am I missing?
Edit: I never would have expected this. I have discovered the unstructured format returns medium confidence with my current API key and returns high confidence with a new trial key. What does this mean?
Trying the URL's you provided I see the exact same results with the same high confidence value.
Here is the response from the Microsoft Bing Team:
Issue Definition: Question regarding Bing Maps REST Location API service. Scope Agreement: As per our communication, you provided a query for 3712 Adelaide, The Colony, TX 75056 with the Bing Maps REST Location API with a Basic and Enterprise key and received different results and you would like to know the reason. The reason you are receiving different results is because we are in the middle of deploying new information to the Bing Maps REST geocoder. This information is first flighted on Basic (free) accounts before it is released to Enterprise customers.
Our Product Group let us know that it should be deployed to all Enterprise customers by the end of this month.

Modeling RealEstate hierarchical location using MongoDB

I am designing a Real Estate classifieds website. Each ad will have a location which will defined using the following three attributes (state, city, town).
What's the best way to represent this in a Mongodb document? I am worrying about query performance because:
Location will be the first search criteria
I want to allow users to search by multiple locations.
Example: A user looking to rent a flat in New York (state) or in Harrisburg (city in Pennsylvania).
I think, I will use regular expressions like the following:
db.ads.find({$or:[{location: /^,new york/},{location: /^,pennsylvania,harrisburg,/}]})
This solution was inspired from the following article

how to get food product data from barcode

I am able to read the barocode but i am confused about how to get the food product value from the barcode value .
Do we need to call a webservice or create a database locally ...
help me out
thanks in advance
Have a look at OpenFoodFacts. It's a database that does just that, with ingredients, calories, etc. It's based on the barcode.
Product bar-codes contain almost no product related information - they are mere unique identifiers. The system used in Europe - EAN13 - consists of a country code, a manufacturer code, a product code, and a check digit. To translate any of this data into usable information you need a database or web-service.
I know this was asked a long time ago but I figured I would give an update for anyone looking now... We use an API called upcFood (www.upcfood.com) They offer a simple API that allows lookup of food products directly from the barcode. upcFood includes nutrition data, Products Data, allergy data, ingredients etc. from a single search.
In case anyone else is looking for this info in 2021, you can get this data directly from the USDA's Food Data Central API, which is public domain. One of their endpoints has a query param, which supports keywords and, as a little tinkering revealed, UPCs! For instance, here's a query for a snack I had laying around:
https://api.nal.usda.gov/fdc/v1/foods/search?query=850126007120&pageSize=10&api_key=DEMO_KEY
API keys can be had with an email address. Hope this is useful to someone!
Free database here:
http://www.upcdatabase.com
and here:
http://www.yoopsie.com/
Otherwise just Google for "upc database" and you'll find people offering to sell you one.
I doubt that the databases will include prices since those are for the individual retailers to set.
I am not sure if you still need the information since it is dated a year..
A french startup has created an application that can find most of the correspondant of ean-code to food product. It provides as well an API for developper to integrate in their application.
You can check it at : http://prixing.fr/api
Since it is based in France, it is in French language .. if it is useful, I hope it can help