How to make time data in D3 cards

I have a time series dataset that I would like to map --- these are irregular series of incidents in countries, indexed by date and country. I used D3 for a couple of simple things, but I'm not sure how to organize the data here, even conceptually. I checked...

to create maps, and it’s more convenient to generate the .json map itself:

wget "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip" unzip ne_50m_admin_0_countries.zip ogr2ogr -f "GeoJSON" output_features.json ne_50m_admin_0_countries.shp -select iso_a3 topojson -o topo.json output_features.json --id-property iso_a3 

However, when my data looks like this:

 incidents.csv date, iso3, eventtype 2001-05-21, ABW, a 2002-01-01, ABW, a 2005-07-31, ABW, b 2003-02-21, AFG, b 2008-02-21, AFG, c 2000-03-09, AGO, a 2010-06-11, AGO, c 

I don’t understand how to “snap” this to the map shape. Time is a whole other dimension. Does each country shape correspond to a time vector attached to it, which also includes an “event type”? All types of events? How?

On the one hand, I could see the utility in aggregating certain things ahead of time, to the level of ...

 ABW, a, 2 ABW, b, 1 ABW, c, 0 AFG, a, 0 AFG, b, 1 AFG, c, 1 AGO, a, 1 AGO, b, 0 AGO, c, 1 

... and tying it in one way or another, and this can probably produce a wonderful choropleth.

But I really really would like to keep the time component. Ideally, I would like to have 2 sliders at the bottom of the map, which I can use to show only aggregations of the types of events that occur between a given start and end date.

I am well versed in python data and time series, but I admit that I am a little bit superior in my skills here with D3 --- how would I get started and what is the preferred way to connect and work with categorical, irregular time series data in topoison in D3? How can i solve this?

(I also have a related workflow question in gis stackexchange, which is less complicated.)

+4
source share
1 answer

I think the interim answer I will get for anyone else considering this question is:

Time on the map is really difficult, and it is not general in nature. You will spend a lot of time with the right interface.

0
source

Source: https://habr.com/ru/post/1500426/


All Articles