From 4ccdcf81e0d115c6c17bd47c75e7c67a58d556e3 Mon Sep 17 00:00:00 2001 From: luke-strange <92686634+luke-strange@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:10:04 +0100 Subject: [PATCH] True north membership starts from May 2023. closes #58 --- .../truenorth/analyse_members_list.ipynb | 22 ++++---- pipelines/truenorth/clean_members_list.ipynb | 56 ++++++++++++------- src/overview/membership/_data/cumsum.csv | 6 -- src/overview/membership/index.vto | 7 ++- 4 files changed, 53 insertions(+), 38 deletions(-) diff --git a/pipelines/truenorth/analyse_members_list.ipynb b/pipelines/truenorth/analyse_members_list.ipynb index 0dc089a..de5496c 100644 --- a/pipelines/truenorth/analyse_members_list.ipynb +++ b/pipelines/truenorth/analyse_members_list.ipynb @@ -129,8 +129,8 @@ " \n", " \n", " unique\n", - " 163\n", - " 159\n", + " 160\n", + " 147\n", " 2\n", " 2\n", " 2\n", @@ -155,7 +155,7 @@ "count 245 245 \n", "top 2024-06-20 00:00:00 2024-06-20 00:00:00 \n", "freq 60.0 60.0 \n", - "unique 163 159 \n", + "unique 160 147 \n", "\n", " Do you feel the True North report identified the key challenges and opportunities facing the region? \\\n", "count 185 \n", @@ -359,8 +359,8 @@ " \n", " \n", " unique\n", - " 163\n", - " 159\n", + " 160\n", + " 147\n", " 2\n", " 2\n", " 2\n", @@ -404,7 +404,7 @@ "count 245 245 \n", "top 2024-06-20 00:00:00 2024-06-20 00:00:00 \n", "freq 60.0 60.0 \n", - "unique 163 159 \n", + "unique 160 147 \n", "top_percent_of_count 24.5 24.5 \n", "\n", " Do you feel the True North report identified the key challenges and opportunities facing the region? \\\n", @@ -737,11 +737,11 @@ "3 Greater Manchester\n", "4 West Yorkshire\n", " ... \n", - "240 Blackburn\n", - "241 Chester\n", - "242 Helsby\n", - "243 NaN\n", - "244 Liverpool\n", + "240 Helsby\n", + "241 NaN\n", + "242 Liverpool\n", + "243 Merseyside\n", + "244 NaN\n", "Name: City, Length: 245, dtype: object" ] }, diff --git a/pipelines/truenorth/clean_members_list.ipynb b/pipelines/truenorth/clean_members_list.ipynb index 5b94296..21ec1db 100644 --- a/pipelines/truenorth/clean_members_list.ipynb +++ b/pipelines/truenorth/clean_members_list.ipynb @@ -54,7 +54,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/5k/p_091y6n6rscp__0p77_ynv80000gn/T/ipykernel_77050/1262414977.py:1: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.\n", + "/var/folders/5k/p_091y6n6rscp__0p77_ynv80000gn/T/ipykernel_2002/1262414977.py:1: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.\n", " data = pd.concat([hubspot_export, additional_members]).reset_index(drop=True)\n" ] } @@ -67,13 +67,31 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Add a \"last_updated\" column which uses the 'last activity date' column if it exists, otherwise the create date." + "The dates should all start in May 2023 or later." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, + "outputs": [], + "source": [ + "data['Create Date'] = pd.to_datetime(data['Create Date'])\n", + "start_date = pd.Timestamp('2023-05-01')\n", + "data.loc[data['Create Date'] < start_date, 'Create Date'] = start_date" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Add a \"last_updated\" column which uses the 'last activity date' column if it exists, otherwise the create date." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, "outputs": [ { "data": { @@ -106,7 +124,7 @@ " 'last_updated']" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -127,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -149,7 +167,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -173,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -184,7 +202,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -196,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -217,7 +235,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -230,7 +248,7 @@ " 'no longer in position', 'Self employed'], dtype=object)" ] }, - "execution_count": 11, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -241,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -280,7 +298,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -290,7 +308,7 @@ " 'no longer in position'], dtype=object)" ] }, - "execution_count": 13, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -308,7 +326,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -329,7 +347,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -379,7 +397,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -403,7 +421,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -413,7 +431,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -429,7 +447,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ diff --git a/src/overview/membership/_data/cumsum.csv b/src/overview/membership/_data/cumsum.csv index d1ff9fb..4e1b1fb 100644 --- a/src/overview/membership/_data/cumsum.csv +++ b/src/overview/membership/_data/cumsum.csv @@ -1,10 +1,4 @@ year,month_formatted,start_of_month,individuals,orgs -2022.16,2022-03,2022-03-01,21,21 -2022.5,2022-07,2022-07-01,22,22 -2022.58,2022-08,2022-08-01,25,25 -2022.75,2022-10,2022-10-01,27,27 -2022.91,2022-12,2022-12-01,31,31 -2023.16,2023-03,2023-03-01,33,33 2023.33,2023-05,2023-05-01,37,37 2023.41,2023-06,2023-06-01,40,39 2023.49,2023-07,2023-07-01,48,46 diff --git a/src/overview/membership/index.vto b/src/overview/membership/index.vto index 14d2aa1..42eac4c 100644 --- a/src/overview/membership/index.vto +++ b/src/overview/membership/index.vto @@ -8,6 +8,7 @@ nicesection: True North

About this data

The data below was generated from questionnaire responses. As the questionnaire has changed over time, some fields were incomplete for some responses. + All percentages are calculated as a fraction of the people who answered that question. {{# You can read the details on how we processed this data. #}}

@@ -39,8 +40,9 @@ nicesection: True North

Membership growth

+ The True North Network started in May 2023. The chart below shows the cumulative number of members, and the cumulutive number of unique organisations, - in the True North network. In some months no one joined the network, so the data points are not evenly spaced. + who have joined the True North network since then.

{{ comp.oi.chart.line({ config: { data: cumsum, @@ -69,7 +71,8 @@ nicesection: True North

Membership sectors

- This chart shows the frequency of words mentioned in the question "What sector do you operate in?". + This chart shows the frequency of words mentioned in the question "What sector do you operate in?". Note that "services" generally pairs + with other words, which explains its high frequency.

{{ comp.oi.chart.bar ({ config: { data: sector_word_counts,