Giter VIP home page Giter VIP logo

karachi24's Introduction

Karachi24

A repo showing important events, news, and community updates related to Karachi and areas around it.

Tweet Harvester

We have implemented a simple harvester that pulls tweets from twitter for a particular topic at a schedule. We then perform Sentiment analysis of tweets using AWS Lake Formation/Glue.

Results are saved to s3 and DynamoDb Table.

K24 Tweet Harvester

Example Tweet Queries

We save twitter queries to a DynamoDb Config table. During each run, active (enabled=1) queries are read from the Config table, and then supplied to the downstream MAP State function via a JSON input param.

{
    "Id": 1,
    "enabled": "1",
    "description": "These tweets are related to Karachi",
    "queries": [{
            "Id": 1,
            "category": "text",
            "topic": "karachi",
            "q": "Karachi OR #Karachi OR karachi OR #karachi min_retweets:10 min_faves:10 -filter:replies -filter:images -filter:videos -filter:news geocode:24.874553,67.0398131,200mi",
            "count": 1500,
            "since_id": "1312862399490220002",
            "enabled": "1"
        },
        {
            "Id": 2,
            "category": "images",
            "topic": "karachi",
            "q": "Karachi OR #Karachi OR karachi OR #karachi min_retweets:10 min_faves:10 -filter:replies filter:images geocode:24.874553,67.0398131,200mi",
            "count": 1500,
            "since_id": "1312862399490220002",
            "enabled": "1"
        },
        {
            "Id": 3,
            "category": "videos",
            "topic": "karachi",
            "q": "Karachi OR #Karachi OR karachi OR #karachi min_retweets:10 min_faves:10 -filter:replies filter:videos",
            "count": 1500,
            "since_id": "1312862399490220002",
            "enabled": "1"
        },
        {
            "Id": 4,
            "category": "news",
            "topic": "karachi",
            "q": "Karachi OR #Karachi OR karachi OR #karachi min_retweets:10 min_faves:10 -filter:replies filter:news",
            "count": 1500,
            "since_id": "1312862399490220002",
            "enabled": "0"
        }
    ]
}

Results are saved to S3

JSON result is saved to S3 folder structure resembling Apache HIVE format.

<bucket root>/k24dataharvester/tweets/YYYY/MM/<file name>.json
<bucket root>/k24dataharvester/tweets/2020/10/1-text-karachi-since-1318121184316264449-2020_10_19-09_13_17_PM-result-5-rows.json

K24 S3

karachi24's People

Contributors

bilgrami avatar

Watchers

 avatar  avatar

Forkers

volvox99

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.