Skip to content

Looker map_layers base model containing multiple topojson map layers

License

Notifications You must be signed in to change notification settings

brechtv/looker_map_layers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

To make the pre-defined map layers available in a model, you'll need to copy the files in this repo into your project repository.

Once the files are in the project, add the following line on any model file to include the map layers.

include: "map_layers.base.lkml"

On a dimension that contains geodata (e.g. province name), add the map_layer_name parameter, and specify the map_layer you want to match on.

Example

If I have a table containing the following data, from which I've created a dimension named 'province'.

province value
West Flanders 123
East Flanders 456
Antwerp 789

I can add the belgium_provinces map_layer, by adding the map_layer_name parameter on the dimension:

dimension: province {
  sql: ${TABLE}.province ;;
  map_layer_name: belgium_provinces
}

Now when I create an explore containing this field, I can pick the province dimension and go crazy with the map charts!

List of included map_layers*

Map layer name - expected value format

  • world_continents - "Asia"
  • world_countries_sans_antarctica - "Asia"
  • world_countries - "Algeria"
  • africa - "Asia"
  • asia - "China"
  • europe - "Germany"
  • north_america - "Canada"
  • south_america - "Peru"
  • oceania - "Australia"
  • belgium_provinces - "West Flanders"
  • benelux_countries - "Belgium"
  • china_provinces - "Xinjiang Uygur"
  • czech_republic_regions - "Pardubický"
  • dach_states - "Bayern"
  • dach - "GERMANY"
  • denmark_counties - "Ringkøbing"
  • finland_provinces - "Lapland"
  • finland_regions - "Lapland"
  • fr_departments - "Nord"
  • germany_regions - "Dessau"
  • india_states - "Uttar Pradesh"
  • ireland_counties - "Dublin"
  • italy_provinces - "Ravenna"
  • italy_regions - "Emilia-Romagna"
  • netherlands_cities - "Sluis"
  • norway_counties - "Buskerud"
  • poland_provinces - "Masovian"
  • portugal_districts - "Faro"
  • romania_counties - "Brașov"
  • south_africa_provinces - "Western Cape"
  • spain_province - "Barcelona"
  • sweden_counties - "Norrbotten"
  • turkey_provinces - "Istanbul"
  • uk_counties - "Hertfordshire"

* Looker has a few built in map_layers as well, here's a list

About

Looker map_layers base model containing multiple topojson map layers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages