CSV list of all universities - google maps - google-maps-api-3

I have a CSV list of university names around the world - about 13,000 university names. I'm looking for a way to pull the addresses of these universities. Google Maps API / Google Places API looks promising, but requires lat/long to map the locations.
End game is to mark to each school as a 1 if the school is in the US, and 0 if the school is outside of the US.
Any thoughts on how to search these colleges in maps and pull out the addresses - or at least the country?
Example:

is there nothing else in the csv, only the names? that's going to make it hard, i'd bet the names aren't always unique in the world.
you could write something that had different passes at biting the apple - for instance, if the university has a state name in it, check those off as 1's - then find another logic to use to take "another bit" until the apple is gone.

On top of #WEBjuju's answer, since you only want to mark if the school is in US, or outside of US, you can use the "country" type in Place Types in the Google Places API, by setting the option as country='us'.
https://developers.google.com/places/supported_types?csw=1#table2
You may also want to cross check with this list of schools.
https://www.4icu.org/reviews/index2.htm
https://en.wikipedia.org/wiki/Lists_of_universities_and_colleges_by_country

Related

Here API - Need guidance defining query, q, value

The HERE api seems really picky about what is uses for the q parameter in API calls. According to the documentation you can use a street address, partial address, name of place, etc (documentation: https://developer.here.com/documentation/places/topics/free-text-search.html)
Im trying to take an address and return the name of the store, building, business at that location (a few million of these) In some cases I have a human typed name of the place at the address but this can be quite messy and inaccurate in a lot of cases so Im trying not to use this information. Address however Im quite confident in.
in summary Im trying to provide here with an input like "15300 Cedar Ave, Apple Valley, MN 55124" and output "Best Buy"
Here seems to be really finicky on what your q input is..
When I put in the address and geocode info, Best Buy doesn’t appear on the results list
q=15300 Cedar Ave, Apple Valley, MN 55124
in=44.7287,-93.2147;r=800
https://places.demo.api.here.com/places/v1/discover/search?q=15300+Cedar+Ave%2C+Apple+Valley%2C+MN+55124&in=44.7287%2C-93.2147%3Br%3D800&Accept-Language=en-US%2Cen%3Bq%3D0.9&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg
Based on this Im thinking maybe this info just isnt in here's database, but when I run this query which includes best buy in the search it finds it right away at the correct address!!
q=best buy 15300 Cedar Ave, Apple Valley, MN 55124
in=44.7287,-93.2147;r=800
https://places.demo.api.here.com/places/v1/discover/search?q=best+buy+15300+Cedar+Ave%2C+Apple+Valley%2C+MN+55124&in=44.7287%2C-93.2147%3Br%3D800&Accept-Language=en-US%2Cen%3Bq%3D0.9&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg
It seems like a no-brainer to me that HERE would use the q value as an address search but that doesnt always appear to be the case. Looking for guidance on how to make this smarter
if the point of interest(POI) needs to be searched by specific address, then q is significant for fetching the records. As the API will fetch only those records which have those keywords in that area.
if POIs need to be searched at specific lat-long and around defined meter range, then q is not significant.
https://places.demo.api.here.com/places/v1/discover/around?in=44.7287%2C-93.2147%3Br%3D800&Accept-Language=en-US%2Cen%3Bq%3D0.9&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg
Is it mandatory for you to pass address all the time, or lat-long can also work ?

Sabre developer api - how limited is the data in development? Am I using it wrong or is data THAT limited?

Im trying our different flight api's from sabre, I understand from reading the data Im getting back is limited in development but Im not sure if it really can be THAT limited or its me doing something wrong.
1: InstaFlights Search
First I use the citypairs lookup to show city pairs, then use them for the instasearch,
The problem is unlike I use NY or London (there were 2 other cities working fine), for almost ALL other cities, Im getting no response.
I know data is limited but since the citypairs api already returns VERY limited data, but is it really THAT limited? Feeling like I must be doing something wrong because I cannot image, that api to work (in dev) only for 3 cities on 3 different dates :-/
destination api
here I use first the supported cities api, then use results to use the multi airports api, then use that for destination api.
Again, same here, only 2/3 cities actually work. Since in the destination api, UNLIKE the instaflights api, the changes of 'matches' are higher as any destination could be shown for the picked origin. HERE AGAIN almost no results, BUT for about 3 cities.
If anyone who has some experience with sabre, could help out it would be great- just trying to figure out if its me whos using it wrong or no. Thanks!
Can you please provide the city pairs that seem to be failing for you? I just did a test of both APIs (InstaFlights and DestinationFinder) and was able to obtain results with the city pairs provided there. I changed the point of sale to FR and obtained PAR-ATH, and that worked. Also worked with ABE-MCO which is the first city pair I obtain when using POS US.
The testing environment for this API but you should be not limited to just three cities.

GraceNote - generate playlist with music of a given country

I would like to use GraceNote to generate play-lists which contain songs likely to appeal to, or, at least, be known to, residents of a given country. E.G, Japan, Korea, Turkey, Brazil, France ...
They don't necessarily have to be in the local language, as I don't think that I can do that with GraceNote (can I ?), but local artists would be nice. Is there any way, for instance, to query and generate a playlist using artist origin?
I realize that something like Gangnam Style might be known in most countries ;-) and that play-list generation is inexact when used this way, but I would be happy with a 70 or 80% "I know that song" reaction.
Can it be done? If so, how? #cweichen, can you help?
It seems likely you are referring the the Rhythm API. As you probably can see from the function definition, you cannot create a playlist using 'ARTIST_ORIGIN'.
The closest thing I can think of is creating a playlist (aka radio station) using on a popular song in the given country as a seed.
You may try configuring the 'focus_similarity' value to get a wider variety of songs. This is just a suggestion and I am not sure if this will get you what your looking for.
*Pygn currently does not support 'focus_similarity' configuration but it should not be too difficult to add yourself.

Google Analytics Reporting API: how can I filter by multiple cities?

I am working with the Google Analytics Reporting API. The problem I am running in to is that as far as I can tell the city dimension is not necessarily unique (i.e. multiple cities can have the same name.) So in order to filter to a specific city I need something like ga:country=France;ga:city=Paris which works fine, unless I want everything from Paris OR London. But the OR operator has a higher precedence than the AND operator in the filter expressions, and it doesn't look like there is a way to group expressions together.
So,
Are the strings returned by google analytics for ga:city uniquely identifiy a city?
Is there any way to group expressions together like (ga:country=France;ga:city=Paris),(ga:country=UK,ga:city=London)?
If neither of the above, is there any other workaround?
One of the examples on the reference guide is:
Operating system is (Windows OR Macintosh) AND browser is (Firefox OR Chrome):
ga:operatingSystem==Windows,ga:operatingSystem==Macintosh;ga:browser==Firefox,ga:browser==Chrome
In your situation you could do it in the way of (United Kingdom OR France) AND (Paris OR London) but it would still have your problem if there was a paris in the UK or a london in France.
A workaround would be to make one request where you query the cities in France, and a second different request where you query for the cities in the UK. It would mean making more requests but usually in these kind of cases having smaller but more specific requests is better practice. (And probably easier to manage)

Where to get geography data?

I need geography data for new website.
Data required is
States (With names and standard abbreviations)
ZipCode (List of zip code with all available data like where zipcode belongs to)
What would be my best source to get this data?
Any help is appreciated.
Thanks for all answers,
Sorry i went offline for fewdays. Yes i am talking about US zipcode data.
I think postal service data most reliable I will go with that.
Other alternative mentioned has similar and in better format data. but i think going with postal service will be the best option
(US assumed, "zip code" sort of implies the US 5-digit code, whereas "postal code" is the generic term)
States and their abbreviations are easy, it's on the Postal Service website. (including Guam & other parts of the US that aren't states)
Zip codes: the Postal Service would be the authority in question, but it looks like they don't offer the basic database of zipcode <-> town, other than through an interactive one-by-one lookup. They do offer street-level zipcode databases and other information for $ale. However the Census Bureau has a nearly identical set of information available. (ZCTA = ZIP Code Tabulation Areas) This has also been prepackaged more easily in a Sourceforge project (in their forum they claim this is from the Census Bureau data).
For postal codes Maxmind Free Postalcode Database is the most comprehensive freely available list I know of.
For a list of countries with names and ISO ALPHA-3 codes see Countries or areas, codes and abbreviations.
Of course there is Wikipedia with a list and some pointers to other useful resources Wikipedia - List of Countries
Here's a torrent that might help: http://www.mininova.org/tor/761374
I believe it's legal since it's just geographic data that's publicly available. Also, if you're looking for an access database: http://databases.about.com/od/access/a/zipcodedatabase.htm
For what country? Australia Post has a downloadable file with all the data you're after here. Seems like the sort of thing postal services in other countries would also provide.
Edit: was just listening to .NET Rocks no. 437 and Bob Beauchemin mentions most of this data is available at census.gov
I assume you're talking about the US (if you need states and zip codes...).
The TIGER/Line data is freely available. Not sure if it includes zip codes etc, but worth a look, since it's in the public domain.
Or you can check data.geocomm.com. I don't know what the exact legal status of that is though.

Resources