-
Notifications
You must be signed in to change notification settings - Fork 54
Home
Event Registry is a Python package that can be used to easily access the data available in the Event Registry (http://eventregistry.org/) through the provided API.
Event Registry package can be installed using Python's pip installer. In the command line, simply type:
pip install eventregistry
and the package should be installed. Alternatively, you can also clone the package from the GitHub repository at https://github.com/gregorleban/EventRegistry. After cloning it, open the command line and run:
python setup.py install
To ensure the package has been properly installed run python and type:
import eventregistry
If you don't get any error messages then your installation has been successful.
As features are added to the package you will need at some point to update it. In case you have downloaded the package from GitHub simply do a git pull
. If you have installed it using the pip
command, then simply run
pip installl eventregistry --upgrade
Obtaining a list of recently added/modified events
from eventregistry import *
er = EventRegistry()
print er.getRecentEvents(50)
Search for latest events related to Star Wars
from eventregistry import *
er = EventRegistry()
q = QueryEvents()
q.addConcept(er.getConceptUri("Star Wars"))
q.addRequestedResult(RequestEventsInfo(sortBy = "date", count=10)) # return event details for last 10 events
print er.execQuery(q)
What are the currently trending topics
from eventregistry import *
er = EventRegistry()
# top 10 trending concepts in the news
q = GetTrendingConcepts(source = "news", count = 10)
print er.execQuery(q)
Depending on your interest and existing knowledge of the eventregistry
package you can check different things:
Terminology. There are numerous terms in the Event Registry that you will constantly see. If you don't know what we mean by an event, story or category, you should definitely check this page first.
Learn about EventRegistry
class. You will need to use the EventRegistry
class whenever you will want to interact with Event Registry so you should learn about it.
Querying events. Check this page if you are interested in searching for events that match various search criteria, such as relevant concepts, keywords, date, location or others.
Querying articles. Read if you want to search for articles based on the publisher's URL, article date, mentioned concepts or others.
Trends. Are you interested in finding which concepts are currently trending the most in the news? Maybe which movie actor is most popular in social media? How about trending of various news categories?
Articles and events shared the most on social media. Do you want to get the list of articles that have been shared the most on Facebook and Twitter on a particular date? What about the most relevant event based on shares on social media?
Daily mentions and sentiment of concepts and categories. Are you interested in knowing how often was a particular concept or category mentioned in the news in the previous two years? How about the sentiment expressed on social media about your favorite politician?
Correlations of concepts. Do you have some time series of daily measurements? Why not find the concepts that correlate the most with it based on the number of mentions in the news.
Core Information
Usage tracking
Terminology
EventRegistry
class
ReturnInfo
class
Data models for returned information
Finding concepts for keywords
Filtering content by news sources
Text analytics
Semantic annotation, categorization, sentiment
Searching
Searching for events
Searching for articles
Article/event info
Get event information
Get article information
Other
Supported languages
Different ways to search using keywords
Feed of new articles/events
Social media shares
Daily trends
Find the event for your own text
Article URL to URI mapping