Skip to content

Commit

Permalink
Update website statistics
Browse files Browse the repository at this point in the history
Updated scripts and functionalities for website statistics, updated with newest data from 2024-07-12.
  • Loading branch information
sjoerdbarten authored Jul 12, 2024
1 parent 0758f99 commit 06ced8e
Show file tree
Hide file tree
Showing 16 changed files with 295 additions and 41 deletions.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 20 additions & 28 deletions misc/Website_stats/Website_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,40 @@
from Website_stats_functions import *

#Set directories
#Path where stats files (.csv) are located
stats_path = 'W:\\ESG\\DOW_MAQ\\MAQ_Archive\\MAQ-Observations.nl\\Admin\\FormsExports\\'
#Path where figures (.png) are saved
figures_path = 'W:\\ESG\\DOW_MAQ\\MAQ_Archive\\MAQ-Observations.nl\\Admin\\GitHub\\misc\\Website_stats\\Figures\\'

#Switch to save figures
#Switch to save figures, and date to include in the figure title
savefig = True
figdate = '2024-06-27'
figdate = '2024-07-12'

#Load .csv files in dataframe
#Note that these .csv files are not provided due to privacy reasons. We can not make them available.
user_reg_file = 'user-registration-user-update-2024-06-27.csv'
oper_data_file = 'operational-data-2024-06-27.csv'
data_figs_file = 'data-figures-2024-06-27.csv'
data_down_file = 'data-downloads-2024-06-27.csv'
user_reg_file = 'user-registration-user-update-2024-07-12.csv'
oper_data_file = 'operational-data-2024-07-12.csv'
data_figs_file = 'data-figures-2024-07-12.csv'
data_down_file = 'data-downloads-2024-07-12.csv'

user_reg = pd.read_csv(stats_path+user_reg_file)
oper_data = pd.read_csv(stats_path+oper_data_file)
data_figs = pd.read_csv(stats_path+data_figs_file)
data_down = pd.read_csv(stats_path+data_down_file)
data_down = data_down[data_down['input_radio'].isin(['Basic','Advanced','Single'])]
data_down = data_down[data_down['input_radio'].isin(['Basic','Advanced','Single'])] #Only select data downloaded throuh Basic, Advanced and Single
data_down_copy = data_down.copy()
data_down_copy2 = data_down.copy()


#Everything related to data figures and User registrations first
#Everything related to Data Figures and User registrations first
#Entries over time different forms
#entries_over_time(user_reg,False,'API Users',figures_path,figdate+'_user_registration_over_time',savefig)
#entries_over_time(oper_data,True,'Operational Data Views',figures_path,figdate+'_operational_data_over_time',savefig)
#entries_over_time(data_figs,True,'Historical Data Views',figures_path,figdate+'_data_figures_over_time',savefig)

#Historical graphs specific streams
#historical_graphs_streams(data_figs,figures_path,figdate+'_historical_streams',savefig)
entries_over_time(user_reg,False,'API Users',figures_path,figdate+'_user_registration_over_time',savefig)
entries_over_time(oper_data,True,'Operational Data Views',figures_path,figdate+'_operational_data_over_time',savefig)
entries_over_time(data_figs,True,'Historical Data Views',figures_path,figdate+'_data_figures_over_time',savefig)
#Historical graphs counts for specific streams
historical_graphs_streams(data_figs,figures_path,figdate+'_historical_streams',savefig)


#Now everything related to data downloads
#entries_over_time_downloads(data_down,True,'Data Downloads',figures_path,figdate+'_data_downloads',savefig)
specifics_per_input_radio(data_down,'Data Downloads',figures_path,figdate+'_data_downloads',savefig)
#For Single/Advanced/Basic: Pie charts for downloaded streams

#fun_statistics()
#Unique users/email-adresses
#@wur vs @non-wur email
#Total years of data downloaded (unique downloads * date_range)
#Number of data points downloaded (check stream interval?!)
#Favorite browser
#Favorate OS

#ApiKey out of functions to here
entries_over_time_downloads(data_down,True,'Data Downloads',figures_path,figdate+'_data_downloads',savefig)
specifics_per_input_radio(data_down_copy,'Data Downloads',figures_path,figdate+'_data_downloads',savefig)
fun_statistics(data_down_copy2,'Data Downloads',figures_path,figdate+'_data_downloads',savefig)
Loading

0 comments on commit 06ced8e

Please sign in to comment.