├── LICENSE ├── Manifest.toml ├── Project.toml ├── README.md ├── police.csv └── police.ipynb /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Bogumił Kamiński 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Manifest.toml: -------------------------------------------------------------------------------- 1 | # This file is machine-generated - editing it directly is not advised 2 | 3 | julia_version = "1.9.0" 4 | manifest_format = "2.0" 5 | project_hash = "163792c00f9ada41068901837ac4e1e91101262d" 6 | 7 | [[deps.ArgTools]] 8 | uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" 9 | version = "1.1.1" 10 | 11 | [[deps.Artifacts]] 12 | uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" 13 | 14 | [[deps.Base64]] 15 | uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" 16 | 17 | [[deps.CSV]] 18 | deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "SnoopPrecompile", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] 19 | git-tree-sha1 = "c700cce799b51c9045473de751e9319bdd1c6e94" 20 | uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" 21 | version = "0.10.9" 22 | 23 | [[deps.CategoricalArrays]] 24 | deps = ["DataAPI", "Future", "Missings", "Printf", "Requires", "Statistics", "Unicode"] 25 | git-tree-sha1 = "5084cc1a28976dd1642c9f337b28a3cb03e0f7d2" 26 | uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597" 27 | version = "0.10.7" 28 | 29 | [[deps.Chain]] 30 | git-tree-sha1 = "8c4920235f6c561e401dfe569beb8b924adad003" 31 | uuid = "8be319e6-bccf-4806-a6f7-6fae938471bc" 32 | version = "0.5.0" 33 | 34 | [[deps.CodecZlib]] 35 | deps = ["TranscodingStreams", "Zlib_jll"] 36 | git-tree-sha1 = "9c209fb7536406834aa938fb149964b985de6c83" 37 | uuid = "944b1d66-785c-5afd-91f1-9de20f533193" 38 | version = "0.7.1" 39 | 40 | [[deps.ColorTypes]] 41 | deps = ["FixedPointNumbers", "Random"] 42 | git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" 43 | uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" 44 | version = "0.11.4" 45 | 46 | [[deps.Colors]] 47 | deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] 48 | git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" 49 | uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" 50 | version = "0.12.10" 51 | 52 | [[deps.Combinatorics]] 53 | git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" 54 | uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" 55 | version = "1.0.2" 56 | 57 | [[deps.Compat]] 58 | deps = ["Dates", "LinearAlgebra", "UUIDs"] 59 | git-tree-sha1 = "61fdd77467a5c3ad071ef8277ac6bd6af7dd4c04" 60 | uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" 61 | version = "4.6.0" 62 | 63 | [[deps.CompilerSupportLibraries_jll]] 64 | deps = ["Artifacts", "Libdl"] 65 | uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" 66 | version = "1.0.2+0" 67 | 68 | [[deps.Conda]] 69 | deps = ["Downloads", "JSON", "VersionParsing"] 70 | git-tree-sha1 = "e32a90da027ca45d84678b826fffd3110bb3fc90" 71 | uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" 72 | version = "1.8.0" 73 | 74 | [[deps.Crayons]] 75 | git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" 76 | uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" 77 | version = "4.1.1" 78 | 79 | [[deps.DataAPI]] 80 | git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630" 81 | uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" 82 | version = "1.14.0" 83 | 84 | [[deps.DataFrames]] 85 | deps = ["Compat", "DataAPI", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SnoopPrecompile", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] 86 | git-tree-sha1 = "aa51303df86f8626a962fccb878430cdb0a97eee" 87 | uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" 88 | version = "1.5.0" 89 | 90 | [[deps.DataStructures]] 91 | deps = ["Compat", "InteractiveUtils", "OrderedCollections"] 92 | git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" 93 | uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" 94 | version = "0.18.13" 95 | 96 | [[deps.DataValueInterfaces]] 97 | git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" 98 | uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" 99 | version = "1.0.0" 100 | 101 | [[deps.Dates]] 102 | deps = ["Printf"] 103 | uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" 104 | 105 | [[deps.DelimitedFiles]] 106 | deps = ["Mmap"] 107 | git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" 108 | uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" 109 | version = "1.9.1" 110 | 111 | [[deps.Downloads]] 112 | deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] 113 | uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" 114 | version = "1.6.0" 115 | 116 | [[deps.FilePathsBase]] 117 | deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] 118 | git-tree-sha1 = "e27c4ebe80e8699540f2d6c805cc12203b614f12" 119 | uuid = "48062228-2e41-5def-b9a4-89aafe57970f" 120 | version = "0.9.20" 121 | 122 | [[deps.FileWatching]] 123 | uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" 124 | 125 | [[deps.FixedPointNumbers]] 126 | deps = ["Statistics"] 127 | git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" 128 | uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" 129 | version = "0.8.4" 130 | 131 | [[deps.Formatting]] 132 | deps = ["Printf"] 133 | git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" 134 | uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" 135 | version = "0.4.2" 136 | 137 | [[deps.FreqTables]] 138 | deps = ["CategoricalArrays", "Missings", "NamedArrays", "Tables"] 139 | git-tree-sha1 = "488ad2dab30fd2727ee65451f790c81ed454666d" 140 | uuid = "da1fdf0e-e0ff-5433-a45f-9bb5ff651cb1" 141 | version = "0.4.5" 142 | 143 | [[deps.Future]] 144 | deps = ["Random"] 145 | uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" 146 | 147 | [[deps.IJulia]] 148 | deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] 149 | git-tree-sha1 = "59e19713542dd9dd02f31d59edbada69530d6a14" 150 | uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" 151 | version = "1.24.0" 152 | 153 | [[deps.InlineStrings]] 154 | deps = ["Parsers"] 155 | git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" 156 | uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" 157 | version = "1.4.0" 158 | 159 | [[deps.InteractiveUtils]] 160 | deps = ["Markdown"] 161 | uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 162 | 163 | [[deps.InvertedIndices]] 164 | git-tree-sha1 = "82aec7a3dd64f4d9584659dc0b62ef7db2ef3e19" 165 | uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" 166 | version = "1.2.0" 167 | 168 | [[deps.IteratorInterfaceExtensions]] 169 | git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" 170 | uuid = "82899510-4779-5014-852e-03e436cf321d" 171 | version = "1.0.0" 172 | 173 | [[deps.JLLWrappers]] 174 | deps = ["Preferences"] 175 | git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" 176 | uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" 177 | version = "1.4.1" 178 | 179 | [[deps.JSON]] 180 | deps = ["Dates", "Mmap", "Parsers", "Unicode"] 181 | git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" 182 | uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" 183 | version = "0.21.3" 184 | 185 | [[deps.LaTeXStrings]] 186 | git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" 187 | uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" 188 | version = "1.3.0" 189 | 190 | [[deps.LibCURL]] 191 | deps = ["LibCURL_jll", "MozillaCACerts_jll"] 192 | uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" 193 | version = "0.6.3" 194 | 195 | [[deps.LibCURL_jll]] 196 | deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] 197 | uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" 198 | version = "7.84.0+0" 199 | 200 | [[deps.LibGit2]] 201 | deps = ["Base64", "NetworkOptions", "Printf", "SHA"] 202 | uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" 203 | 204 | [[deps.LibSSH2_jll]] 205 | deps = ["Artifacts", "Libdl", "MbedTLS_jll"] 206 | uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" 207 | version = "1.10.2+0" 208 | 209 | [[deps.Libdl]] 210 | uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" 211 | 212 | [[deps.LinearAlgebra]] 213 | deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] 214 | uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 215 | 216 | [[deps.Logging]] 217 | uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" 218 | 219 | [[deps.MacroTools]] 220 | deps = ["Markdown", "Random"] 221 | git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" 222 | uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" 223 | version = "0.5.10" 224 | 225 | [[deps.Markdown]] 226 | deps = ["Base64"] 227 | uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" 228 | 229 | [[deps.MbedTLS]] 230 | deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] 231 | git-tree-sha1 = "03a9b9718f5682ecb107ac9f7308991db4ce395b" 232 | uuid = "739be429-bea8-5141-9913-cc70e7f3736d" 233 | version = "1.1.7" 234 | 235 | [[deps.MbedTLS_jll]] 236 | deps = ["Artifacts", "Libdl"] 237 | uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" 238 | version = "2.28.0+0" 239 | 240 | [[deps.Missings]] 241 | deps = ["DataAPI"] 242 | git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" 243 | uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" 244 | version = "1.1.0" 245 | 246 | [[deps.Mmap]] 247 | uuid = "a63ad114-7e13-5084-954f-fe012c677804" 248 | 249 | [[deps.MozillaCACerts_jll]] 250 | uuid = "14a3606d-f60d-562e-9121-12d972cd8159" 251 | version = "2022.10.11" 252 | 253 | [[deps.NamedArrays]] 254 | deps = ["Combinatorics", "DataStructures", "DelimitedFiles", "InvertedIndices", "LinearAlgebra", "Random", "Requires", "SparseArrays", "Statistics"] 255 | git-tree-sha1 = "2fd5787125d1a93fbe30961bd841707b8a80d75b" 256 | uuid = "86f7a689-2022-50b4-a561-43c23ac3c673" 257 | version = "0.9.6" 258 | 259 | [[deps.NetworkOptions]] 260 | uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" 261 | version = "1.2.0" 262 | 263 | [[deps.OpenBLAS_jll]] 264 | deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] 265 | uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" 266 | version = "0.3.21+0" 267 | 268 | [[deps.OrderedCollections]] 269 | git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" 270 | uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" 271 | version = "1.4.1" 272 | 273 | [[deps.Parsers]] 274 | deps = ["Dates", "SnoopPrecompile"] 275 | git-tree-sha1 = "946b56b2135c6c10bbb93efad8a78b699b6383ab" 276 | uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" 277 | version = "2.5.6" 278 | 279 | [[deps.Pkg]] 280 | deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] 281 | uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" 282 | version = "1.9.0" 283 | 284 | [[deps.PooledArrays]] 285 | deps = ["DataAPI", "Future"] 286 | git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" 287 | uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" 288 | version = "1.4.2" 289 | 290 | [[deps.Preferences]] 291 | deps = ["TOML"] 292 | git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" 293 | uuid = "21216c6a-2e73-6563-6e65-726566657250" 294 | version = "1.3.0" 295 | 296 | [[deps.PrettyTables]] 297 | deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"] 298 | git-tree-sha1 = "96f6db03ab535bdb901300f88335257b0018689d" 299 | uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" 300 | version = "2.2.2" 301 | 302 | [[deps.Printf]] 303 | deps = ["Unicode"] 304 | uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" 305 | 306 | [[deps.PyCall]] 307 | deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"] 308 | git-tree-sha1 = "62f417f6ad727987c755549e9cd88c46578da562" 309 | uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" 310 | version = "1.95.1" 311 | 312 | [[deps.PyPlot]] 313 | deps = ["Colors", "LaTeXStrings", "PyCall", "Sockets", "Test", "VersionParsing"] 314 | git-tree-sha1 = "f9d953684d4d21e947cb6d642db18853d43cb027" 315 | uuid = "d330b81b-6aea-500a-939a-2ce795aea3ee" 316 | version = "2.11.0" 317 | 318 | [[deps.REPL]] 319 | deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] 320 | uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" 321 | 322 | [[deps.Random]] 323 | deps = ["SHA", "Serialization"] 324 | uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 325 | 326 | [[deps.Reexport]] 327 | git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" 328 | uuid = "189a3867-3050-52da-a836-e630ba90ab69" 329 | version = "1.2.2" 330 | 331 | [[deps.Requires]] 332 | deps = ["UUIDs"] 333 | git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" 334 | uuid = "ae029012-a4dd-5104-9daa-d747884805df" 335 | version = "1.3.0" 336 | 337 | [[deps.SHA]] 338 | uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" 339 | version = "0.7.0" 340 | 341 | [[deps.SentinelArrays]] 342 | deps = ["Dates", "Random"] 343 | git-tree-sha1 = "c02bd3c9c3fc8463d3591a62a378f90d2d8ab0f3" 344 | uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" 345 | version = "1.3.17" 346 | 347 | [[deps.Serialization]] 348 | uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 349 | 350 | [[deps.SnoopPrecompile]] 351 | deps = ["Preferences"] 352 | git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" 353 | uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" 354 | version = "1.0.3" 355 | 356 | [[deps.Sockets]] 357 | uuid = "6462fe0b-24de-5631-8697-dd941f90decc" 358 | 359 | [[deps.SoftGlobalScope]] 360 | deps = ["REPL"] 361 | git-tree-sha1 = "986ec2b6162ccb95de5892ed17832f95badf770c" 362 | uuid = "b85f4697-e234-5449-a836-ec8e2f98b302" 363 | version = "1.1.0" 364 | 365 | [[deps.SortingAlgorithms]] 366 | deps = ["DataStructures"] 367 | git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" 368 | uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" 369 | version = "1.1.0" 370 | 371 | [[deps.SparseArrays]] 372 | deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] 373 | uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" 374 | 375 | [[deps.Statistics]] 376 | deps = ["LinearAlgebra", "SparseArrays"] 377 | uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" 378 | version = "1.9.0" 379 | 380 | [[deps.StringManipulation]] 381 | git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123" 382 | uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" 383 | version = "0.3.0" 384 | 385 | [[deps.SuiteSparse_jll]] 386 | deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] 387 | uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" 388 | version = "5.10.1+6" 389 | 390 | [[deps.TOML]] 391 | deps = ["Dates"] 392 | uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" 393 | version = "1.0.3" 394 | 395 | [[deps.TableTraits]] 396 | deps = ["IteratorInterfaceExtensions"] 397 | git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" 398 | uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" 399 | version = "1.0.1" 400 | 401 | [[deps.Tables]] 402 | deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] 403 | git-tree-sha1 = "c79322d36826aa2f4fd8ecfa96ddb47b174ac78d" 404 | uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" 405 | version = "1.10.0" 406 | 407 | [[deps.Tar]] 408 | deps = ["ArgTools", "SHA"] 409 | uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" 410 | version = "1.10.0" 411 | 412 | [[deps.Test]] 413 | deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] 414 | uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" 415 | 416 | [[deps.TranscodingStreams]] 417 | deps = ["Random", "Test"] 418 | git-tree-sha1 = "94f38103c984f89cf77c402f2a68dbd870f8165f" 419 | uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" 420 | version = "0.9.11" 421 | 422 | [[deps.UUIDs]] 423 | deps = ["Random", "SHA"] 424 | uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" 425 | 426 | [[deps.Unicode]] 427 | uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" 428 | 429 | [[deps.VersionParsing]] 430 | git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" 431 | uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" 432 | version = "1.3.0" 433 | 434 | [[deps.WeakRefStrings]] 435 | deps = ["DataAPI", "InlineStrings", "Parsers"] 436 | git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" 437 | uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" 438 | version = "1.4.2" 439 | 440 | [[deps.WorkerUtilities]] 441 | git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" 442 | uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" 443 | version = "1.6.1" 444 | 445 | [[deps.ZMQ]] 446 | deps = ["FileWatching", "Sockets", "ZeroMQ_jll"] 447 | git-tree-sha1 = "356d2bdcc0bce90aabee1d1c0f6d6f301eda8f77" 448 | uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" 449 | version = "1.2.2" 450 | 451 | [[deps.ZeroMQ_jll]] 452 | deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libsodium_jll"] 453 | git-tree-sha1 = "fe5c65a526f066fb3000da137d5785d9649a8a47" 454 | uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" 455 | version = "4.3.4+0" 456 | 457 | [[deps.Zlib_jll]] 458 | deps = ["Libdl"] 459 | uuid = "83775a58-1f1d-513f-b197-d71354ab007a" 460 | version = "1.2.13+0" 461 | 462 | [[deps.libblastrampoline_jll]] 463 | deps = ["Artifacts", "Libdl"] 464 | uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" 465 | version = "5.4.0+0" 466 | 467 | [[deps.libsodium_jll]] 468 | deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] 469 | git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" 470 | uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" 471 | version = "1.0.20+0" 472 | 473 | [[deps.nghttp2_jll]] 474 | deps = ["Artifacts", "Libdl"] 475 | uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" 476 | version = "1.48.0+0" 477 | 478 | [[deps.p7zip_jll]] 479 | deps = ["Artifacts", "Libdl"] 480 | uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" 481 | version = "17.4.0+0" 482 | -------------------------------------------------------------------------------- /Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" 3 | Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc" 4 | DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" 5 | FreqTables = "da1fdf0e-e0ff-5433-a45f-9bb5ff651cb1" 6 | IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" 7 | PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PyData Global 2020 DataFrames.jl Tutorial 2 | 3 | # An introduction to DataFrames.jl for pandas users 4 | 5 | ## Introduction 6 | 7 | This tutorial is prepared for 8 | [PyData Global 2020](https://global.pydata.org/talks/an-introduction-to-dataframesjl-for-pandas-users). 9 | 10 | You are viewing the version of the tutorial updated to DataFrames.jl 1.5.0 11 | release that was made after PyData Global 2020 (the tutorial is identical, only 12 | dependency versions have been changed and I now show 13 | [Chain.jl](https://github.com/jkrumbiegel/Chain.jl) for chaining transformations). 14 | 15 | I present the fundamental design concepts behind 16 | [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl) to help potential 17 | users get started with using it. I show how an exemplary 18 | [pandas](https://pandas.pydata.org/) data processing pipeline can be transferred 19 | to [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl). Finally I 20 | discuss how [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl) 21 | integrates with the whole data science ecosystem available in the Julia 22 | language. 23 | 24 | I based the tutorial on an excellent 25 | [PyCon 2018: Using pandas for Better (and Worse) Data Science](https://nbviewer.jupyter.org/github/justmarkham/pycon-2018-tutorial/blob/master/tutorial.ipynb) 26 | presentation that was prepared by [Kevin Markham](https://github.com/justmarkham). 27 | 28 | In the tutorial I have selected exemplary [pandas](https://pandas.pydata.org/) 29 | commands from that presentation and show how they can be expressed in 30 | [DataFrames.jl](https://github.com/JuliaData/DataFrames.jl). 31 | 32 | The data I use is exactly the same as the original tutorial and it is contained 33 | in *police.csv* file contained in this GitHub repository. 34 | 35 | *police.csv* is the Rhode Island dataset from the 36 | [Stanford Open Policing Project](https://openpolicing.stanford.edu/), 37 | made available under the 38 | [Open Data Commons Attribution License](https://opendatacommons.org/licenses/by/summary/). 39 | 40 | I use [Jupyter Notebook](https://jupyter.org/) to run the code as it should be 41 | familiar to Python users. However, Julia offers you also reactive notebooks 42 | (with automatic cell updating and featuring widgets). If you want to learn more 43 | about it check out [Pluto.jl](https://github.com/fonsp/Pluto.jl). 44 | 45 | ## Preparing for running the tutorial 46 | 47 | All the examples are prepared under Julia 1.9.0. If you use any other version of 48 | Julia 1.6+ the examples should just work (if they do not please let me know via 49 | an Issue; you might need to adjust the Jupyter Notebook kernel). 50 | 51 | Before we begin please make sure that you have Julia and git installed and that 52 | respectively `julia` and `git` commands work in your terminal. You can download 53 | Julia at [here](https://julialang.org/downloads/). 54 | 55 | ## Ready, set, go! 56 | 57 | Actually the tutorial starts before we even go to the Jupyter Notebook. 58 | The first step we need to do is to make sure that your Julia environment is 59 | set up with proper versions of required packages. 60 | 61 | Fortunately Julia has in-built package manager that allows you to smoothly 62 | ensure this, provided that you have *Project.toml* and *Manifest.toml* files 63 | that contain all the required information (you can notice that they are 64 | present in the GitHub repository; you can learn more what these files contain 65 | [here](https://docs.julialang.org/en/v1/stdlib/Pkg/)). 66 | 67 | The simplest way to set up your project is to perform the following steps 68 | (I assume you have `git` and `julia` commands available): 69 | 70 | 1. Open a terminal in a directory where you want to have the tutorial stored. 71 | 2. Run `git clone https://github.com/bkamins/PyDataGlobal2020.git` 72 | to download the repository with the turorial (if you to not have `git` 73 | installed then you can download a zip of this repository from GitHub and 74 | unpack it locally). 75 | 3. Run `cd PyDataGlobal2020` to switch a directory to the one where the tutorial 76 | has been downloaded. 77 | 4. Run `julia --project=. -e "using Pkg; Pkg.instantiate()"` 78 | to make sure you have all the required packages automatically downloaded and 79 | precompiled (this step is optional and should be run only once to make sure 80 | that all the packages are correctly set up before we start working with them; 81 | you can expect that downloading all the dependencies will take some time) 82 | 5. Run `julia --project=. -e "using IJulia; notebook(dir=pwd())"` to start the 83 | Jupyter Notebook in the directory where the tutorial is stored (note that 84 | in the terminal you do not see a prompt as the Julia process is running 85 | now). 86 | 6. Now you can work with the tutorial (here the actual fun happens). 87 | 7. After you are done please make sure to choose "Quit" option in the top right 88 | hand side in the Jupyter Notebook. This will automatically terminate the 89 | Julia process in the terminal and prompt will reappear. 90 | --------------------------------------------------------------------------------