Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Saludos
Usé una publicación del foro para intentar importar un archivo TopoJson en Power BI.
let
Source = Json.Document(File.Contents("C:\Users\user\Documents\EKFB\HS2\GIdata\TopoJSON\Wards__December_2019__Boundaries.json")),
objects = Source[objects],
Wards__December_2019__Boundaries = objects[Wards__December_2019__Boundaries],
geometries = Wards__December_2019__Boundaries[geometries],
#"Converted to Table" = Table.FromList(geometries, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"type", "coordinates", "properties"}, {"Column1.type", "Column1.coordinates", "Column1.properties"}),
#"Extracted Values" = Table.TransformColumns(#"Expanded Column1", {"Column1.coordinates", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
#"Removed Columns" = Table.RemoveColumns(#"Extracted Values",{"Column1.properties"})
in
#"Removed Columns"
¿Recibo un mensaje de error para las coordenadas Lat/Lon??
El archivo tiene más de 70 MB, así que no puedo cargarlo.
Comienza con:
{
"type" : "Topology",
"arcs" : [
[
[ 650451, 167241 ],
[ -18, 9 ],
[ -232, 112 ],
[ -34, 17 ],
[ -48, 27 ],
[ -69, 36 ],
[ 12, 10 ],
[ 157, -70 ],
[ 33, -13 ],
[ 55, -19 ],
[ 26, -8 ],
[ 23, -7 ],
[ 38, -9 ],
[ 137, -26 ],
[ 11, -2 ],
[ 24, -7 ],
[ 24, -4 ],
[ 16, -2 ],
[ 12, -1 ],
[ 21, -0 ],
[ 30, -3 ],
[ 114, -7 ],
[ 23, -1 ],
[ 27, 0 ],
[ 0, -0 ],
[ 158, 8 ],
[ 271, 21 ]
],
Entonces entiendo:
[
[ 172103, 180996 ],
[ -0, 0 ],
[ -31, 22 ],
[ -12, 9 ],
[ -8, 6 ],
[ -9, 7 ],
[ -12, 8 ],
[ -11, 7 ],
[ -11, 7 ],
[ -12, 11 ],
[ -8, 6 ],
[ -10, 8 ],
[ -10, 3 ],
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 6, 7 ],
[ 9, 8 ],
[ 7, 7 ],
[ 4, 8 ],
[ 3, 7 ],
[ -3, 8 ],
[ -4, 7 ],
[ -7, 10 ],
[ -6, 6 ],
[ -5, 7 ],
[ -5, 7 ],
[ -8, 9 ],
[ -9, 7 ],
[ -8, 7 ],
[ -3, 7 ],
[ 2, 7 ],
[ 4, 7 ],
[ 4, 6 ],
[ 5, 7 ],
[ 6, 8 ],
[ 5, 7 ],
[ 4, 7 ],
[ 2, 8 ],
[ 2, 8 ],
[ -4, 6 ],
[ -0, 8 ],
[ 2, 12 ],
[ -0, 8 ],
[ -3, 7 ],
[ 7, 5 ],
[ 5, 6 ],
[ 1, 8 ],
[ 5, 7 ],
[ 5, 7 ],
[ 7, 11 ],
[ 4, 7 ],
[ 7, 8 ],
[ 6, 6 ],
[ 10, 9 ],
[ 6, 6 ],
[ 8, 6 ],
[ 9, 5 ],
[ 14, 7 ],
[ 9, 4 ],
[ 12, 5 ],
[ -3, 7 ],
[ -10, 4 ],
[ 7, 6 ],
[ 11, 6 ],
[ 8, 6 ],
[ 11, 8 ],
[ 4, 3 ],
[ 6, 4 ]
]
],
"objects" : {
"Wards__December_2019__Boundaries" : {
"type" : "GeometryCollection",
"geometries" : [
{
"type" : "Polygon",
"arcs" : [
[ 0, 1, 2, 3, 4, 5 ]
],
"properties" : {
"objectid" : 1,
"wd19cd" : "E05000026",
"wd19nm" : "Abbey",
"wd19nmw" : null,
"bng_e" : 544433,
"bng_n" : 184379,
"long" : 0.081277,
"lat" : 51.539828999999997,
"st_areasha" : 1282925.001550829969347,
"st_lengths" : 6244.885014677499385
}
},
{
"type" : "Polygon",
"arcs" : [
[ 6, 7, 8, 9, 10, 11, 12 ]
],
"properties" : {
"objectid" : 2,
"wd19cd" : "E05000027",
"wd19nm" : "Alibon",
"wd19nmw" : null,
"bng_e" : 549247,
"bng_n" : 185196,
"long" : 0.150987,
"lat" : 51.545921,
"st_areasha" : 1364442.121561324922368,
"st_lengths" : 6353.917640448425118
}
It ends:
},
"transform" : {
"scale" : [ 0.000010000012213, 0.000010000016815 ],
"translate" : [ -6.419007931397705, 49.864630846832931 ]
}
}
Agradecería cualquier consejo.
saludos
Clive
Solved! Go to Solution.
Pareces estar haciendo exactamente lo que advertí contra hacer.
Como publiqué en el otro hilo que necesita 2 cosas para utilizar mapas de formas.
1. Un mapa de formas
2. Algunos datos
Obtener un archivo topojson e importarlo a Power Query para intentar "crear" un mapa no es como funciona.
Sugiero usar este tutorial para averiguar cómo hacerlo. (Grab la muestra pbix y pruebe con ella)
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map#use-custom-maps
Hola @Clives en línea,
¿Estos son los datos de latitud y longitud que desea?
Pareces estar haciendo exactamente lo que advertí contra hacer.
Como publiqué en el otro hilo que necesita 2 cosas para utilizar mapas de formas.
1. Un mapa de formas
2. Algunos datos
Obtener un archivo topojson e importarlo a Power Query para intentar "crear" un mapa no es como funciona.
Sugiero usar este tutorial para averiguar cómo hacerlo. (Grab la muestra pbix y pruebe con ella)
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map#use-custom-maps
Hola
Gracias por tu opinión, seguí esos mensajes.
También seguí los pasos en este blog https://www.osinsci.xyz/powerbi/uk-postcode-area-map-in-powerbi.
He copiado un mapa topojson de código postal en inglés de: https://www.opendoorlogistics.com/downloads .
Importé el archivo topojson como se describe en el blog de PowerBI: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map#getting-map-data.
No consigo un mapa, se pega en la mesa??
Atascado en un bucle.
Gracias
Clive
Hola HotChilli,
Quiero importar un mapa de shapes con LSOA, códigos postales, etc. que pueda vincular atributos para importar datos a Power BI.
Exporté un Shapefile a TopoJson, estaría contento con un archivo más pequeño.
He copiado un archivo de la URL que no funcionó.
martinjc.github.io/UK-GeoJSON/
¿Puedo apuntarte a este hilo -
También tiene algunos enlaces a la ayuda del mapa de formas.
¿Puedo comprobar que importar un archivo json con información de forma poligonal es lo que realmente quiere hacer?
A veces la gente se confunde acerca de la funcionalidad de mapa de formas y tratar de importar archivos json masivos en powerbi cuando lo que realmente quieren hacer es utilizar un mapa de shapes topojson y vincularlo a algunos otros datos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |