Filtering By Location

Often you'll want to filter down to content from a particular location. DataSift supports a range of options for doing so.

How you choose to filter by location depends hugely on your use case. Filtering by geo-coordinates gives you the most precise results, but as many users choose not to share their location on social networks just considering content with geo-coordinates can severely reduce the data you have left to analyse. To broaden your filter you should consider targets such as users' descriptions and timezones, if your use case allows.

As an example we'll combine multiple techniques to build a filter for Twitter content from the USA.

Note we'll also include retweet targets in this example, so combined we'll pick up original and retweets from the location we're considering.

By Geo-Location

For interactions which have a precise geo-location (where users have opted to provide this) we can use any of geo_radius, geo_box, geo_polygon to specify an area to filter data to:

// Geo-polygon for USA
interaction.geo geo_polygon "73.02259000000001,-166.99219000000002:56.55948000000001,-168.39844000000002:4.915830000000001,-93.16406:42.81152,-50.62500000000001:64.47279,-58.007810000000006:72.7119,-99.49219000000001"

By User Profile Location

Although users may not choose to give an exact location, they often give their location in their profile. For example Twitter users often fill in their location their profile. This field is free-text but often contains valuable information. Note this field gives a user's permanent location (for instance work or home location), not where they are tweeting from at that moment.

// *** Location for Tweets **

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
twitter.user.location contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.user.location contains_any "United States, USA, America"
// State Terms
OR twitter.user.location contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

// *** Location for Retweets **

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
OR  twitter.retweet.user.location contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.retweet.user.location contains_any "United States, USA, America"
// State Terms
OR twitter.retweet.user.location contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

By Place

Social networks such as Twitter and Facebook allow users to specify a place for their post. Again this is optional for users, but allows us to capture more content.

twitter.place.country == "United States"
OR twitter.place.country_code == "US"

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
OR  twitter.place.full_name contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.place.full_name contains_any "United States, USA, America"
// State Terms
OR twitter.place.full_name contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

By Timezone

Another useful piece of metadata Twitter exposes is the user's timezone. Again, it very much depends on your use case, but for our example this is another field to consider.

twitter.user.time_zone == "Alaska, Central Time (US & Canada), Eastern Time (US & Canada), Hawaii, Mountain Time (US & Canada), Pacific Time (US & Canada)"

OR twitter.retweet.user.time_zone == "Alaska, Central Time (US & Canada), Eastern Time (US & Canada), Hawaii, Mountain Time (US & Canada), Pacific Time (US & Canada)"

Complete Example - USA Filter

Combining all of the above techniques we arrive at a complete USA filter. You can pick and choose these ideas to best fit your use case.

// Geo-polygon for USA
interaction.geo geo_polygon "73.02259000000001,-166.99219000000002:56.55948000000001,-168.39844000000002:4.915830000000001,-93.16406:42.81152,-50.62500000000001:64.47279,-58.007810000000006:72.7119,-99.49219000000001" 

// *** Location for Tweets **

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
OR  twitter.user.location contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.user.location contains_any "United States, USA, America"
// State Terms
OR twitter.user.location contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

// *** Location for Retweets **

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
OR  twitter.retweet.user.location contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.retweet.user.location contains_any "United States, USA, America"
// State Terms
OR twitter.retweet.user.location contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

// *** Twitter place **

OR twitter.place.country == "United States"
OR twitter.place.country_code == "US"

// Major 285 USA Cities - http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population
OR  twitter.place.full_name contains_any "Abilene, Akron, Albuquerque, Alexandria, Allentown, Amarillo, Anaheim, Anchorage, Ann Arbor, Antioch, Arlington, Arvada, Athens, Atlanta, Augusta, Aurora, Aurora, Austin, Bakersfield, Baltimore, Baton Rouge, Beaumont, Bellevue, Berkeley, Billings, Birmingham, Boise , Boston, Bridgeport, Broken Arrow, Brownsville, Buffalo, Burbank, Cambridge, Cape Coral, Carlsbad, Carrollton, Cary, Cedar Rapids, Centennial, Chandler, Charleston, Charlotte, Chattanooga, Chesapeake, Chicago, Chula Vista, Cincinnati, Clarksville, Clearwater, Cleveland, Colorado Springs, Columbia, Columbia, Columbus, Columbus, Concord, Coral Springs, Corona, Corpus Christi, Costa Mesa, Dallas, Daly City, Davenport, Dayton, Denton, Denver, Des Moines, Detroit, Downey, Durham, El Cajon, El Monte, El Paso, Elgin, Elizabeth, Elk Grove, Erie, Escondido, Eugene, Evansville, Everett, Fairfield, Fargo, Fayetteville, Flint, Fontana, Fort Collins, Fort Lauderdale, Fort Wayne, Fort Worth, Fremont, Fresno, Frisco, Fullerton, Gainesville, Garden Grove, Garland, Gilbert, Glendale, Glendale, Grand Prairie, Grand Rapids, Green Bay, Greensboro, Gresham, Hampton, Hartford, Hayward, Henderson, Hialeah, High Point, Hollywood, Honolulu, Houston, Huntington Beach, Huntsville, Independence, Indianapolis, Inglewood, Irvine, Irving, Jackson, Jacksonville, Jersey City, Joliet, Kansas City, Kansas City, Kent, Killeen, Knoxville, Lafayette, Lakewood, Lancaster, Lansing, Laredo, Las Vegas, Lexington, Lincoln, Little Rock, Long Beach, Los Angeles, Louisville, Lowell, Lubbock, Madison, Manchester, McAllen, McKinney, Memphis, Mesa, Mesquite, Miami, Miami Gardens, Midland, Milwaukee, Minneapolis, Miramar, Mobile, Modesto, Montgomery, Moreno Valley, Murfreesboro, Murrieta, Naperville, Nashville, New Haven, New Orleans, New York, Newark, Newport News, Norfolk, Norman, North Las Vegas, Norwalk, Oakland, Oceanside, Odessa, Oklahoma City, Olathe, Omaha, Ontario, Orange, Orlando, Overland Park, Oxnard, Palm Bay, Palmdale, Pasadena, Pasadena, Paterson, Pembroke Pines, Peoria, Peoria, Philadelphia, Phoenix, Pittsburgh, Plano, Pomona, Pompano Beach, Port Saint Lucie, Portland, Providence, Provo, Pueblo, Raleigh, Rancho Cucamonga, Reno, Rialto, Richardson, Richmond, Richmond, Riverside, Rochester, Rochester, Rockford, Roseville, Round Rock, Sacramento, Saint Paul, Saint Petersburg, Salem, Salinas, Salt Lake City, San Antonio, San Bernardino, San Buenaventura (Ventura), San Diego, San Francisco, San Jose, Santa Ana, Santa Clara, Santa Clarita, Santa Maria, Santa Rosa, Savannah, Scottsdale, Seattle, Shreveport, Simi Valley, Sioux Falls, South Bend, Spokane, Springfield, Springfield, Springfield, St. Louis, Stamford, Sterling Heights, Stockton, Sunnyvale, Surprise, Syracuse, Tacoma, Tallahassee, Tampa, Temecula, Tempe, Thornton, Thousand Oaks, Toledo, Topeka, Torrance, Tucson, Tulsa, Vallejo, Vancouver, Victorville, Virginia Beach, Visalia, Waco, Warren, Washington, Waterbury, West Covina, West Jordan, West Palm Beach, West Valley City, Westminster, Wichita, Wichita Falls, Wilmington, Winston–Salem, Worcester, Yonkers"

// Country terms
OR twitter.place.full_name contains_any "United States, USA, America"
// State Terms
OR twitter.place.full_name contains_any "Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming"

// *** Twitter timezone **

OR twitter.user.time_zone == "Alaska, Central Time (US & Canada), Eastern Time (US & Canada), Hawaii, Mountain Time (US & Canada), Pacific Time (US & Canada)"

OR twitter.retweet.user.time_zone == "Alaska, Central Time (US & Canada), Eastern Time (US & Canada), Hawaii, Mountain Time (US & Canada), Pacific Time (US & Canada)"