<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/open-data-r-meetup-exploring-the-distribution-of-traffic-accidents-in-belgrade-2015-in-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.exactness.net/post/156624508760"> The Exactness of Mind</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>The R code that accompanies this post is found on <a target="_blank" rel="nofollow" href="https://github.com/GoranMilovanovic/OpenDataR">GitHub</a>: you will find R, Rmd, and HTML files there that were used during the first Open Data R Meetup held in Belgrade, 31 January 2017, organized by <a target="_blank" rel="nofollow" href="http://www.datascience.rs/">Data Science Serbia</a> in <a target="_blank" rel="nofollow" href="http://en.startit.rs/">Startit Center</a>, Savska 5, Belgrade Serbia. The Open Data initiative in Serbia is still young, our <a target="_blank" rel="nofollow" href="http://data.gov.rs/sr/">Open Data Portal</a> is still under development, and guess what – we from Data Science Serbia will join the <a target="_blank" rel="nofollow" href="http://www.deu.gov.rs/">Working Group for Open Data of the Directorate for eGovernment</a> to help open, standardize, structure, publish, and analyse the many forthcoming open data sets from our country – in R, of course <img alt="🙂" class="wp-smiley" src="https://s.w.org/images/core/emoji/2/72x72/1f642.png"> </p>
<p>The data set under exploration here encompasses data on traffic accidents in Belgrade for 2015 (December 2015 data are missing). The notebook focuses on an exploratory analysis of this test open data set that was provided at the <a target="_blank" rel="nofollow" href="http://data.gov.rs/sr/">Open Data Portal of the Republic of Serbia</a> (the portal is currently under development). The data set was kindly provided to the Open Data Portal by the <a target="_blank" rel="nofollow" href="http://mup.gov.rs/wps/portal/en/!ut/p/z1/04_Sj9CPykssy0xPLMnMz0vMAfIjo8zi_S19zQzdDYy83c1cjQwcA80tXbxdLYwtPAz0wwkpiAJKG-AAjiD9UYSUFORGGKQ7KioCADcc2vk!/dz/d5/L0lJSkovd0RNQUJrQUVnQSEhLzRObEhVeEEhL1o2X085TTYxRzAySzhHSUUwQTY3R0pHR04yT00zL2Vu/">Republic of Serbia Ministry of Interior</a>. Many more open data sets will be indexed and uploaded in the forthcoming weeks and months.</p>
<figure data-orig-height="960" data-orig-width="1344"><img src="https://i2.wp.com/68.media.tumblr.com/6646c62fc2d438d016d7d479a216aa1c/tumblr_inline_okna73Sr5a1qa0hyw_540.png?resize=456%2C326" data-orig-height="960" data-recalc-dims="1" data-orig-width="1344"></figure>
<p><b><i>The Distribution of Traffic Accidents 2015, Belgrade.</i></b> Part of the city core is shown on the map produced by ggmap, ggplot2 w. geom_density2d() and stat_density2d().</p>
<p>Besides focusing on the exploration and visualization of this test data set, we have demonstrated the basic usage of <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/weatherData/index.html">{weatherData}</a> to fetch historical weather data to R, <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/wbstats/index.html">{wbstats}</a> to access the rich <a target="_blank" rel="nofollow" href="http://databank.worldbank.org/data/home.aspx">World Data Bank</a> time series, and <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/ISOcodes/">{ISOcodes}</a> packages in R.</p>
<p>Some exploratory modeling (Negative Binomial Regression with <code>glm.nb()</code> and Ordinal Logistic Regression with <code>clm()</code>from <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/ordinal/index.html">{ordinal}</a>) is exercised merely to assess the prima facie effects of the most influential factors.</p>
<figure data-orig-height="960" data-orig-width="1344"><img src="https://i1.wp.com/68.media.tumblr.com/c0fe4010ce989d042a5a8849e73e5f29/tumblr_inline_okna9o2rRQ1qa0hyw_540.png?resize=456%2C326" data-orig-height="960" data-recalc-dims="1" data-orig-width="1344"></figure>
<p><b><i>Predicted vs. Observed number of traffic accidents frequency per day, Belgrade 2015.</i></b> Negative binomial regression for overdispersed frequency data with glm.nb().</p>
<p>Hopefully, this is just a begining of our exploratory analyses of open data in R; in the following months, Data Science Serbia will work hard to enable cross-country open data comparisons by elaborating on the forthcoming Serbian open data sets, and promote R as the <i>lingua franca</i> of the discipline. </p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.exactness.net/post/156624508760"> The Exactness of Mind</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Gk6VArOiGXM"></a></div>