{"id":21101604,"url":"https://github.com/decodedco/twitter-map","last_synced_at":"2026-02-18T17:32:03.231Z","repository":{"id":24206129,"uuid":"27597686","full_name":"DecodedCo/twitter-map","owner":"DecodedCo","description":"A library for creating a map of tweets from the Twitter API","archived":false,"fork":false,"pushed_at":"2016-09-22T09:38:09.000Z","size":15,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-10-11T09:38:25.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DecodedCo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-05T15:35:34.000Z","updated_at":"2016-11-23T22:19:28.000Z","dependencies_parsed_at":"2022-08-22T12:10:28.314Z","dependency_job_id":null,"html_url":"https://github.com/DecodedCo/twitter-map","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DecodedCo/twitter-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecodedCo%2Ftwitter-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecodedCo%2Ftwitter-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecodedCo%2Ftwitter-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecodedCo%2Ftwitter-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DecodedCo","download_url":"https://codeload.github.com/DecodedCo/twitter-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecodedCo%2Ftwitter-map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T23:47:30.977Z","updated_at":"2026-02-18T17:32:03.206Z","avatar_url":"https://github.com/DecodedCo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Twitter Map Library\n===========\n\nA library for creating a map of tweets, live, from the Twitter API.\n\nThis library will allow you to add tweets onto a Google Map, and to perform live sentiment analysis on each tweet that comes in. There are two functions that come with the library:\n\n## Google Maps API - Simple Map\n\nUse the Google Maps API to embed a map in your webpage. Google requires an API key for the map to work. \nChange the latitude, longitude and zoom level of your map. You can style your map very easily, for example using snazzy maps.\n\n## JavaScript\n\nAdd the javascript code (tweet-map.js) to your webpage.\n\n## Accessing Twitter\n\nJust below `var map;`, paste:\n\n```\nvar controller = {};\n\n//Settings for twitter. What lat/lon should it look for? Withing which radius?\nvar mapConfigs = {\n   latitude: 51.5044477,\n   longitude: -0.130291,\n   radius: 500\n}; \n      \nfunction pageControlsInit () {\n  //this function will access access the twitter api\n}\n\n```\n\n## addMarker\n\n\nThe addMarker adds a marker to a Google Map on your page. To use this function, supply a latitude, longitude and some text. If you want sentiment analysis to be performed on the text then add a sentiment value. It should look something like this:\n\n```\nfunction pageControlsInit () {\n  \n  //this function will access access the twitter api\n  controller.addMarker(51, -0.1, 'This is so great');\n  controller.addMarker(51, -0.1, 'This is so great', 'sentiment');\n\n}\n\n```\n\n## Editing the styling of the markers\n\nWe can personalise the colours of the bubbles as follows. Above `var mapConfigs`, paste:\n\n```\nvar markerConfigs = {\n  positive: {\n    color: 'rgb(43, 24, 92)',\n    strength: 0.5,\n    size: 50\n  },\n  neutral: {\n    color: 'rgb(255, 255, 255)',\n    strength: 0.8,\n    size: 20\n  },\n  negative: {\n    color: 'rgb(0, 0, 0)',\n    strength: 0.8,\n    size: 20\n  }\n}\n```\n\n## startStream\n\nThe startStream function will get all live tweets from an area and the map to update in real time. For sentiment analysis to be performed on the text then add a sentiment value - imdb for analysis using machine learning, and dictionary for analysis using dictionary words. See the difference at sentiment.decoded.com\n\n\n```\nfunction pageControlsInit () {\n  //this function will access access the twitter api\n  controller.addMarker(51, -0.1, 'This is so great');\n  controller.addMarker(51, -0.1, 'This is so great', 'sentiment');\n  \n  // Start twitter.\n  controller.startStream({\n    sentiment: 'imdb'\n  });\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodedco%2Ftwitter-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecodedco%2Ftwitter-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecodedco%2Ftwitter-map/lists"}