/
PackagelutzJuly202019TypePackageTitleLookUpTimeZonesofPointCoordinates PackagelutzJuly202019TypePackageTitleLookUpTimeZonesofPointCoordinates

PackagelutzJuly202019TypePackageTitleLookUpTimeZonesofPointCoordinates - PDF document

blanko
blanko . @blanko
Follow
343 views
Uploaded On 2021-10-06

PackagelutzJuly202019TypePackageTitleLookUpTimeZonesofPointCoordinates - PPT Presentation

2tzlistAuthorAndyTeucherautcrexhttpxsxorcixdorg000000027840692XBobRudisctbxhttpxsxorcixdorg0000000156702640MaintainerAndyTeucherxandyxteuxcherxgmaxilcxom00RepositoryCRANDatePublication201 ID: 896766

lookup fast accurate state fast lookup state accurate xhttp xub40 xgith 149 coords offset centers 2tz lat center plot

Share:

Link:

Embed:

Download Presentation from below link

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.


Presentation Transcript

1 Package`lutz'July20,2019TypePackageTitle
Package`lutz'July20,2019TypePackageTitleLookUpTimeZonesofPointCoordinatesVersion0.3.1DescriptionInputlatitudeandlongitudevaluesoransf/sfcPOINTobjectandgetbackthetimezoneinwhichtheyexist.Twomethodsareimplemented.OneisveryfastandusesRcppinconjunctionwithdatafromtheJavascriptlibrary(.com/darksk&#xhttp;&#xs://;&#xgith;&#xub40;yapp/tz-lookup/).Thismethodalsoworksoutsideofcountriesbordersandininternationalwaters,howeverspeedcomesatthecostofaccuracy-neartimezonebordersawayfrompopulatedcentresthereisachancethatitwillreturntheincorrecttimezone.Theothermethodisslowerbutmoreaccurate-itusesthesfpackagetointersectpointswithadetailedmapoftimezonesfromhere:.com/evansiroky/timezone-boundary-b&#xhttp;&#xs://;&#xgith;&#xub40;uilder/.Thepackagealsocontainsseveralutilityfunctionsforhelpingtounderstandandvisualizetimezones,suchaslistingofworldtimezones,includinginformationaboutdaylightsavingstimesandtheiroffsetsfromUTC.YoucanalsoplotatimezonetovisualizetheUTCoffsetoverayearandwhendaylightsavingstime

2 sareineffect.LicenseMIT+leLICENSEURL
sareineffect.LicenseMIT+leLICENSEURLhttps://andyteucher.ca/lutzBugReportshttps://github.com/ateucher/lutz/issuesSystemRequirementsC++11DependsR&#xhttp;&#xs://;&#xgith;&#xub40;(=3.2)Importsstats,Rcpp,lubridateSuggeststestthat&#xhttp;&#xs://;&#xgith;&#xub40;(=2.1.0),sf&#xhttp;&#xs://;&#xgith;&#xub40;(=0.7),sp,rgdal,datasets,covr,ggplot2EncodingUTF-8LazyDatatrueRoxygenNote6.1.1LinkingToRcppNeedsCompilationyes1 2tz_listAuthorAndyTeucher[aut,cre](&#xhttp;&#xs://;&#xorci; .or;᠀g/0000-0002-7840-692X),BobRudis[ctb](&#xhttp;&#xs://;&#xorci; .or;᠀g/0000-0001-5670-2640)MaintainerAndyTeucher ndy;&#x.teu; her;&#x@gma;&#xil.c;&#xom00;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:thenameofthetimezone•zone:timezone•is_dst:isthetimezoneindaylightsavingstime•utc_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

Related Contents


Next Show more