2tzlistAuthorAndyTeucherautcrexhttpxsxorcixdorg000000027840692XBobRudisctbxhttpxsxorcixdorg0000000156702640MaintainerAndyTeucherxandyxteuxcherxgmaxilcxom00RepositoryCRANDatePublication201 ID: 896766
Download Pdf The PPT/PDF document "PackagelutzJuly202019TypePackageTitleLoo..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1 Package`lutz'July20,2019TypePackageTitle
Package`lutz'July20,2019TypePackageTitleLookUpTimeZonesofPointCoordinatesVersion0.3.1DescriptionInputlatitudeandlongitudevaluesoransf/sfcPOINTobjectandgetbackthetimezoneinwhichtheyexist.Twomethodsareimplemented.OneisveryfastandusesRcppinconjunctionwithdatafromtheJavascriptlibrary(.com/darkskhttp;s://;gith;ub40;yapp/tz-lookup/).Thismethodalsoworksoutsideofcountriesbordersandininternationalwaters,howeverspeedcomesatthecostofaccuracy-neartimezonebordersawayfrompopulatedcentresthereisachancethatitwillreturntheincorrecttimezone.Theothermethodisslowerbutmoreaccurate-itusesthesfpackagetointersectpointswithadetailedmapoftimezonesfromhere:.com/evansiroky/timezone-boundary-bhttp;s://;gith;ub40;uilder/.Thepackagealsocontainsseveralutilityfunctionsforhelpingtounderstandandvisualizetimezones,suchaslistingofworldtimezones,includinginformationaboutdaylightsavingstimesandtheiroffsetsfromUTC.YoucanalsoplotatimezonetovisualizetheUTCoffsetoverayearandwhendaylightsavingstime
2 sareineffect.LicenseMIT+leLICENSEURL
sareineffect.LicenseMIT+leLICENSEURLhttps://andyteucher.ca/lutzBugReportshttps://github.com/ateucher/lutz/issuesSystemRequirementsC++11DependsRhttp;s://;gith;ub40;(=3.2)Importsstats,Rcpp,lubridateSuggeststestthathttp;s://;gith;ub40;(=2.1.0),sfhttp;s://;gith;ub40;(=0.7),sp,rgdal,datasets,covr,ggplot2EncodingUTF-8LazyDatatrueRoxygenNote6.1.1LinkingToRcppNeedsCompilationyes1 2tz_listAuthorAndyTeucher[aut,cre](http;s://;orci; .or;᠀g/0000-0002-7840-692X),BobRudis[ctb](http;s://;orci; .or;᠀g/0000-0001-5670-2640)MaintainerAndyTeucher ndy;.teu;her;@gma;il.c;om00;RepositoryCRANDate/Publication2019-07-1922:10:03UTCRtopicsdocumented:tz_list............................................2tz_lookup..........................................2tz_lookup_coords......................................3tz_offset...........................................4tz_plot............................................5 tz_listCreatealistofTimeZones DescriptionOutputalistofti
3 mezonenames,withdaylightsavingstimeandut
mezonenames,withdaylightsavingstimeandutcoffsetUsagetz_list()ValueAdata.frameofalltimezonesonyoursystem.Columns:tz_name:thenameofthetimezonezone:timezoneis_dst:isthetimezoneindaylightsavingstimeutc_offset_h:offsetfromUTC(inhours) tz_lookup3 tz_lookupLookuptimezonesofsforsppoints DescriptionTherearetwomethods-"fast",and"accurate".The"fast"versioncanlookupmanythousandsofpointsveryquickly,howeverwhenapointisnearatimezoneboundaryandnotnearapopulatedcentre,itmayreturntheincorrecttimezone.Ifaccuracyismoreimportantthanspeed,usemethod="accurate".Usagetz_lookup(x,crs=NULL,method="fast",warn=TRUE)ArgumentsxeitheransfcorsfpointsorSpatialPoints(DataFrame)objectcrsthecoordinatereferencesystem:integerwiththeEPSGcode,orcharacterwithproj4string.Ifnotspecied(i.e.,NULL)andxhasnoexistingcrs,EPSG:4326isassumed(lat/long).methodmethodbywhichtodothelookup.Either"fast"(default)or"accurate".warnBydefault,ifmethod="fast"awarningisissuedaboutthepotentialforinaccurateresults.SetwarntoFALSEtoturnthisoff.DetailsNotethatthere
4 aresomeregionsintheworldwhereasinglepoin
aresomeregionsintheworldwhereasinglepointcanlandintwodifferentoverlap-pingtimezones.The"accurate"methodincludesthese,andwhentheyareencounteredtheyareconcatenatedinasinglestring,separatedbyasemicolon.Thedatausedinthe"fast"methoddoesnotincludeoverlappingtimezonesatthistime.Valuecharactervectorthesamelengthasxspecifyingthetimezoneofthepoints.Examplesif(require("sf")){state_ptslapply(seq_along(state.center$x),function(i){st_point(c(state.center$x[i],state.center$y[i]))})state_centers_sfst_sf(st_sfc(state_pts))state_centers_sf$tztz_lookup(state_centers_sf) 4tz_lookup_coordsplot(state_centers_sf[,"tz"])} tz_lookup_coordsLookuptimezonesoflat/longpairs DescriptionTherearetwomethods-"fast",and"accurate".The"fast"versioncanlookupmanythousandsofpointsveryquickly,howeverwhenapointisnearatimezoneboundaryandnotnearapopulatedcentre,itmayreturntheincorrecttimezone.Ifaccuracyismoreimportantthanspeed,usemethod="accurate".Usagetz_lookup_coords(lat,lon,method="fast",warn=TRUE)Argumentslatnumericvectoroflatitudeslonnumericvectoroflongitudesthe
5 samelengthasxmethodmethodbywhichtodothel
samelengthasxmethodmethodbywhichtodothelookup.Either"fast"(default)or"accurate".warnBydefault,ifmethod="fast"awarningisissuedaboutthepotentialforinaccurateresults.SetwarntoFALSEtoturnthisoff.Valuecharactervectorthesamelengthasxandyspecifyingthetimezoneofthepoints.Examplestz_lookup_coords(42,-123)tz_lookup_coords(lat=c(48.9,38.5,63.1,-25),lon=c(-123.5,-110.2,-95.0,130)) tz_offset5 tz_offsetFindtheoffsetfromUTCataparticulardate/timeinaparticulartimezone DescriptionFindtheoffsetfromUTCataparticulardate/timeinaparticulartimezoneUsagetz_offset(dt,tz="")ArgumentsdtDate,POSIXtordate-likecharacterstringtzAtimezonenamefrombase::OlsonNames().NotrequiredifdtisaPOSIXtobjectwithatimezonecomponent.Valueaone-rowdataframewithdetailsofthetimezoneExamplestz_offset("2018-06-12","America/Moncton") tz_plotPlotatimezone DescriptionMakeacircularplotofatimezone,visualizingtheUTCoffsetoverthecourseoftheyear,includingDaylightSavingstimesUsagetz_plot(tz)Argumentstzavalidtimezonename.SeeOlsonNames()Valueaggplot2objectExamplestz_plot("America/Vancouve