-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea to synchronize & visualize the data? #5
Comments
That's a great proposal! I will look into it and share it here when I have time and feel free to post ideas/approaches or make pull requests about it. |
Excellent project, it all works great. What tools are you using to visualize the data? Thanks |
I wrote a separate little script for this. import pandas as pd
import folium
from folium.plugins import HeatMap
# Read CSV
df = pd.read_csv('./log/2023-07-20/AIRTAG_SN.csv')
df['location|latitude'] = df['location|latitude'].astype(float)
df['location|longitude'] = df['location|longitude'].astype(float)
# Create map around avg lat/long
average_lat = df['location|latitude'].mean()
average_lon = df['location|longitude'].mean()
m = folium.Map([average_lat, average_lon], zoom_start=10)
heat_data = [[row['location|latitude'], row['location|longitude']] for index, row in df.iterrows()]
# heatmap layer
HeatMap(heat_data).add_to(m)
# last known location
last_lat = df['location|latitude'].values[-1]
last_lon = df['location|longitude'].values[-1]
# marker with a cat emoji at the last known location
folium.Marker(
[last_lat, last_lon],
icon=folium.DivIcon(html=f"""<div style="font-size:24pt">🐈</div>""")
).add_to(m) |
Hi fjxmlzn & folks,
I am impressed with your script! I installed it on a MAC VM on a Unraid server & it works great. In fact, I had a break-in the other day and was able to track down the stolen goods using the airtags!
But now I was looking for a solution to save the history. Your script is great for this.
The question now is, how to visualize the data best (live). In the case of a theft, it is of course a bit more complicated to make maps of all days, etc.. manually.
Grandios would be a map where you can select the times to display the positions. I have done this with Mapbox, Atlist Maps and Google My Maps. However, not yet with a live ingest. Now I thought about synchronizing the CSV data with a Google Spreadsheet and then loading it into a map. This works. But it is very uncomfortable.
Do you have an idea for an approach how to visualize the data best? If possible even "live"? So that the data is automatically synchronized. I would have thought about writing the CSV data into a MySQL database or converting it into json etc... To synchronize with a server. However, I have not quite found which MAP could be suitable for this.
I would be very grateful for any approach or idea. If I find a way in the meantime I would of course post it here.
Best
Julian
The text was updated successfully, but these errors were encountered: