Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Plot NSW AEC data on leaflet map
# how to draw a map -- and some geospatial points -- using R
# get the data
pollingPlaces <-"", skip = 1))
nswReps <-"", skip = 1))
# inner join to add lat and longtitude data
nswReps[pollingPlaces[, list(PollingPlaceID, Latitude, Longitude)],
`:=` (lat = i.Latitude, long = i.Longitude),
on = 'PollingPlaceID']
# part 1: out first map
# create a simple map -- show all pollling places in NSW
nswVotingPlaces <- leaflet(nswReps) %>%
addTiles() %>%
addCircleMarkers(lat = ~lat, lng = ~long, popup = ~DivisionNm,
col = 'red', stroke = FALSE, fillOpacity = 0.01)

This comment has been minimized.

Copy link
Owner Author

@fauxvalue fauxvalue commented Jun 30, 2019

fixed a little big

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment