Data Source to Map Data

31 views
Skip to first unread message

Mimi Sam

unread,
Dec 27, 2020, 2:54:25 PM12/27/20
to Safecast Discussion Group
Hello, I was introduced to Safecast recently and so I'm still learning about the various data sources and access points (web api, downloadable dataset, postgres db). I would like to display the Safecast data on a map by plotting the captured values based on the coordinates. I also want the data to be updated daily and display averages for the month. For instance, the Jan 2 map will display data captured on Jan 1, and then the Jan 3 map will display the average of data captured on Jan 2 and Jan 1, etc.

I want to ask what data source I should use for the most "official" data points. The web api has endpoints for "measurements captured on certain dates" and "measurements added to the database on certain dates". However, only the first endpoint seems to be returning any data on my end. Does all data from the first endpoint eventually get added to the second endpoint? Should I just display data from the second endpoint to only include data that makes it into the database? Is this also data that is included in the downloadable dataset?

I also thought about using the postgres db but I don't see a table that matches the format of the dataset. And I would have to download the data somehow and upload it into my own database to query. The simplest method seems to be to map the data returned from the api endpoint into my own database and query from there. I welcome any suggestions about how best to get this done since this is my first time working with such a large amount of data and so many data sources. Thank you!

Mat Schaffer

unread,
Dec 27, 2020, 6:24:04 PM12/27/20
to safecas...@googlegroups.com
Hi Mimi,

It might be good to have more specifics in here. 

Are you looking for radiation, air, both?

Can you post an example of the query that’s not returning data?

What database and mapping tool are you using?

--
--
** This is a public discussion mailing list, opinions expressed on this list belong to the individual only, and are not to be taken as official statements from Safecast.
http://groups.google.com/group/safecast-japan
 
 
http://safecast.org

---
You received this message because you are subscribed to the Google Groups "Safecast Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to safecast-japa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/safecast-japan/8de5e265-abc8-498d-8251-ce614d120305n%40googlegroups.com.
--

Mimi Sam

unread,
Dec 27, 2020, 6:50:44 PM12/27/20
to Safecast Discussion Group
I am looking for measurements with "cpm" as the unit.

This endpoint example from the api website does not load: https://api.safecast.org/measurements.json?since=2012-09-08+00%3A00&until=2012-09-09+00%3A00. However, it did load when I changed the years to 2015 and higher so that is no longer an issue.

I will use postgres or mysql as the database and Mapbox as the mapping tool.

Mat Schaffer

unread,
Dec 27, 2020, 7:01:31 PM12/27/20
to safecas...@googlegroups.com
Thanks! Yeah, it looks like you probably picked a day we didn’t get any data uploaded there.

Not sure what the state of sensors in 2012 was, but I’d guess there wasn’t much in place yet. 

I haven’t used mapbox yet. Is
https://www.mapbox.com/mapbox-studio the right place to start?

--

Mimi Sam

unread,
Dec 27, 2020, 7:26:34 PM12/27/20
to Safecast Discussion Group
Yes, that is the website. I'd like to create a choropleth map to display the data. I'm also open to other mapping tools if you have any suggestions.

How do I gather all of the data added to the database for a particular day? The endpoint only returns 25 measurements. Is there a more efficient way to gather all the measurements for a particular day?

jan.he...@gmail.com

unread,
Dec 29, 2020, 12:21:15 PM12/29/20
to Safecast Discussion Group
Hi,
just a remark - as I remember, Mapbox recently changed licensing:

but there seems to be some replacement:
Jan

Mimi Sam

unread,
Dec 30, 2020, 7:26:02 PM12/30/20
to Safecast Discussion Group
Thank you for the Mapbox update, Jan!

Mat, I am still unsure about how to retrieve all measurements added to the database for a given day through the Safecast API. I am only interested in measurements for the US. Is there a way to get measurements with time and location constraints through the API? It would be a lot of data to download for all locations everyday. Thank you for any guidance you can provide.
Reply all
Reply to author
Forward
0 new messages