Open-NC / Are-We-Represented

Main repository for the Are We Represented? project
4 stars 1 forks source link

Shiny web app prototype available #10

Open wandernat opened 6 years ago

wandernat commented 6 years ago

I made a Shiny web app prototype for Are We Represented it and published it here: https://wandernat.shinyapps.io/arewerepresented/

I uploaded my code for the app here: https://github.com/Open-NC/Are-We-Represented/tree/master/Shiny-App-Prototype

ChrisTheDBA commented 6 years ago

I like it. Nice work.

Can I make a suggestion for the next iteration?

Having my eye scan back and forth across the two charts to compare them is a lot of work. Consider moving them to the same graph and using color to distinguish between demographics and commission makeup. Even do small multiples where each category (White, Black, Asian, etc) is on a separate chart.

This is an awesome start and shows all the work you've put in the project!

cassiodorus commented 6 years ago

Nat, you certainly are hard at work! Good for you (and keeping Josh on his github toes). I will get to these soon.

I have been working on quantitative measures of similarity between Boards and counties (entropy index, Euclidean distance, and maybe more). I will be exploring use of Neo4j as I think there may be value in visualization using a graph database. I am a remarkably slow programmer so this may take some time. Everything is in a local git thanks to the atom editor I am using - I will definitely need Josh's help in moving it to someplace public.

David Hopp


From: Nat notifications@github.com Sent: Friday, June 22, 2018 3:29:32 PM To: Open-NC/Are-We-Represented Cc: Subscribed Subject: [Open-NC/Are-We-Represented] Shiny web app prototype available (#10)

I made a Shiny web app prototype for Are We Represented it and published it here: https://wandernat.shinyapps.io/arewerepresented/

I uploaded my code for the app here: https://github.com/Open-NC/Are-We-Represented/tree/master/Shiny-App-Prototype

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Open-NC/Are-We-Represented/issues/10, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACI2OeeyCUv4RM0Z91ac9A7KBVAmZ3J4ks5t_UWcgaJpZM4U0UDK.

wandernat commented 6 years ago

@ChrisTheDBA can you sketch out your suggestion with the one chart?

ChrisTheDBA commented 6 years ago

I will get on it by tomorrow.

On Mon, Jul 16, 2018 at 2:43 PM Nat notifications@github.com wrote:

@ChrisTheDBA https://github.com/ChrisTheDBA can you sketch out your suggestion with the one chart?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/Open-NC/Are-We-Represented/issues/10#issuecomment-405338726, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOGtU4hGmeOz4mjsdNvR9-IFJ-YWEDsks5uHN7ggaJpZM4U0UDK .

-- Chris Mathews

ChrisTheDBA commented 6 years ago

Sorry, I got sick last week and then swamped at work. here it is.

Chris Mathews

On Mon, Jul 16, 2018 at 4:07 PM, Chris Mathews christhedba@gmail.com wrote:

I will get on it by tomorrow.

On Mon, Jul 16, 2018 at 2:43 PM Nat notifications@github.com wrote:

@ChrisTheDBA https://github.com/ChrisTheDBA can you sketch out your suggestion with the one chart?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/Open-NC/Are-We-Represented/issues/10#issuecomment-405338726, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOGtU4hGmeOz4mjsdNvR9-IFJ-YWEDsks5uHN7ggaJpZM4U0UDK .

-- Chris Mathews

jasonajones73 commented 6 years ago

@wandernat I love your Shiny app! I've tried my hand at a couple but it has been a while. I downloaded the repo just to take a look and it runs great! I was playing around with the highcharter package to make the charts interactive and have some sample code below. I know you can utilize highcharter in Shiny apps pretty easily.

x = nc_cc_party %>%
  filter(County == "GUILFORD") %>%
  mutate(cc_party_pct = (n/sum(n))) %>%
  rename(party_vr = `Party-VR`) %>%
  mutate(cc_party_pct = round(cc_party_pct*100, digits = 2))

hchart(x, "column", hcaes(x = party_vr, y = cc_party_pct)) %>%
  hc_yAxis(
    title = list(text = "Party Percent"),
    labels = list(format = "{value}%"), max = 100
  ) %>%
  hc_xAxis(
    title = list(text = "")
  ) %>%
  hc_title(text = "County Commissioners") %>%
  hc_tooltip(pointFormat = "<b>{point.y}%</b>") %>%
  hc_add_theme(hc_theme_google())