diff --git a/config.toml b/config.toml index 119375a..94623b7 100644 --- a/config.toml +++ b/config.toml @@ -25,14 +25,24 @@ pygmentscodefencesguesssyntax = true rtl= false + colorscheme = "light" + + # Series see also post count + maxSeeAlsoItems = 5 + + # Enable Twemoji + enableTwemoji = true + + # Custom CSS custom_css = [] + # Custom JS + custom_js = [] - # Social links [[params.social]] name = "Git" - icon = "fab fa-git" + icon = "fab fa-gitlab" weight = 1 url = "https://git.ericxliu.me/eric" [[params.social]] @@ -50,25 +60,25 @@ pygmentscodefencesguesssyntax = true [languages.en] languagename = "English" [[languages.en.menu.main]] - name = "Gitlab" + name = "Posts" weight = 1 + url = "/posts/" + [[languages.en.menu.main]] + name = "Gitlab" + weight = 2 url = "https://git.ericxliu.me" [[languages.en.menu.main]] name = "Notebook" - weight = 2 + weight = 3 url = "https://hub.ericxliu.me" [[languages.en.menu.main]] name = "Go" - weight = 3 - url = "https://go.ericxliu.me/server" - [[languages.en.menu.main]] - name = "Sign in" weight = 4 - url = "https://auth.ericxliu.me" + url = "https://go.ericxliu.me/server" [[languages.en.menu.main]] name = "|" weight = 10 [[languages.en.menu.main]] - name = "Homer" + name = "Sign in" weight = 11 - url = "https://ericxliu.local" + url = "https://auth.ericxliu.me" diff --git a/content/README.md b/content/README.md deleted file mode 100644 index 0b30156..0000000 --- a/content/README.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: "Eric's Homepage" -date: 2018-06-01T06:44:30Z -draft: true ---- -Hello World! - diff --git a/content/about.md b/content/about.md index 23502d1..312f7bd 100644 --- a/content/about.md +++ b/content/about.md @@ -1,6 +1,5 @@ --- title: "About" date: 2018-06-01T07:13:52Z -draft: true --- diff --git a/content/posts/credit_card.html b/content/posts/credit_card.html new file mode 100644 index 0000000..01fe59d --- /dev/null +++ b/content/posts/credit_card.html @@ -0,0 +1,13716 @@ ++++ +title = "Credit Card Spending Dashboards" +date = "2020-06-16" ++++ + + +
+ +import pandas as pd
+import gspread
+import matplotlib.pyplot as plt
+
gc = gspread.service_account()
+
+sh = gc.open_by_key("1_tbwz6Z9uVZMJQZTysSQJYbSg-LCRdk6u49UngChM-Y")
+worksheet = sh.worksheet("Responses Raw")
+
+dataframe = pd.DataFrame(worksheet.get_all_records())
+
dataframe["Incurring Month"] = pd.to_datetime(dataframe["Incurring Date"]).dt.strftime(
+ "%Y%m"
+)
+df_filtered = dataframe[~dataframe["Category"].isin(["Fake", "Travel"])]
+
df_by_monthly = pd.pivot_table(
+ df_filtered,
+ index="Incurring Month",
+ columns="Category",
+ values="Amount of Money",
+ aggfunc=sum,
+)
+df_by_monthly.fillna(0)
+
df_by_monthly_plot = df_by_monthly.plot.bar(stacked=True, figsize=(16, 9))
+df_by_monthly_plot.set_ylabel("Total Amount ($)")
+plt.xticks(rotation=45);
+
df_travel = dataframe[
+ (dataframe["Category"] == "Travel") & (dataframe["Travel Tag"] != "")
+]
+
df_travel_by_tag = pd.pivot_table(
+ df_travel,
+ index="Travel Tag",
+ columns="Travel Details",
+ values="Amount of Money",
+ aggfunc=sum,
+ margins=True,
+)
+df_travel_by_tag = (
+ df_travel_by_tag.sort_values(["All"], ascending=False)
+ .drop("All", axis=1)
+ .drop("All")
+)
+df_travel_by_tag.fillna(0)
+
df_travel_by_tag_plot = df_travel_by_tag.plot.bar(stacked=True, figsize=(12, 8))
+df_travel_by_tag_plot.set_ylabel("Total Amount ($)")
+plt.xticks(rotation=45);
+
+