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
Death | X coordinate | Y coordinate | |
---|---|---|---|
1 | 51.513418 | -0.13793 | |
1 | 51.513418 | -0.13793 | |
1 | 51.513418 | -0.13793 | |
1 | 51.513361 | -0.137883 | |
1 | 51.513361 | -0.137883 | |
1 | 51.513317 | -0.137853 | |
1 | 51.513262 | -0.137812 | |
1 | 51.513204 | -0.137767 | |
1 | 51.513204 | -0.137767 |
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
Pump Name | X coordinate | Y coordinate | |
---|---|---|---|
-999 | 51.513341 | -0.136668 | |
-999 | 51.513876 | -0.139586 | |
-999 | 51.514906 | -0.139671 | |
-999 | 51.512354 | -0.13163 | |
-999 | 51.512139 | -0.133594 | |
-999 | 51.511542 | -0.135919 | |
-999 | 51.510019 | -0.133962 | |
-999 | 51.511295 | -0.138199 |
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
Number of deaths | X coordinate | Y coordinate | |
---|---|---|---|
3 | 51.513418 | -0.13793 | |
2 | 51.513361 | -0.137883 | |
1 | 51.513317 | -0.137853 | |
1 | 51.513262 | -0.137812 | |
4 | 51.513204 | -0.137767 | |
2 | 51.513184 | -0.137537 | |
2 | 51.513359 | -0.1382 | |
2 | 51.513328 | -0.138045 | |
3 | 51.513323 | -0.138276 |
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
Number of deaths | X coordinate | Y coordinate | |
---|---|---|---|
3 | 51.513418 | -0.13793 | |
2 | 51.513361 | -0.137883 | |
1 | 51.513317 | -0.137853 | |
1 | 51.513262 | -0.137812 | |
4 | 51.513204 | -0.137767 | |
2 | 51.513184 | -0.137537 | |
2 | 51.513359 | -0.1382 | |
2 | 51.513328 | -0.138045 | |
3 | 51.513323 | -0.138276 |
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
Number of deaths | X coordinate | Y coordinate | |
---|---|---|---|
3 | -0.13793 | 51.513418 | |
2 | -0.137883 | 51.513361 | |
1 | -0.137853 | 51.513317 | |
1 | -0.137812 | 51.513262 | |
4 | -0.137767 | 51.513204 | |
2 | -0.137537 | 51.513184 | |
2 | -0.1382 | 51.513359 | |
2 | -0.138045 | 51.513328 | |
3 | -0.138276 | 51.513323 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2 in line 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
Number of deaths;XY coordinates | |
3;-0.13793,51.513418 | |
2;-0.137883,51.513361 | |
1;-0.137853,51.513317 | |
1;-0.137812,51.513262 | |
4;-0.137767,51.513204 | |
2;-0.137537,51.513184 | |
2;-0.1382,51.513359 | |
2;-0.138045,51.513328 | |
3;-0.138276,51.513323 |
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 rpy2.robjects as robjects | |
import pandas.rpy.common as com | |
import pandas as pd | |
## load .RData and converts to pd.DataFrame | |
robj = robjects.r.load('test.RData') | |
# iterate over datasets the file | |
for sets in robj: | |
myRData = com.load_data(sets) | |
# convert to DataFrame |
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
library(ggplot2) | |
library(rbokeh) | |
library(htmlwidgets) | |
structure(list(wk = structure(c(16069, 16237, 16244, 16251, 16279, | |
16286, 16300, 16307, 16314, 16321, 16328, 16335, 16342, 16349, | |
16356, 16363, 16377, 16384, 16391, 16398, 16412, 16419, 16426, | |
16440, 16447, 16454, 16468, 16475, 16496, 16503, 16510, 16517, | |
16524, 16538, 16552, 16559, 16566, 16573), class = "Date"), n = c(1L, | |
1L, 1L, 1L, 3L, 1L, 3L, 2L, 4L, 2L, 3L, 2L, 5L, 5L, 1L, 1L, 3L, |
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
# List unique values in a DataFrame column | |
# h/t @makmanalp for the updated syntax! | |
df['Column Name'].unique() | |
# Convert Series datatype to numeric (will error if column has non-numeric values) | |
# h/t @makmanalp | |
pd.to_numeric(df['Column Name']) | |
# Convert Series datatype to numeric, changing non-numeric values to NaN | |
# h/t @makmanalp for the updated syntax! |
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
library(httr) | |
library(magick) | |
library(hrbrthemes) | |
library(ggplot2) | |
theme_tweet_rc <- function(grid = "XY", style = c("stream", "card"), retina=FALSE) { | |
style <- match.arg(tolower(style), c("stream", "card")) | |
switch( |