Skip to content

Instantly share code, notes, and snippets.

View dshkol's full-sized avatar

Dmitry Shkolnik dshkol

View GitHub Profile
library(rtweet)
library(lubridate)
library(dplyr)
library(ggplot2)
q <- '#firebenning OR "fire benning" OR "benning fired"'
fb <- search_tweets(q, n = 18000, retryonratelimit = TRUE)
fb %>%
mutate(created_at_pst <- with_tz(created_at, "pst"),
hour = floor_date(created_at_pst, unit = "hour")) %>%
Coordinate Reference System:
User input: EPSG:3414
wkt:
PROJCRS["SVY21 / Singapore TM",
BASEGEOGCRS["SVY21",
DATUM["SVY21",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
POLYGON ((35402.63 36965.83, 35398.52 36808.82, 35386.2 36652.24, 35365.7 36496.52, 35337.07 36342.09, 35300.41 36189.37, 35255.8 36038.78, 35203.37 35890.72, 35143.27 35745.62, 35075.65 35603.85, 35000.71 35465.83, 34918.64 35331.91, 34829.68 35202.47, 34734.07 35077.87, 34632.07 34958.43, 34523.95 34844.51, 34410.02 34736.39, 34290.59 34634.39, 34165.99 34538.78, 34036.55 34449.81, 33902.63 34367.75, 33764.6 34292.81, 33622.84 34225.19, 33477.73 34165.08, 33329.68 34112.66, 33179.09 34068.05, 33026.37 34031.38, 32871.93 34002.76, 32716.22 33982.26, 32559.64 33969.94, 32402.63 33965.83, 32245.62 33969.94, 32089.05 33982.26, 31933.33 34002.76, 31778.9 34031.38, 31626.17 34068.05, 31475.58 34112.66, 31327.53 34165.08, 31182.42 34225.19, 31040.66 34292.81, 30902.63 34367.75, 30768.71 34449.81, 30639.28 34538.78, 30514.67 34634.39, 30395.24 34736.39, 30281.31 34844.51, 30173.2 34958.43, 30071.19 35077.87, 29975.58 35202.47, 29886.62 35331.91, 29804.55 35465.83, 29729.61 35603.85, 29661.99 35745.62, 29601.89 3589
latitude longitude id
1.35058 103.872879 1
1.352333 103.944692 2
1.334565 103.962672 3
1.339028 103.705937 4
1.392002 103.904984 5
1.264667 103.821703 6
1.300723 103.838455 7
1.369104 103.848957 8
1.299604 103.855718 9
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dshkol
dshkol / sg_2015_electoral.geojson
Created July 18, 2020 10:01
sg_2015_electoral.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dshkol
dshkol / sg_national_map.geojson
Created July 18, 2020 08:17
sg_national_map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dshkol
dshkol / singapore_nea_hawkers.geojson
Created July 18, 2020 07:35
singapore_nea_hawkers.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dshkol
dshkol / singapore_electoral_boudaries.geojson
Created August 15, 2019 07:35
singapore_electoral_boudaries.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dshkol
dshkol / gist:84f6fc607dcf3245770738b947cae129
Created August 15, 2019 07:35
singapore_electoral_boudaries.geojson
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Name": "kml_1", "Description": "<center><table><tr><th colspan='2' align='center'><em>Attributes<\/em><\/th><\/tr><tr bgcolor=\"#E3E3F3\"> <th>ED_DESC<\/th> <td>HOUGANG<\/td> <\/tr><tr bgcolor=\"\"> <th>ED_CODE<\/th> <td>HG<\/td> <\/tr><tr bgcolor=\"#E3E3F3\"> <th>INC_CRC<\/th> <td>A6F85B435F5CDA8D<\/td> <\/tr><tr bgcolor=\"\"> <th>FMEL_UPD_D<\/th> <td>20150916151419<\/td> <\/tr><\/table><\/center>" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 103.900787146709007, 1.36945640171142, 0.0 ], [ 103.900212865374002, 1.36802070520838, 0.0 ], [ 103.899723811661005, 1.36673281356874, 0.0 ], [ 103.898193713487998, 1.36528728629124, 0.0 ], [ 103.896465296361001, 1.36363623290045, 0.0 ], [ 103.896075673224999, 1.36326407673258, 0.0 ], [ 103.895908307319999, 1.362