Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
import altair as alt | |
plot_series = df.groupby('Fiscal Year')['cost'].sum() | |
alt.Chart(plot_series).mark_line().encode( | |
x='??', | |
y='??' | |
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(WC)COLLEGE | 4.573086161316465e-05 | |
---|---|---|
(WC)COMMERCE | 7.811226607265858e-05 | |
(WC)DOWNTOWN | 9.382139547962573e-05 | |
(WC)NORTHVILLAGE | 3.036583737626928e-05 | |
(WC)PARK | 4.8626335599410734e-05 | |
(WC)RIVER | 1.457644034573669e-05 | |
(WC)TOPANGA | 1.7167484641628468e-05 | |
(WC)UPTOWN | 5.187003275184904e-05 | |
A1 | 0.006122153253938159 | |
A1(UV) | 9.70492413789753e-07 |
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
def catagorize(row): | |
""" | |
apply function to catagorize a set of traing data values into | |
catagories. | |
""" | |
sentiment = 0 | |
focus = 0 | |
energy_level = 0 ## TODO replace with real | |
if sentiment > 0: | |
if focus > 0: # focus outward |
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
type DMEvent struct { | |
XMLName xml.Name `xml:"event_message"` | |
Category string `xml:"category,attr"` | |
MsgType string `xml:"message_type,attr"` | |
OrigSys string `xml:"orig_sys,attr"` | |
Version string `xml:"version,attr"` | |
Description string `xml:",innerxml"` | |
Core []DMCore `xml:"core_info"` | |
ElarmsMsg []ElarmsMsg `xml:"elarms_info"` | |
OnsiteMsg []OnsiteMsg `xml:"onsite_info"` |
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(tidyverse) | |
dot_data <- read_csv('./path/to/dot.csv') | |
311_data <- read_csv('./path/to/311.csv') | |
# Shared headers, based on dot list you gave me | |
headers <- c(Columns by SR # / CD # / Request Type / Address / Description / Submit Date / Closed Date / Current Status / Owner) | |
dot_data %>% |
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 pandas as pd | |
df = pd.read_csv('path/to/csv') | |
df.groupby(['CD','RequestType']).count().to_csv('2016_311_counts.csv') |