We have a report that is populated by different platforms (Salesforce, DB etc.) and now we are going to add Analytics data to that.
In our report for Spain, we use 'Province' values (Madrid, Barcelona, Málaga).
When I am getting data from Google Analytics, there are dimensions: Region and City but the problem is, values of Region are Autonomous Communities+Cities and values of City are Municipalities.
Is there any field/dimension I can use to group my data by Provinces?
There's no built-in dimension for that. All you can do is to build an almost 100% matching table using Google Ads geo targets table from here https://developers.google.com/adwords/api/docs/appendix/geotargeting
the underlying table
(consider checking for proper language version)
Related
Here in Italy the land is politically divided into regions, provinces and municipalities. For example I live in the city of Varazze, whose province is Savona, in the region of Liguria.
I created a Firestore database that accepts businesses whose addresses are composed like the example up here. Nothing difficult as I use an external service which give me consistent and correct geo data. The rest of the information for the business is entered by the user.
Now I need to search into this db of businesses by region and/or province and/or municipality. To set up the UI with the filter, I absolutely need to show only regions, provinces and municipalities that have a business into the db and not all those available (FYI: Italy has 21 regions, 107 provinces and ~8000 municipalities).
Looking down the internet and here on SO, I understand that the best strategy is to create a new collection to store distinct data about the location, separated from the businesses collection, in order to enable a quicker lookup. So every time I add or edit a business I check if it's region, province and municipality exists in the "search collection" (let's name this way) and if not, add it.
But how to structure this collection?
If I use the municipality as key, I'll have a quick lookup for the municipality itself (at top will be 8000 records), but if I need to search by a region or province the result is poor because firestore does not have any way to "distinct" the results (something like SELECT DISTINCT province FROM geocollection WHERE Region='Liguria' if you want to visualize it in SQL) and I have to do it on a server or at worst on the client (not an option this last one).
I don't know if staring with the region and keeping the structure region -> province -> municipality is the way to go. Or going for the province, being halfway between.
Another way could be to have separate collection for regions, provinces and municipalities.
What I'm asking here is what is the best solution, in terms of performance and data complexity.
A good way to go on this would be to have a collection Regions, then each Region has a Collection Provinces, and each province has a collection Municipalities.
And the documents have the name of the geografic region as ID, This will allow you to lookup by the ID on the corrisponding collections.
I would like to analyse the locations of electric vehicle charging stations for Germany, Italy and France. Those three countries, because they differ quite a lot in regard to their respective incentive programmes for public charging station infrastructure.
What I have so far are .csv exports from both OpenChargeMap and OpenStreetMap containing the location data (latitude and longitude) of all charging stations in those three countries along with a few other information that I can process in R.
What I would like to do now is some sort of reverse geocoding on those latitude and longitude coordinates to retrieve additional information on the surroundings. Especially, whether the respective charging station is located in a residential area in a city for example or at a rest stop on the highway. By knowing at what kind of locations the charging stations are placed in those three countries I am hoping to be able to draw conclusions regarding the incentive programmes. I'm not looking for specific addresses in this case, but rather an API or another way to process thousands of coordinates and retrieve information regarding for example population density or any other piece of data from which I could derive conclusions.
I have tried to get OpenStreetMap exports to work, but unfortunately I cannot seem to be able to query for the 'landuse' attribute through the Overpass Turbo API. This is my basic query that I'm using in this specific API, but as soon as I query for ["landuse" = "residential"] instead of ["landuse" = ""] I get prompted empty fields as result.
I found an API from Google which would offer lookup for various address components/types. Unfortunately, registering an API key at Google is not quite realistic for the scope of my work. Does somebody know of a (preferably FOSS) API that is able to do something like this? Or even how to make a 'landuse' query work in the Overpass Turbo API linked above?
Thank you in advance for your time.
Your Overpass API query is looking for elements that are tagged as amenity=charging_station and landuse. This is rather uncommon since charging stations and landuse are mapped as distinct objects. Instead you need to look around charging stations for landuse elements.
So instead of
area["ISO3166-1"="DE"]->.a;
nwr(area.a)["amenity"="charging_station"]["landuse"=""];
you will need a query like
area["ISO3166-1"="DE"]->.a;
nwr(area.a)["amenity"="charging_station"];
way(around:200)["landuse"];
This searches for ways with a landuse tag located within 200 meters of charging stations.
Note that this is a rather heavy query. You should probably use your own Overpass API server for it.
It looks like my country wise data in google analytic is wrong or else I'm unable to understand the way that GA track Geography data.
My total monthly users is 1.3 million and when I go for country wise data then India has 1.5 million unique users.
Why my total website data is less than India data?
Make sure you are looking at the same metric User and User
Make sure you are not under sampling (there are no pre-aggregated report in GA with geo location) - try selecting only one day (not today) and see if you get the right number
I am quite a new to Google Maps. I am working on a historical project using Google Maps API v3. According to historical situation, I need only some city names to be visible on the map.
Is is possible to show some city names on the map and to hide all others? Also, is it possible to rename certain city, eg. to display different name from nowadays?
I'm trying to create a User Registration page in ASP.NET and wondering what
is the best way to get the list of up-to-date Countries and Cities? Are
there any Web Services on the web that I can use to retrieve such
information? If not, what are the options?
Please, any suggestions and pointers will be very much appreciated
How about this? http://www.maxmind.com/app/web_services_country_usage
I have not tried it myself though.
You can check angrymonkeycloud.com/geography to get full list of countries and their states (subdivision).
You can even get countries primary language and currency to set it as your users default settings.
There are a lot of sources for the information on complete lists of countries and major cities. The United Nations Statistics Division's annual demographic yearbook has a list of major cities > 100K population in CSV format:
http://unstats.un.org/unsd/demographic/products/dyb/dyb2012/Table08.xls
The CIA World Factbook also has a list of major cities in the world at:
https://www.cia.gov/library/publications/the-world-factbook/fields/2219.html
They also keep a list of bitmap images for the corresponding country flags:
https://www.cia.gov/library/publications/the-world-factbook/docs/flagsoftheworld.html
I also keep a large links and copies of these types of datasets in our own custom CSV format at this URL:
http://www.opengeocode.org/cude1.1/index.php
Yes I worked for an organization that used this: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm for countries; there are other sources too that are valid that I can't currently find. There are state code lists but I haven't seen city. I've not seen any web services offerings; the one listed below was news to me...
We typically attempted to standardize with these codes, loaded them into a database, and even had a central database with these values that other DB's referenced too.
HTH.