<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to edit my search to produce a map visualization by zip code? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250586#M74882</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=betadb|eval length=len(PREMISE_FK)|where length=5|stats count by PREMISE_FK|rename PREMISE_FK as zipcode|lookup zipcode_geo.csv Zipcode as zipcode OUTPUT Lat,Long| geostats latfield=Lat longfield=Long sum(count) as count by zipcode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Jan 2017 20:23:30 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-01-23T20:23:30Z</dc:date>
    <item>
      <title>How to edit my search to produce a map visualization by zip code?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250585#M74881</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=betadb|eval length=len(PREMISE_FK)|where length=5|stats count by PREMISE_FK|rename PREMISE_FK as zipcode|lookup zipcode_geo.csv Zipcode as zipcode OUTPUT Lat,Long|eval_geo=Lat+","+Long
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which generates a stats table that looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;zipcode count   Lat Long
99362   1   46.11   -118.3
96734   1   21.4    -157.73
95223   1   38.35   -120.2
95062   1   36.97   -121.98
95050   1   37.34   -121.95
94583   1   37.78   -121.99
94538   2   37.5    -121.96
94301   1   37.44   -122.15
94117   1   37.76   -122.44
94065   3   37.53   -122.24
94062   2   37.4    -122.29
94025   1   37.45   -122.17
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The lookup table looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Zipcode Lat Long
705 18.14   -66.26
610 18.28   -67.14
611 18.28   -66.79
612 18.45   -66.73
601 18.16   -66.72
631 18.19   -66.82
602 18.38   -67.18
603 18.43   -67.15
604 18.43   -67.15
605 18.43   -67.15
703 18.25   -66.1
704 17.96   -66.22
7675    40.98   -74.03
7677    41.02   -74.05
7885    40.89   -74.58
7981    40.82   -74.41
7999    40.82   -74.41
8888    40.62   -74.76
8889    40.6    -74.76
7095    40.55   -74.28
7481    40.99   -74.16
10451   40.84   -73.87
10452   40.84   -73.87
10453   40.84   -73.87
&amp;lt;snip&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But none of the map visualizations will work.  What am I missing?&lt;/P&gt;

&lt;P&gt;FYI, the data looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1/23/17
1:26:14.000 PM  
99362,WA,TCA203,1
ACCOUNT_FK =    1 HARDWARE_MODEL =  TCA203 PREMISE_FK = 99362 eventtype =   external-referer    eventtype = visitor-type-referred field2 =  WA field3 = TCA203 host =   beta index =    betadb linecount =  1 source =  /var/nfs/SAT_SplunkLogs/db/beta/countTsByZipCodeResults.csv sourcetype =    csv splunk_server = idx5.icontrol.splunkcloud.com timestamp =   none unix_category =    all_hosts unix_group =  default
1/23/17
1:26:14.000 PM  
96734,HI,NGHUBA,1
ACCOUNT_FK =    1 HARDWARE_MODEL =  NGHUBA PREMISE_FK = 96734 eventtype =   external-referer    eventtype = visitor-type-referred field2 =  HI field3 = NGHUBA host =   beta index =    betadb linecount =  1 source =  /var/nfs/SAT_SplunkLogs/db/beta/countTsByZipCodeResults.csv sourcetype =    csv splunk_server = idx5.icontrol.splunkcloud.com timestamp =   none unix_category =    all_hosts unix_group =  default
1/23/17
1:26:14.000 PM  
95223,CA,TCA203,1
ACCOUNT_FK =    1 HARDWARE_MODEL =  TCA203 PREMISE_FK = 95223 eventtype =   external-referer    eventtype = visitor-type-referred field2 =  CA field3 = TCA203 host =   beta index =    betadb linecount =  1 source =  /var/nfs/SAT_SplunkLogs/db/beta/countTsByZipCodeResults.csv sourcetype =    csv splunk_server = idx5.icontrol.splunkcloud.com timestamp =   none unix_category =    all_hosts unix_group =  default
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jan 2017 20:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250585#M74881</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-01-23T20:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to produce a map visualization by zip code?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250586#M74882</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=betadb|eval length=len(PREMISE_FK)|where length=5|stats count by PREMISE_FK|rename PREMISE_FK as zipcode|lookup zipcode_geo.csv Zipcode as zipcode OUTPUT Lat,Long| geostats latfield=Lat longfield=Long sum(count) as count by zipcode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jan 2017 20:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250586#M74882</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-23T20:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to produce a map visualization by zip code?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250587#M74883</link>
      <description>&lt;P&gt;Thanks Somesoni2,  That worked with one minor tweak....  I added globallimit=0 to the geostats command&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 21:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-produce-a-map-visualization-by-zip-code/m-p/250587#M74883</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-01-23T21:30:31Z</dc:date>
    </item>
  </channel>
</rss>

