Hi all, Happy New Year.
New Year, New project time.
I’m trying to get GeoJson events from my city’s OpenData project. I’ve been able to create a URL query that gets me the data for the last week as a GeoJson object.
geo_location:
- platform: geo_json_events
url: "https://phl.carto.com/api/v2/sql?q=SELECT+*+FROM+incidents_part1_part2+WHERE+dispatch_date_time>current_date-7+AND+text_general_code+LIKE+'%Vehicle%'&format=geojson&skipfields=cartodb_id"
radius: 2.5
entity_namespace: 'home_crime_vehicle'
scan_interval: 8640
It is importing everything nicely, but I’m having two problems I can’t find documentation on.
- I only get the following attributes and the entity id is
geo_location.home_crime_vehicle_unnamed_device_X
.
latitude: 39.99001
longitude: -75.18671
source: geo_json_events
external_id: -8078411085321075000
unit_of_measurement: km
I’m assuming this is because its not parsing the rest of the json object. Is there a way I can template that information? Or does the underlying tool not support this?
- When using the lovelace
map
card I can’t figure out the syntax for including thesegeo_location_sources
.
entities:
- zone.home
geo_location_sources:
- all
type: map
I’ve gotten the all
to work. But I can’t get any specific feed to work. I’ve tried home_crime_vehicle
and geo_location.home_crime_vehicle
.
On a related note.
I’ve noticed in the documentation that there are three types of geo-json tools. geo_json_events
are under the geo_location:
section of the config while geonetnz_quakes
, wwlln
, and a few others have their own sections (wwlln:
), and geo_rss_events
is a sensor
platform. If I’m trying the “future proof” my work against future break-changes, does anyone know which method is likely going to be the “1.0” strategy?