business listing search apis - geolocation

I would like to include local business address/phone numbers into my site.
Does anyone have thoughts on using google local search api vs. twitter's geo api vs. purchasing a directory listing?

Mainly depends on your site and needs (real time, offline..).
Google local gives very good results, the best from my experience (compared to other apis).You should check the terms of service of each service. If I remember correctly, google doesn't allow using it's local api if you site charges users for money.
Also, I think google TOS limits you to client side usage, but you should read the TOS to see if it's true.
Haven't tried the twitter geo api too much, but I remember it didn't fit my needs.
Purchasing a directory listing is not cheap. Again, depends on your needs; do you need US business listings? World wide? If you want US businesses, the leading companies for purchasing a DB of listings are: localeze, infousa, acxiom.

Besides Google Local Search (which actually has been deprecated), there's now SimpleGeo Places, which is free for low volume use and without restrictive terms of service. I don't work for them.
Could also use the Google Places API (which has not been deprecated) using the instructions here.

Related

are google forms privacy-Preserving?

Is google form a Privacy-Preserving way to conduct a survey?
some people are not comfortable with it. Is it because most people have a google account and if they do not go on private mode, they give more information about themselves to google? does google use the responses?
No.
The contents of google forms (which usually feed into google spreadsheets) is shared between the submitters (only their own data, obviously), you as the form owner, and the entirety of google's internal infrastructure.
Google using the data directly would be a really major infraction, just as it would be if they acted on the contents of a gmail account, however, they have plenty of scope to use the information in indirect, less-obvious ways. For example, the data that someone submits in a form could be used on other sites for ad targeting. Google does this in gmail; if someone sends you an email about something, you can expect to see ads on that subject both within gmail and on other sites. To be fair, they may have stopped that particular practice, but the wider point is that you really can't tell.
"Private mode" is irrelevant in this case; it gives very little protection to start with, and if a form requires you to be logged in to a google account, they know exactly who you are anyway.
On top of this you have the problems caused by the Schrems II judgement that effectively made it illegal to store any personal data (in the GDPR sense) in the US about people in the EU. Prior to this judgement, Google relied on the Privacy Shield arrangement and "Standard Contractual Clauses" (SCCs) to allow this. Privacy Shield is simply dead, and while SCCs are valid in general, they are not usable in the US (though both Google and Facebook have been trying to gaslight to the contrary) because the ongoing lack of US federal privacy laws and the persistent overreach of US security agencies renders it impossible to make their claims valid. This is unlikely to change in the near future.

Get public users of a service (Tumblr, Twitter)

Assuming it's not available as part of API, how can one obtain a full or partial list of public users of a web service, e.g. Twitter, Tumblr, YouTube?
Acceptable alternative: get a random public user.
I was interested in this for testing APIs with a random account. This is useful to catch edge cases when developing an app for the API; For example when developing a Tumblr theme, seeing what volumes of text/images are posted, special character use, and so on.
Can you even imagine a full list of (public) users of largely used web services? That's a vast load of data. I hardly believe that any API would offer that for many reasons:
performance/load issues,
data/information privacy,
abusing possibilities,...
For regular usage of the service's API you simply don't need that. Otherwise it would stink with some gray/black techniques.
Anyway to answer you question objectively: In order to get full or partial list of users from web service it have to provide any kind of API which would allow you to do that. So good starting point is to look at documentation, for example Twitter API, Youtube API, etc...
By swift look I don't see any method that would offer that. It might change in the future but as mentioned above I strongly doubt about that.
Another option is to mine partial list of users via search APIs or traversing the site with a robot. Also obtaining such a list is an option. However I would check whether this is even legal and not against terms of use or something like that.

Some general Twitter4J questions

I'm trying to do a write up of Twitter4J for part of a uni project, but I'm getting hung up on a few things. From the Twitter4J api:
void sample()
Starts listening on random sample of all public
statuses. The default access level provides a small proportion of the
Firehose. The "Gardenhose" access level provides a proportion more
suitable for data mining and research applications that desire a
larger proportion to be statistically significant sample.
This implies that by default, a "default access" is provided to the stream, but another type of access, "Gardenhose access" is available. Is this correct? And if so, how do you access the higher Gardenhose access?
I'm asking as I've seen some answers on SO suggest that there is only one level of access - the Gardenhose, and I'm trying to clear this up once and for all.
In addition to this, I would like a reference (if possible) to the number of tweets the sample stream allows access to. I've read lots of people cite 1% for "default access" and 10% for "gardenhose access" - but I can't find this anywhere in the API.
So to sum up, two questions:
Does the sample stream have a "default access" and a "gardenhose access", or just one of those?
How much of the Twitter firehose stream can these levels of access gain?
If replying, please have links to reference-able API where possible.
The gardenhose is different from the default sample stream, you would have had to request access from Twitter in order to use it.
However, I am not sure if Twitter still allows access to the gardenhose, or even if it still exists. It seems the current mechanism may be to use one of Twitter's preferred data partners:
Using the Streaming API?
Every Twitter account can connect to a small sampling of the Streaming API. Accounts that need increased access for data gathering or analytical reasons should check out our preferred partners page.
(source)
It may be different for students or educational instutions and that the gardenhose is still available to you. Previously you would have to either e-mail api-research#twitter.com or you could use the following form, but I have no idea if these methods work still - the post is quite old.
As for the percentage of Tweets that the default sample stream allows access to, the best reference I could find was a comment made by a Twitter employee on the developer forums - emphasis mine:
I would recommend just using the 1% sample stream from https://stream.twitter.com/1/statuses/sample.json that you can connect to with your Twitter account. It's unlikely that you'll be in a situation where you can access all of the data and will have to make do with a sample. At about 230 million tweets a day, you'd still be theoretically getting 2.3 million tweets a day.
(source)
Although, again this is an old post.
Regarding the firehose stream, as specified by the documentation you need to be granted permission to access it, I believe very few people have full access to this stream:
GET statuses/firehose
This endpoint requires special permission to access.
Returns all public statuses. Few applications require this level of access. Creative use of a combination of other resources and various access levels can satisfy nearly every application use case.
Overall documentation is scarce on the different access levels and what they offer, I suggest contacting Twitter directly to discuss your requirements or contacting one of their data partners.
Apologies if this wasn't as concrete as you would have liked, good luck with your research.

Building a Bing Store Locator

I've tried Google but I'm not smart enough to build my own Google Store locator. Everything is either old or in PHP and I use Python. Even GAE uses Python but I can't find any tutorials for Python at all. I even had a bounty here on S.o. for resources to a Python store locator and the only answer had a post from 2008 that was updated to "deprecated" on the post itself.
So I decided to give Bing a try and it has more noob options, such as "enter address here" and then it's listed in the app. The only problem is that everything is pointing me to Bing Spacial Datasend and it says they want to charge an arm and a leg.
Also, if you know of any, are there any good tutorials on building a Bing Store Locator? Google search has come up empty for me but they could always be hiding them. Thanks.
If you have less than 50 locations you can use the Bing Spatial Data Services under the free terms of use. If your application is a public facing web site, which most store locators are you can also generate 125,000 transactions against Bing Maps for free per year. If this is enough or not would depend on the number of stores and customers you have. The Bing Spatial Data Services is a really good option as you simply upload your data and it exposes it as a spatial rest service for you which you can access directly from JavaScript without the need for any server side code. Here is an example of how to query a data source in the Bing Spatial Data Services: http://www.bingmapsportal.com/ISDK/AjaxV7#SpatialDataServices1
If your application has a lot more volume then you would need a Bing Maps license. The cost of a license varies depending on the amount of transactions your application will use. If you have a Bing Maps license data sources can have up to 600,000 locations in a single data source and each Bing Maps account is allowed up to 25 data sources.

Display content based on location

How do I go about displaying content based on a users location ? For ex. If somebody accesses the site from the New York , I would like to display New York Hotels . However if somebody accesses the site from Chicago , I would like to display Chicago hotels.
You're looking for a Geoloction database which would give you access to the typical IP ranges for the countries/cities you need to flag.
This is not absolute or completely trustworthy information though. Country level geo-location is mostly effective but anything like city/state/zip code level information should be treated with great caution.
I've worked with major multinational media providers using expensive paid services and discovered that the information in these databases is a very long way from correct and that users individual circumstances often prevent geo-location from being effective.
e.g. Virgin and East Coast trains in the UK use T-Mobile Germany as their onboard internet provider so you appear to be in Germany to many sites and payment processors.
There are quite a few free geolocation databases, MaxMind springs to mind (though this is not a recommendation of their service).
You can find some thoughts on implementing geo-location here
You need some database/api with information about hotells in different locations, then you need to now where the visitor is.
You can use something like Travel/Hotel API's? to find hotells.
And for finding the location of your visitor you can use something like http://www.hostip.info/use.html
or you can use HTML5 geolocation api example http://html5demos.com/geo . The bad thing with the html5 geo api is that the user need to accept before you get their location.
Remember that there is no guaranty that the location is correct...
This is the exact reason I created wpgeocode. WPGeocode is a free plugin for wordpress that enables publishers to customize content based on reader location. Check out the plugin at the support site at http://www.wpgeocode.com
The plugin enables shortcodes that can be placed in your posts or pages. There are many conditional shortcodes such as [wpgc_is_country_code country_code="US"] for this exact purpose. Simple open the shortcode, specify the target country_code and provide the content to be displayed if the reader is visiting from that specific country.
Visit http://www.wpgeocode.com/shortcodes for a complete listing - here are a few:
[wpgc_is_city_and_state city=”Yardley” state_code=”PA”]
[wpgc_is_ip” ip=”xx.xx.xx.xx”]
[wpgc_is_ips” ip=”xx.xx.xx.xx,aa.bb.cc.dd”]
[wpgc_is_not_ip” ip=”xx.xx.xx.xx”]
[wpgc_is_not_ips” ip=”xx.xx.xx.xx,aa.bb.cc.dd”]
[wpgc_is_city” city=””]
[wpgc_is_cities” cities=”city one,city two,city three”]
[wpgc_is_not_city” city=””]
[wpgc_is_not_cities” cities=”city
one,city two,city three”]
[wpgc_is_nearby”] – Uses the value you
specify in the Nearby Range setting from the administrative panel
[wpgc_is_not_nearby”]
[wpgc_is_within” miles=”10″]
[wpgc_is_within
kilometers=”12″]
[wpgc_is_country_name” country_name=””]
[wpgc_is_country_names” country_name=”United States,Egypt,Albania”]
[wpgc_is_country_code” country_code=””]
[wpgc_is_country_codes”
country_codes=”US,GB,AZ”]
[wpgc_is_state_code” state_code=””]
[wpgc_is_state_codes” state_codes=”PA,NJ,TX”]
[wpgc_is_not_country_name” country_name=””]
[wpgc_is_not_country_names” country_names=”United
States,Egypt,Albania”]
[wpgc_is_not_country_code” country_code=””]
[wpgc_is_not_country_codes” country_codes=”US,GB,AZ”]
[wpgc_is_not_state_code” state_code=””]
[wpgc_is_not_state_codes”
state_codes=”PA,NJ,TX”]
dotCMS offers the ability to geolocate content OTB (disclaimer, I work for them). You can see a demonstration that displays news content based on the user's location onthe demo site:
It is pretty easy to setup and use. Any type of content can be geolocated and the content can be accessed through the RESTful API. Under the covers, the Geolocation queries are handled natively via Elasticsearch.
Example:
http://demo.dotcms.com/demos/content-geolocation
Docs:
http://dotcms.com/docs/latest/es-geolocation-queries

Resources