VISION Opubliq
VISION Opubliq est notre produit phare en développement, conçu spécifiquement pour les partis politiques municipaux.
Fonctionnalités Clés
- Tableau de bord interactif : Visualisez des données en temps réel.
- Centraliser la collecte de données terrain : Collectez et analysez des données en temps réel.
- Analyse stratégique : Identifiez les zones clés pour maximiser l’impact des campagnes et votre potentiel de croissance.
- Optimisation des campagnes : Planifiez vos efforts de porte-à-porte grâce à des insights basés sur les données.
Estimation du prix
Le prix de VISION Opubliq dépend de plusieurs facteurs :
- La taille de votre population
- La taille de l’échantillon à analyser (en assumant une bonne représentativité)
- Le nombre de membres de votre équipe ayant accès à la plateforme
- La fréquence de mise à jour des données
Utilisez cet estimateur de prix:
#| '!! shinylive warning !!': |
#| shinylive does not work in self-contained HTML documents.
#| Please set `embed-resources: false` in your metadata.
#| standalone: true
#| viewerHeight: 500
library(shiny)
library(bslib)
library(dplyr)
library(ggplot2)
### Main function: varies according to population price
population_price_function <- function(N) {
vapply(N, function(p) {
if (p < 25000) {
return(700)
} else if (p <= 50000) {
# Segment 25k-50k: 800-1200 (linéaire)
return(800 + (p - 25000) * (1200 - 800) / (50000 - 25000))
} else if (p <= 100000) {
# Segment 50k-100k: 1500-7500 (linéaire)
return(1500 + (p - 50000) * (7500 - 1500) / (100000 - 50000))
} else if (p <= 500000) {
# Segment 100k-500k: 7500-12000 (linéaire)
return(7500 + (p - 100000) * (12000 - 7500) / (500000 - 100000))
} else {
# Segment 500k-2millions: 12000-20000 (linéaire)
return(12000 + (p - 500000) * (20000 - 12000) / (2000000 - 500000))
}
}, numeric(1))
}
##### Function that varies by the desired sample size
calc_me <- function(n, p = 0.5, z = 1.96) {
return(z * sqrt((p * (1 - p)) / n))
}
calc_me_finite <- function(n, N, p = 0.5, z = 1.96) {
me <- calc_me(n, p, z)
correction <- sqrt((N - n) / (N - 1))
return(me * correction)
}
price_per_respondent <- function(n, N, a = 0.0001, b = 0.06, c = 0.002, max_price = 0.9) {
me <- calc_me_finite(n, N)
me_minus1 <- calc_me_finite(n - 1, N)
me_marginal <- abs(me - me_minus1) # Prendre la valeur absolue
price <- a + (b * log(1 + c / me_marginal)) # Transformation plus douce
price <- pmin(price, max_price) # Plafonner à 0.1
return(price)
}
cumulative_sample_price <- function(
n, N
){
prices <- price_per_respondent(1:n, N)
total_price <- sum(prices)
return(total_price)
}
ui <- page_fillable(
theme = bslib::bs_theme(version = 5, bootswatch = NULL), # Désactive les thèmes par défaut
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "/www/shiny.css")
#tags$style(HTML(".js-irs-0 .irs-single, .js-irs-0 .irs-bar-edge, .js-irs-0 .irs-bar {background: purple}")),
),
layout_columns(
col_widths = c(8, 4),
card(
card_header("Paramètres"),
sliderInput(
inputId = "population",
label = "Taille de la population dans votre municipalité:",
value = 25000,
min = 0, max = 2000000,
step = 1000,
sep = " ", ticks = FALSE
),
sliderInput(
inputId = "sample_size",
label = "Taille de l'échantillon:",
value = 300,
min = 0, max = 5000,
step = 10,
sep = " ", ticks = FALSE
)
),
card(
card_header("Prix"),
uiOutput("price"),
height = 100,
max_height = 100,
#plotOutput("price_decomposition")
)
)
)
server <- function(input, output, session) {
output$price <- renderUI({
price <- population_price_function(N = input$population) + cumulative_sample_price(n = input$sample_size, N = input$population)
HTML(paste0("<strong><span style='color: #28a745; font-size: 20px;'>",
formatC(price, format = "f", big.mark = " ", digits = 2),
" $</span></strong>"))
})
#output$price_decomposition <- renderPlot({
# graph_data <- data.frame(
# type = c("Population", "Échantillon"),
# price = c(population_price_function(N = input$population), cumulative_sample_price(n = input$sample_size, N = input$population))
# )
# ggplot(
# graph_data,
# aes(x = price, y = type)
# ) +
# geom_col()
#})
}
# Create the Shiny app
shinyApp(ui = ui, server = server)
Intéressé par VISION Opubliq ?
Contactez-nous pour découvrir comment nous pouvons transformer votre campagne avec VISION Opubliq :