Data Collector API

The Data Collector is a prototype application that collects messages from Twitter containing a disease name and posted at a location.

For further information about the Data Collector's implementation and functionality see the following paper:

Luis Filipe Lopes, João Zamite, Bruno Tavares, Francisco Couto, Fabrício A.B. Silva, Mário J. Silva, Automated Social Network Epidemic Data Collector. INForum - Informatics Symposium. September, 2009.

The Data Collector exposes its data via a RESTful Application Programming Interface (API). This page describes the API functionality.

Methods

The API supports the following methods to retrieve Data Collector data.

Get Diseases

http://epiwork.di.fc.ul.pt/collector/diseases

Retrieves all the diseases currently being monitored by the Data Collector.

Get Locations

http://epiwork.di.fc.ul.pt/collector/locations

Retrieves all the location currently being monitored by the Data Collector.

Get Occurrences Collected

http://epiwork.di.fc.ul.pt/collector/occurrences

Retrieves all the occurrences of messages retrieved from Twitter by the Data Collector.

Filter by Disease and Location

Use disease and/or location parameters to filter by disease or location name. Examples:

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1

http://epiwork.di.fc.ul.pt/collector/occurrences?location=italy

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1&location=portugal

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=dengue&location=spain

Filter by Dates

Use before and/or after parameters. Date format: year month day hours minutes seconds without spaces. Examples:

http://epiwork.di.fc.ul.pt/collector/occurrences?before=20090518000000&after=20090515000000

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1&location=portugal&before=20090518000000

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1&location=portugal&before=20090518000000&after=20090515000000

Create Data Sets

Use format parameter to specity the format of the occurrences. Accepted values are: tsv, html, xml. The Default value is html Examples:

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1&location=italy&format=tsv

http://epiwork.di.fc.ul.pt/collector/occurrences?disease=h1n1&location=portugal&before=20090518000000&after=20090515000000&format=tsv