I just upgraded to GeoIP2 and missing the Region field.
How can I extract the region from the CityResponse object?
I am using GeoLite2-City.mmdb
Got it - cityResponse.getSubdivisions() return an array of regions, most common is getting one but sometimes may contain more granular data of districts for example
Related
I have an issue with the GEO and Google Storage Transfer service. I use it to pull Google Ads data in to BigQuery. It's not empty but the numbers don't match. E.g. a query like this
SELECT _DATA_DATE, sum(clicks) FROM project.dataset.GeoStats_XXX where LocationType='LOCATION_OF_PRESENCE' and IsTargetingLocation IN (true, false) group by 1
returns a smaller number than the real one, the one that I get if I just create the same report via Google Ads UI. I've tried different manipulations with the LocationType and IsTargetingLocation filters but nothing seems to work.
I see no errors in Storage Transfer service logs
The CampaignStat returns almost correct data but there is no GEO info there and I need the country breakdown. Not Target Location but GEO (location of presence)
I expect the numbers returned by my query to match the numbers that I see via Google Ads UI
I'm looking to get a city to country mapping without an IP address
I have access to these files on my box:
GeoIP2Country.mmdb
GeoIPCountry.dat
GeoIP2City.mmdb
GeoIPCity.dat
GeoIP2ISP.mmdb
GeoIP2Connections.mmdb
Normally the way I would use this is GeoIP2Country.country(cip).country.name and it would return a country name for the IP I feed it.
In my use case I want to provide it with a city name and have it return a country name. Since all the data is in there this would save me a lot of time. Is it possible to query mmdb (no idea how to do this) then convert that to a dataframe so I can just have a df of country to city mapping or vise versa?
based on this :Query by city name on geolite2 .mmdb file (JAVA) I cant do what I wnated to.
BUT there is also a country_code.csv I think thats offered by maxmind which does what I need in conjunction with some other non mmdb files.
I am trying to retrieve the country name using Lat and Long I fetched using locationmanager in codename one... How to get country, state, city, zip based on these parameters..??
You need to use a webservice that will translate location data to location meta data e.g. this one https://www.codenameone.com/blog/dynamic-autocomplete.html
Notice that the sample above uses a different feature of that webservice but the same concept applies.
I'm facing a very strange issue in my Splunk search. I have a data input coming from a REST API that returns a multi-level (nested) JSON response:
The entity node has several nodes, each node represents one access point. Each access point contains a field called ipAddress.
This API is being called every 5 min and response stored in Splunk. When I do a search to get the list of IP Addresses from one event I don't get all of them. For some reason, is like Splunk is reading only the first seven nodes inside entity, because when I do:
source="rest://AccessPointDetailsAPI" | head 1
Splunk shows only the following values on the field (7 values although there are around 27):
I'm using demo license if that matters. Why I cannot see all values ? If I change my search to look for a specific iPAddress on the response but not on the list it won't return records.
Thanks and regards,
I think I understand the problem now. So the event is a big json and Splunk is not properly parsing all fields on the big json.
We need to tell splunk to parse the specific field we need with spath and specifying the field:
yoursearch | spath output=myIpAddress path=queryResponse.entity{}.accessPointDetailsDTO.ipAddress | table myIpAddress
http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Spath
But I think also is important to analyze if maybe the data input needs to be divided in multiple events rather than a single huge event.
I am trying to display a list of closest restaurants of a given city within a radius. In order to do this, I'll have to convert the city to a longitude/latitude.
When the user fills in his/her restaurant information, he/she will fill in the address. Based on that address i need to get a longitude/latitude and save that to the database.
I don't need to point this on a map. I'll be just displaying a list of all closest restaurants within the given radius to the user.
How can I do this with ASP.NET-MVC4?
Also, this project is based on Code First. And for address I have DbGeography as datatype set.
The project is kind of based on this tutorial
Edit
To avoid anyone else telling me this is not possible with ASP.NET on it's own, I am aware of that. an example with Google maps / .NET wrapper would be great.
This query itself is typically done in the database back-end because the program is the consumer of the data not the keeper of the data. You will have a table of restaurants, possibly for many cities, each restaurant having a latitude and longitude. You create a geospatial index on the table, which performs a tesselation for performance; you configure the tesselation parameters. You must determine the latitude/longitude of your restaurant-seeker's location. Your command object would feed that data to a stored procedure, along with the desired radius. The stored procedure would return an enumerable set of rows to your client program.
I found this .NET wrapper which fulfills my need.