This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Google logo |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 41 columns, instead of 38 in line 5.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
address,lat,lon,total,serious_crime,robbery,other,violent_crime,armed_perps,Assault,injury,intimidation,Extortion,theft_by_home_invasion,safe_cracking,School_Violence,Office_Violence,Store_Opening_Violence,empty_house_robbery,Stealth_Robbery,Illegal_Occupancy,other,Non-invasive_Robbery,Car_Theft,motorcycle_theft,bicycle_theft,property_theft_from_car,Vending_Machine_Theft,construction_site_theft,pick_pocketing,hit_n_run,property_theft,shoplifting,other,other_totals,scam,embezzlement,con_artist_crimes,gambling_crive,other_penal_code_offenses,Year | |
千代田区外神田5丁目,0,0,9,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,7,0,0,4,1,0,0,1,0,0,0,1,1,0,1,0,0,0,2018 | |
千代田区外神田6丁目,0,0,21,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,11,0,0,1,0,0,1,0,0,1,4,4,8,6,1,0,0,1,2018 | |
千代田区鍛冶町1丁目,0,0,21,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,1,0,0,0,0,0,1,3,11,4,0,1,0,0,3,2018 | |
千代田区鍛冶町2丁目,0,0,77,0,0,0,6,0,4,2,0,0,8,0,0,1,5,0,0,0,2,51,0,0,9,0,0,0,5,0,7,4,26,12,2,5,0,0,5,2018 | |
千代田区神田鍛冶町3丁目,0,0,16,0,0,0,0,0,0,0,0,0,10,0,0,8,0,0,0,0,2,6,0,0,1,0,0,0,0,0,0,2,3,0,0,0,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create data: note in High school for Jonathan: | |
set.seed(1) | |
data <-as.data.frame(matrix( sample( 2:20 , 60 , replace=T) , ncol=10, byrow=TRUE)) | |
colnames(data) <- c("math" , "english" , "biology" , "music" , "R-coding", "data-viz" , "french" , "physic", "statistic", "sport" ) | |
# To use the fmsb package, I have to add 2 lines to the dataframe: the max and min of each topic to show on the plot! | |
data <-rbind(rep(20,10) , rep(0,10) , data) | |
# Prepare color | |
colors_border=colormap(colormap=colormaps$viridis, nshades=6, alpha=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Use MD img tag in Colab as below to display images located a Githubgist | |
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AABB Algorithm : Axis Aligned Bounded Box -- For determining 2D Collisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
To run in elmO (elm Online Editor): copy n paste into http://elm-lang.org/try | |
New andThen Pipeline Pattern, replaces `andThen` infix operation | |
introduced in v0.18 to | |
Result.andThen | |
Maybe.andThen | |
Json.Decode.andThen | |
Task.andThen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-- | |
Medium post (Response to Comment): | |
Updated to show how to extract a nested User type from a List of User in a Json String | |
See userListDecode function for details | |
Copy-n-Paste this code into Elm Online Editor to see run: | |
http://elm-lang.org/try | |
Updated to reflect changes in elm release version 0.18 | |
field replaces (:=) | |
mapN replace objectN functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-- | |
Copy-n-Paste this code into Elm Online Editor to see run: | |
http://elm-lang.org/try | |
Updated to reflect changes in elm release version 0.18 | |
field replaces (:=) | |
mapN replace objectN functions | |
All code except data blob -- jsonBlob is written by author (@Brian Hichs mention below) | |
--} | |
import Html exposing (text, div, span) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text, div) | |
import Html.Attributes as Attributes exposing(style) | |
import List | |
import Array | |
import String | |
getValue: Int -> Array.Array Char -> Char | |
getValue = | |
(\idx array -> | |
(Maybe.withDefault '?' (Array.get idx array))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sys.setenv(LANG = "en") | |
library(RNeo4j) | |
library(httr) | |
#Sys.getlocale() | |
#Sys.setlocale(categories = "LC_ALL" , locale = "Japanese_Japan.932" ) | |
#Sys.setlocale( locale = "en_utf8" ) | |
#Sys.setenv(LANG = "en") |