{"id":328404,"date":"2022-07-07T07:22:13","date_gmt":"2022-07-07T13:22:13","guid":{"rendered":"https:\/\/rud.is\/b\/?p=13494"},"modified":"2022-07-07T07:22:13","modified_gmt":"2022-07-07T13:22:13","slug":"introducing-weatherkit-the-eventual-replacement-r-package-for-darksky","status":"publish","type":"post","link":"https:\/\/www.r-bloggers.com\/2022\/07\/introducing-weatherkit-the-eventual-replacement-r-package-for-darksky\/","title":{"rendered":"Introducing {weatherkit}: The Eventual Replacement R Package for {darksky}"},"content":{"rendered":"<!-- \r\n<div style=\"min-height: 30px;\">\r\n[social4i size=\"small\" align=\"align-left\"]\r\n<\/div>\r\n-->\r\n\r\n<div style=\"border: 1px solid; background: none repeat scroll 0 0 #EDEDED; margin: 1px; font-size: 12px;\">\r\n[This article was first published on  <strong><a href=\"https:\/\/rud.is\/b\/2022\/07\/07\/introducing-weatherkit-the-eventual-replacement-r-package-for-darksky\/\"> R \u2013 rud.is<\/a><\/strong>, and kindly contributed to <a href=\"https:\/\/www.r-bloggers.com\/\" rel=\"nofollow\">R-bloggers<\/a>].  (You can report issue about the content on this page <a href=\"https:\/\/www.r-bloggers.com\/contact-us\/\">here<\/a>)\r\n<hr>Want to share your content on R-bloggers?<a href=\"https:\/\/www.r-bloggers.com\/add-your-blog\/\" rel=\"nofollow\"> click here<\/a> if you have a blog, or <a href=\"http:\/\/r-posts.com\/\" rel=\"nofollow\"> here<\/a> if you don't.\r\n<\/div>\n<p>My {<a href=\"https:\/\/github.com\/hrbrmstr\/darksky\" rel=\"nofollow\" target=\"_blank\">darksky<\/a>} package has been around for years, now, and the service that powers it was purchased by Apple before the pandemic. The DarkSky API is slated to be shuttered in December of this year and is being replaced by Apple\u2019s <a href=\"https:\/\/developer.apple.com\/weatherkit\/\" rel=\"nofollow\" target=\"_blank\">WeatherKit<\/a> xOS Framework and REST API.<\/p>\n<p>I\u2019ve started work on a {<a href=\"https:\/\/github.com\/hrbrmstr\/weatherkit\" rel=\"nofollow\" target=\"_blank\">weatherkit<\/a>} package which uses the WeatherKit REST API. You\u2019ll need an Apple Developer account and will also need to <a href=\"https:\/\/github.com\/hrbrmstr\/weatherkit\/blob\/batman\/authorization.md\" rel=\"nofollow\" target=\"_blank\">setup some items in said account, and locally<\/a> so you can authenticate to the API. Once all the authentication bits are setup, it\u2019s pretty easy to get the weather data:<\/p>\n<pre>wx &lt;- wxkit_weather(43.2683199, -70.8635506)\nwx &lt;- wx_tidy(wx)\nstr(wx)\n## List of 4\n##  $ currentWeather  :List of 18\n##   ..$ name                  : chr &quot;CurrentWeather&quot;\n##   ..$ metadata              :List of 8\n##   .. ..$ attributionURL: chr &quot;https:\/\/weather-data.apple.com\/legal-attribution.html&quot;\n##   .. ..$ expireTime    : POSIXct[1:1], format: &quot;2022-07-07 12:28:07&quot;\n##   .. ..$ latitude      : num 43.3\n##   .. ..$ longitude     : num -70.9\n##   .. ..$ readTime      : POSIXct[1:1], format: &quot;2022-07-07 12:23:07&quot;\n##   .. ..$ reportedTime  : POSIXct[1:1], format: &quot;2022-07-07 10:48:55&quot;\n##   .. ..$ units         : chr &quot;m&quot;\n##   .. ..$ version       : int 1\n##   ..$ asOf                  : POSIXct[1:1], format: &quot;2022-07-07 12:23:07&quot;\n##   ..$ cloudCover            : num 0.29\n##   ..$ conditionCode         : chr &quot;MostlyClear&quot;\n##   ..$ daylight              : logi TRUE\n##   ..$ humidity              : num 0.68\n##   ..$ precipitationIntensity: num 0\n##   ..$ pressure              : num 1018\n##   ..$ pressureTrend         : chr &quot;rising&quot;\n##   ..$ temperature           : num 19.5\n##   ..$ temperatureApparent   : num 19.4\n##   ..$ temperatureDewPoint   : num 13.5\n##   ..$ uvIndex               : int 2\n##   ..$ visibility            : num 29413\n##   ..$ windDirection         : int 50\n##   ..$ windGust              : num 12\n##   ..$ windSpeed             : num 4.42\n##  $ forecastDaily   :List of 3\n##   ..$ name    : chr &quot;DailyForecast&quot;\n##   ..$ metadata:List of 8\n##   .. ..$ attributionURL: chr &quot;https:\/\/weather-data.apple.com\/legal-attribution.html&quot;\n##   .. ..$ expireTime    : POSIXct[1:1], format: &quot;2022-07-07 13:23:07&quot;\n##   .. ..$ latitude      : num 43.3\n##   .. ..$ longitude     : num -70.9\n##   .. ..$ readTime      : POSIXct[1:1], format: &quot;2022-07-07 12:23:07&quot;\n##   .. ..$ reportedTime  : POSIXct[1:1], format: &quot;2022-07-07 10:48:55&quot;\n##   .. ..$ units         : chr &quot;m&quot;\n##   .. ..$ version       : int 1\n##   ..$ days    :'data.frame': 10 obs. of  26 variables:\n##   .. ..$ forecastStart      : POSIXct[1:10], format: &quot;2022-07-07 04:00:00&quot; &quot;2022-07-08 04:00:00&quot; &quot;2022-07-09 04:00:00&quot; &quot;2022-07-10 04:00:00&quot; ...\n##   .. ..$ forecastEnd        : POSIXct[1:10], format: &quot;2022-07-08 04:00:00&quot; &quot;2022-07-09 04:00:00&quot; &quot;2022-07-10 04:00:00&quot; &quot;2022-07-11 04:00:00&quot; ...\n##   .. ..$ conditionCode      : chr [1:10] &quot;PartlyCloudy&quot; &quot;PartlyCloudy&quot; &quot;MostlyClear&quot; &quot;MostlyClear&quot; ...\n##   .. ..$ maxUvIndex         : int [1:10] 7 7 7 8 7 6 7 4 5 4\n##   .. ..$ moonPhase          : chr [1:10] &quot;firstQuarter&quot; &quot;firstQuarter&quot; &quot;waxingGibbous&quot; &quot;waxingGibbous&quot; ...\n##   .. ..$ moonrise           : POSIXct[1:10], format: &quot;2022-07-07 17:38:12&quot; &quot;2022-07-08 18:50:47&quot; &quot;2022-07-09 20:07:35&quot; &quot;2022-07-10 21:27:35&quot; ...\n##   .. ..$ moonset            : POSIXct[1:10], format: &quot;2022-07-07 04:32:48&quot; &quot;2022-07-08 04:54:51&quot; &quot;2022-07-09 05:20:27&quot; &quot;2022-07-10 05:51:50&quot; ...\n##   .. ..$ precipitationAmount: num [1:10] 0 0.49 0 0 0 1.32 0.24 3.44 5.07 8.35\n##   .. ..$ precipitationChance: num [1:10] 0.01 0.15 0.07 0 0.07 0.39 0.37 0.4 0.47 0.44\n##   .. ..$ precipitationType  : chr [1:10] &quot;clear&quot; &quot;rain&quot; &quot;clear&quot; &quot;clear&quot; ...\n##   .. ..$ snowfallAmount     : num [1:10] 0 0 0 0 0 0 0 0 0 0\n##   .. ..$ solarMidnight      : POSIXct[1:10], format: &quot;2022-07-07 04:48:29&quot; &quot;2022-07-08 04:48:39&quot; &quot;2022-07-09 04:48:49&quot; &quot;2022-07-10 04:48:58&quot; ...\n##   .. ..$ solarNoon          : POSIXct[1:10], format: &quot;2022-07-07 16:48:26&quot; &quot;2022-07-08 16:48:35&quot; &quot;2022-07-09 16:48:44&quot; &quot;2022-07-10 16:48:53&quot; ...\n##   .. ..$ sunrise            : POSIXct[1:10], format: &quot;2022-07-07 09:10:59&quot; &quot;2022-07-08 09:11:42&quot; &quot;2022-07-09 09:12:26&quot; &quot;2022-07-10 09:13:11&quot; ...\n##   .. ..$ sunriseCivil       : POSIXct[1:10], format: &quot;2022-07-07 08:36:06&quot; &quot;2022-07-08 08:36:53&quot; &quot;2022-07-09 08:37:41&quot; &quot;2022-07-10 08:38:31&quot; ...\n##   .. ..$ sunriseNautical    : POSIXct[1:10], format: &quot;2022-07-07 07:50:45&quot; &quot;2022-07-08 07:51:39&quot; &quot;2022-07-09 07:52:36&quot; &quot;2022-07-10 07:53:34&quot; ...\n##   .. ..$ sunriseAstronomical: POSIXct[1:10], format: &quot;2022-07-07 06:55:17&quot; &quot;2022-07-08 06:56:30&quot; &quot;2022-07-09 06:57:46&quot; &quot;2022-07-10 06:59:04&quot; ...\n##   .. ..$ sunset             : POSIXct[1:10], format: &quot;2022-07-08 00:25:50&quot; &quot;2022-07-09 00:25:26&quot; &quot;2022-07-10 00:24:59&quot; &quot;2022-07-11 00:24:30&quot; ...\n##   .. ..$ sunsetCivil        : POSIXct[1:10], format: &quot;2022-07-08 01:00:39&quot; &quot;2022-07-09 01:00:10&quot; &quot;2022-07-10 00:59:38&quot; &quot;2022-07-11 00:59:04&quot; ...\n##   .. ..$ sunsetNautical     : POSIXct[1:10], format: &quot;2022-07-08 01:46:01&quot; &quot;2022-07-09 01:45:23&quot; &quot;2022-07-10 01:44:42&quot; &quot;2022-07-11 01:43:58&quot; ...\n##   .. ..$ sunsetAstronomical : POSIXct[1:10], format: &quot;2022-07-08 02:41:14&quot; &quot;2022-07-09 02:40:16&quot; &quot;2022-07-10 02:39:14&quot; &quot;2022-07-11 02:38:09&quot; ...\n##   .. ..$ temperatureMax     : num [1:10] 25.8 28.7 24.9 25.4 28.9 ...\n##   .. ..$ temperatureMin     : num [1:10] 13.7 16.3 14.8 12.2 12.4 ...\n##   .. ..$ daytimeForecast    :'data.frame':   10 obs. of  11 variables:\n##   .. .. ..$ forecastStart      : POSIXct[1:10], format: &quot;2022-07-07 11:00:00&quot; &quot;2022-07-08 11:00:00&quot; &quot;2022-07-09 11:00:00&quot; &quot;2022-07-10 11:00:00&quot; ...\n##   .. .. ..$ forecastEnd        : POSIXct[1:10], format: &quot;2022-07-07 23:00:00&quot; &quot;2022-07-08 23:00:00&quot; &quot;2022-07-09 23:00:00&quot; &quot;2022-07-10 23:00:00&quot; ...\n##   .. .. ..$ cloudCover         : num [1:10] 0.39 0.45 0.33 0.11 0.42 0.69 0.39 0.95 0.87 0.88\n##   .. .. ..$ conditionCode      : chr [1:10] &quot;PartlyCloudy&quot; &quot;PartlyCloudy&quot; &quot;MostlyClear&quot; &quot;Clear&quot; ...\n##   .. .. ..$ humidity           : num [1:10] 0.57 0.58 0.54 0.47 0.49 0.63 0.64 0.71 0.7 0.66\n##   .. .. ..$ precipitationAmount: num [1:10] 0 0.31 0 0 0 0.26 0.17 3.15 0.22 1.37\n##   .. .. ..$ precipitationChance: num [1:10] 0 0.09 0.04 0 0.02 0.29 0.16 0.31 0.33 0.3\n##   .. .. ..$ precipitationType  : chr [1:10] &quot;clear&quot; &quot;rain&quot; &quot;clear&quot; &quot;clear&quot; ...\n##   .. .. ..$ snowfallAmount     : num [1:10] 0 0 0 0 0 0 0 0 0 0\n##   .. .. ..$ windDirection      : int [1:10] 155 263 122 237 231 228 219 98 39 62\n##   .. .. ..$ windSpeed          : num [1:10] 8.73 9.42 7.42 6.23 9.75 ...\n##   .. ..$ overnightForecast  :'data.frame':   10 obs. of  11 variables:\n##   .. .. ..$ forecastStart      : POSIXct[1:10], format: &quot;2022-07-07 23:00:00&quot; &quot;2022-07-08 23:00:00&quot; &quot;2022-07-09 23:00:00&quot; &quot;2022-07-10 23:00:00&quot; ...\n##   .. .. ..$ forecastEnd        : POSIXct[1:10], format: &quot;2022-07-08 11:00:00&quot; &quot;2022-07-09 11:00:00&quot; &quot;2022-07-10 11:00:00&quot; &quot;2022-07-11 11:00:00&quot; ...\n##   .. .. ..$ cloudCover         : num [1:10] 0.49 0.5 0.15 0.37 0.46 0.4 0.88 0.91 0.8 NA\n##   .. .. ..$ conditionCode      : chr [1:10] &quot;PartlyCloudy&quot; &quot;PartlyCloudy&quot; &quot;MostlyClear&quot; &quot;MostlyClear&quot; ...\n##   .. .. ..$ humidity           : num [1:10] 0.78 0.78 0.71 0.73 0.69 0.81 0.83 0.85 0.84 NA\n##   .. .. ..$ precipitationAmount: num [1:10] 0.06 0.11 0 0 0 1.11 0.04 2.26 6.47 NA\n##   .. .. ..$ precipitationChance: num [1:10] 0.05 0.07 0.01 0.02 0.1 0.27 0.24 0.31 0.31 NA\n##   .. .. ..$ precipitationType  : chr [1:10] &quot;rain&quot; &quot;rain&quot; &quot;clear&quot; &quot;clear&quot; ...\n##   .. .. ..$ snowfallAmount     : num [1:10] 0 0 0 0 0 0 0 0 0 NA\n##   .. .. ..$ windDirection      : int [1:10] 192 341 347 223 218 242 276 13 49 NA\n##   .. .. ..$ windSpeed          : num [1:10] 9.92 7.15 6.59 5.52 10.95 ...\n##   .. ..$ restOfDayForecast  :'data.frame':   10 obs. of  11 variables:\n##   .. .. ..$ forecastStart      : POSIXct[1:10], format: &quot;2022-07-07 12:23:07&quot; NA NA NA ...\n##   .. .. ..$ forecastEnd        : POSIXct[1:10], format: &quot;2022-07-08 04:00:00&quot; NA NA NA ...\n##   .. .. ..$ cloudCover         : num [1:10] 0.47 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ conditionCode      : chr [1:10] &quot;PartlyCloudy&quot; NA NA NA ...\n##   .. .. ..$ humidity           : num [1:10] 0.6 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ precipitationAmount: num [1:10] 0 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ precipitationChance: num [1:10] 0.01 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ precipitationType  : chr [1:10] &quot;clear&quot; NA NA NA ...\n##   .. .. ..$ snowfallAmount     : num [1:10] 0 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ windDirection      : int [1:10] 163 NA NA NA NA NA NA NA NA NA\n##   .. .. ..$ windSpeed          : num [1:10] 9.7 NA NA NA NA NA NA NA NA NA\n##  $ forecastHourly  :List of 3\n##   ..$ name    : chr &quot;HourlyForecast&quot;\n##   ..$ metadata:List of 8\n##   .. ..$ attributionURL: chr &quot;https:\/\/weather-data.apple.com\/legal-attribution.html&quot;\n##   .. ..$ expireTime    : POSIXct[1:1], format: &quot;2022-07-07 13:23:07&quot;\n##   .. ..$ latitude      : num 43.3\n##   .. ..$ longitude     : num -70.9\n##   .. ..$ readTime      : POSIXct[1:1], format: &quot;2022-07-07 12:23:07&quot;\n##   .. ..$ reportedTime  : POSIXct[1:1], format: &quot;2022-07-07 10:48:55&quot;\n##   .. ..$ units         : chr &quot;m&quot;\n##   .. ..$ version       : int 1\n##   ..$ hours   :'data.frame': 243 obs. of  20 variables:\n##   .. ..$ forecastStart         : POSIXct[1:243], format: &quot;2022-07-07 02:00:00&quot; &quot;2022-07-07 03:00:00&quot; &quot;2022-07-07 04:00:00&quot; &quot;2022-07-07 05:00:00&quot; ...\n##   .. ..$ cloudCover            : num [1:243] 0.02 0.01 0.02 0.31 0.44 0.74 0.3 1 0.96 0.32 ...\n##   .. ..$ conditionCode         : chr [1:243] &quot;Clear&quot; &quot;Clear&quot; &quot;Clear&quot; &quot;MostlyClear&quot; ...\n##   .. ..$ daylight              : logi [1:243] FALSE FALSE FALSE FALSE FALSE FALSE ...\n##   .. ..$ humidity              : num [1:243] 0.74 0.78 0.81 0.83 0.86 0.88 0.9 0.92 0.88 0.83 ...\n##   .. ..$ precipitationAmount   : num [1:243] 0 0 0 0 0 0 0 0 0 0 ...\n##   .. ..$ precipitationIntensity: num [1:243] 0 0 0 0 0 0 0 0 0 0 ...\n##   .. ..$ precipitationChance   : num [1:243] 0 0 0 0 0 0 0 0 0 0 ...\n##   .. ..$ precipitationType     : chr [1:243] &quot;clear&quot; &quot;clear&quot; &quot;clear&quot; &quot;clear&quot; ...\n##   .. ..$ pressure              : num [1:243] 1014 1015 1016 1016 1016 ...\n##   .. ..$ pressureTrend         : chr [1:243] &quot;rising&quot; &quot;rising&quot; &quot;rising&quot; &quot;rising&quot; ...\n##   .. ..$ snowfallIntensity     : num [1:243] 0 0 0 0 0 0 0 0 0 0 ...\n##   .. ..$ temperature           : num [1:243] 18.3 17 16.3 15.7 14.9 ...\n##   .. ..$ temperatureApparent   : num [1:243] 18.2 16.9 16.1 15.5 14.7 ...\n##   .. ..$ temperatureDewPoint   : num [1:243] 13.6 13.1 12.9 12.8 12.6 ...\n##   .. ..$ uvIndex               : int [1:243] 0 0 0 0 0 0 0 0 0 1 ...\n##   .. ..$ visibility            : num [1:243] 28105 26514 24730 23883 23669 ...\n##   .. ..$ windDirection         : int [1:243] 315 302 315 308 310 298 307 316 319 6 ...\n##   .. ..$ windGust              : num [1:243] 2.93 2.56 2.92 3.25 3.35 ...\n##   .. ..$ windSpeed             : num [1:243] 2.93 2.56 2.92 3.25 3.35 3.09 3.51 2.91 2.36 4.55 ...\n##  $ forecastNextHour:List of 6\n##   ..$ name         : chr &quot;NextHourForecast&quot;\n##   ..$ metadata     :List of 9\n##   .. ..$ attributionURL: chr &quot;https:\/\/weather-data.apple.com\/legal-attribution.html&quot;\n##   .. ..$ expireTime    : POSIXct[1:1], format: &quot;2022-07-07 13:23:07&quot;\n##   .. ..$ language      : chr &quot;en-US&quot;\n##   .. ..$ latitude      : num 43.3\n##   .. ..$ longitude     : num -70.9\n##   .. ..$ providerName  : chr &quot;US National Weather Service&quot;\n##   .. ..$ readTime      : POSIXct[1:1], format: &quot;2022-07-07 12:23:07&quot;\n##   .. ..$ units         : chr &quot;m&quot;\n##   .. ..$ version       : int 1\n##   ..$ summary      :'data.frame':    1 obs. of  4 variables:\n##   .. ..$ startTime             : POSIXct[1:1], format: &quot;2022-07-07 12:24:00&quot;\n##   .. ..$ condition             : chr &quot;clear&quot;\n##   .. ..$ precipitationChance   : num 0\n##   .. ..$ precipitationIntensity: num 0\n##   ..$ forecastStart: POSIXct[1:1], format: &quot;2022-07-07 12:24:00&quot;\n##   ..$ forecastEnd  : POSIXct[1:1], format: &quot;2022-07-07 13:45:00&quot;\n##   ..$ minutes      :'data.frame':    81 obs. of  3 variables:\n##   .. ..$ startTime             : POSIXct[1:81], format: &quot;2022-07-07 12:24:00&quot; &quot;2022-07-07 12:25:00&quot; &quot;2022-07-07 12:26:00&quot; &quot;2022-07-07 12:27:00&quot; ...\n##   .. ..$ precipitationChance   : num [1:81] 0 0 0 0 0 0 0 0 0 0 ...\n##   .. ..$ precipitationIntensity: num [1:81] 0 0 0 0 0 0 0 0 0 0 ...\n<\/pre>\n<p>The <code>wx_tidy()<\/code> function, for now, only does date-time string conversion to <code>POSIXct<\/code> objects, but it may do more in the future.<\/p>\n<p>It doesn\u2019t appear that historical weather data is available, yet, so you\u2019re limited to using the API to get daily and hourly conditions and forecasts for the present plus some days. As such, I\u2019ve focused a bit on some helper functions to show current conditions and forecasts in the R console\/stdout:<\/p>\n<pre>current_conditions(wx)\n\r\n## \uf8ff Weather for (43.268, -70.864) as of 2022-07-07 08:23:07\n## \n##  Conditions: Mostly Clear\n## Temperature: 67.08\u00b0F\n##  Feels like: 66.92\u00b0F\n##   Dew Point: 56.28\u00b0F\n##        Wind: 2.7 mph (NE)\n##    Pressure: 1017.68 mb (rising)\n##  Visibility: 18 miles\n##    UV Index: \ud83d\udfe9 2 (Low)\n## \n## https:\/\/weather-data.apple.com\/legal-attribution.html\n\r\nhourly_forecast(wx)\n\r\n## \uf8ff Weather forecast for (43.268, -70.864) as of 2022-07-07 08:23:07\n## \n## Today @ 09:00 \u2502 \ud83c\udf21 69\u00b0F \u2502 \ud83d\udca6 63% \u2502 1018 mb \u2014 \u2502 \ud83d\ude0e \u2502 Mostly Clear  \u2502 \ud83d\udfe8\n##       @ 10:00 \u2502 \ud83c\udf21 71\u00b0F \u2502 \ud83d\udca6 58% \u2502 1018 mb \u2014 \u2502 \ud83d\ude0e \u2502 Mostly Clear  \u2502 \ud83d\udfe8\n##       @ 11:00 \u2502 \ud83c\udf21 74\u00b0F \u2502 \ud83d\udca6 55% \u2502 1018 mb \u2014 \u2502 \ud83d\ude0e \u2502 Mostly Clear  \u2502 \ud83d\udfe7\n##       @ 12:00 \u2502 \ud83c\udf21 75\u00b0F \u2502 \ud83d\udca6 53% \u2502 1017 mb \u2014 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe7\n##       @ 13:00 \u2502 \ud83c\udf21 77\u00b0F \u2502 \ud83d\udca6 51% \u2502 1017 mb \u2193 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe7\n##       @ 14:00 \u2502 \ud83c\udf21 78\u00b0F \u2502 \ud83d\udca6 50% \u2502 1016 mb \u2193 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe7\n##       @ 15:00 \u2502 \ud83c\udf21 78\u00b0F \u2502 \ud83d\udca6 50% \u2502 1016 mb \u2193 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe8\n##       @ 16:00 \u2502 \ud83c\udf21 77\u00b0F \u2502 \ud83d\udca6 52% \u2502 1016 mb \u2193 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe8\n##       @ 17:00 \u2502 \ud83c\udf21 76\u00b0F \u2502 \ud83d\udca6 55% \u2502 1015 mb \u2193 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 18:00 \u2502 \ud83c\udf21 75\u00b0F \u2502 \ud83d\udca6 58% \u2502 1015 mb \u2014 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 19:00 \u2502 \ud83c\udf21 73\u00b0F \u2502 \ud83d\udca6 62% \u2502 1015 mb \u2014 \u2502 \ud83d\ude0e \u2502 Mostly Clear  \u2502 \ud83d\udfe9\n##       @ 20:00 \u2502 \ud83c\udf21 70\u00b0F \u2502 \ud83d\udca6 67% \u2502 1015 mb \u2014 \u2502 \ud83d\ude0e \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 21:00 \u2502 \ud83c\udf21 68\u00b0F \u2502 \ud83d\udca6 71% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Mostly Cloudy \u2502 \ud83d\udfe9\n##       @ 22:00 \u2502 \ud83c\udf21 67\u00b0F \u2502 \ud83d\udca6 74% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Mostly Cloudy \u2502 \ud83d\udfe9\n##       @ 23:00 \u2502 \ud83c\udf21 67\u00b0F \u2502 \ud83d\udca6 74% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Mostly Cloudy \u2502 \ud83d\udfe9\n##   Fri @ 00:00 \u2502 \ud83c\udf21 66\u00b0F \u2502 \ud83d\udca6 74% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 01:00 \u2502 \ud83c\udf21 65\u00b0F \u2502 \ud83d\udca6 78% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 02:00 \u2502 \ud83c\udf21 64\u00b0F \u2502 \ud83d\udca6 81% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Mostly Clear  \u2502 \ud83d\udfe9\n##       @ 03:00 \u2502 \ud83c\udf21 63\u00b0F \u2502 \ud83d\udca6 83% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n##       @ 04:00 \u2502 \ud83c\udf21 62\u00b0F \u2502 \ud83d\udca6 85% \u2502 1015 mb \u2014 \u2502 \ud83c\udf15 \u2502 Partly Cloudy \u2502 \ud83d\udfe9\n## \n## https:\/\/weather-data.apple.com\/legal-attribution.html\n<\/pre>\n<p>Note that the attribution is required by Apple.<\/p>\n<p>I\u2019ll likely add a daily forecast console printer soon.<\/p>\n<p>There are a few helper functions in the package for value conversion between unit systems, iconifying some values, and working with time zones. {weatherkit} uses <code>lutz::tz_lookup_coords()<\/code> in places to auto-determine the time zone from lat\/lng pairs, and also includes a function to intuit lat\/lng from an IP address using <a href=\"https:\/\/rud.is\/b\/2022\/07\/07\/introducing-weatherkit-the-eventual-replacement-r-package-for-darksky\/ipapi.co\" rel=\"nofollow\" target=\"_blank\">ipapi<\/a> (they have a generous free tier).<\/p>\n<p>As of the timestamp on this blog post, Apple\u2019s WeatherKit provides up to 500,000 API calls a month per Apple Developer Program membership. If you need additional API calls, monthly subscription plans will be available for purchase sometime after the beta is officially over. This is the expected pricing:<\/p>\n<ul>\n<li>500,000 calls\/month: Included with membership<\/li>\n<li>1 million calls\/month: US$ 49.99<\/li>\n<li>2 million calls\/month: US$ 99.99<\/li>\n<li>5 million calls\/month: US$ 249.99<\/li>\n<li>10 million calls\/month: US$ 499.99<\/li>\n<li>20 million calls\/month: US$ 999.99<\/li>\n<\/ul>\n<p>Apple\u2019s WeatherKit documentation consistently says \u201cApple Developer Program membership\u201d, which seems to indicate you need to give them money every year to use the REST API. We\u2019ll see if that\u2019s truly the case after the service leaves beta status.<\/p>\n<h3>FIN<\/h3>\n<p>Kick the tyres & drop issues\/PRs as one may be wont to do.<\/p>\n\n<div style=\"border: 1px solid; background: none repeat scroll 0 0 #EDEDED; margin: 1px; font-size: 13px;\">\r\n<div style=\"text-align: center;\">To <strong>leave a comment<\/strong> for the author, please follow the link and comment on their blog: <strong><a href=\"https:\/\/rud.is\/b\/2022\/07\/07\/introducing-weatherkit-the-eventual-replacement-r-package-for-darksky\/\"> R \u2013 rud.is<\/a><\/strong>.<\/div>\r\n<hr \/>\r\n<a href=\"https:\/\/www.r-bloggers.com\/\" rel=\"nofollow\">R-bloggers.com<\/a> offers <strong><a href=\"https:\/\/feedburner.google.com\/fb\/a\/mailverify?uri=RBloggers\" rel=\"nofollow\">daily e-mail updates<\/a><\/strong> about <a title=\"The R Project for Statistical Computing\" href=\"https:\/\/www.r-project.org\/\" rel=\"nofollow\">R<\/a> news and tutorials about <a title=\"R tutorials\" href=\"https:\/\/www.r-bloggers.com\/how-to-learn-r-2\/\" rel=\"nofollow\">learning R<\/a> and many other topics. <a title=\"Data science jobs\" href=\"https:\/\/www.r-users.com\/\" rel=\"nofollow\">Click here if you're looking to post or find an R\/data-science job<\/a>.\r\n\r\n<hr>Want to share your content on R-bloggers?<a href=\"https:\/\/www.r-bloggers.com\/add-your-blog\/\" rel=\"nofollow\"> click here<\/a> if you have a blog, or <a href=\"http:\/\/r-posts.com\/\" rel=\"nofollow\"> here<\/a> if you don't.\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>My {darksky} package has been around for years, now, and the service that powers it was purchased by Apple before the pandemic. The DarkSky API is slated to be shuttered in December of this year and is being replaced by Apple\u2019s WeatherKit xOS Framework and REST API. I\u2019ve &#8230;<\/p>\n","protected":false},"author":579,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"aioseo_notices":[],"jetpack-related-posts":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/posts\/328404"}],"collection":[{"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/users\/579"}],"replies":[{"embeddable":true,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/comments?post=328404"}],"version-history":[{"count":1,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/posts\/328404\/revisions"}],"predecessor-version":[{"id":328405,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/posts\/328404\/revisions\/328405"}],"wp:attachment":[{"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/media?parent=328404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/categories?post=328404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.r-bloggers.com\/wp-json\/wp\/v2\/tags?post=328404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}