Giter Site home page Giter Site logo

sporteventlocator's Introduction

SportEventLocator

Developed by Raül Caldera, Eric Estévez and Juan Luis de la Cruz

Presentation

  • Title
  • Objectives
  • Group comps
  • Roles of each component -> divide the work
  • Calendar

Getting locations libs

https://pypi.org/project/pyproj/ - transform coordinates

https://pypi.org/project/OWSLib/ - get images

https://pypi.org/project/opencv-python/ - compute images

Getting twits libs

https://pypi.org/project/twython/ - twitter API wrapper

https://pandas.pydata.org/ - data analysis

Data parallellization

https://spark.apache.org/ - image processing parallelization

Football fields detection

Image processing for the detection of the football fields is done with the opencv library for python. The library numpy is also used to create arrays.

The goal of the image processing is to detect several football fields from several images around the area of Barcelona. Once the football fields are detected, their longitude and latitude coordinates are calculated and stored in a dictionary as well as in a csv file, so that later, tweets can be found in these locations.

Since we have to get many images at once and process them, the image processing is parallelized using Spark. The steps are the following:

  • Get the satellite images around the area of Barcelona using owslib.
  • Apply a green colour filter to find the forms of the football field.
  • Apply a canny edge detector to get the edges of the green forms.
  • Filter the contours, by shape (number of corners should be 4) and area.
  • Get the coordinates (longitude and latitude), by doing conversions (pixels to meters, and meters to degrees). This is done using the pyproj library.

All the functions related to image processing are in the image_processing.py script. The parallelization of the image gathering and processing, as well as the location collection in a dictionary is done in the location_finder.py script.

The fullmap.py has functions that allow to represent the processed locations in a Barcelona map.

Tweet collection

The twitter_scrapper.py script contains functions to collect tweets in a specific location. The search result is saved in a csv. In order to execute this script you must obtain the credentials "CONSUMER_KEY","CONSUMER_SECRET","ACCESS_TOKEN" and "ACCESS_SECRET'" on the official twitter page.

Tweet filtering

The tweet_filter.py script contains functions that allow to filter the tweets gathered in a csv file. It filters them by location proximity to the detected football fields. Then, a key word filtering is applied to get tweets with certain words that could have valuable information regarding football events. Finally, the occurrence of each key word in a certain range of time (e.g 30 minutes) is calculated and stored as useful data to implement the football match predictive model.

sporteventlocator's People

Contributors

juanlucruz avatar raulcaldera avatar stvez avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

stvez

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.