Inspiration

Our county lacked clear and informative visual data on the COVID-19 pandemic. Governmental websites like https://coronavirus.maryland.gov/ and https://montgomerycountymd.gov/covid19/ had graphs displaying data that was unorganized, outdated, and incorrect. From there we knew we wanted to develop something that would deliver clean and concise quantitative data to community members all around Montgomery County. We believe that it is paramount that all residents, including students and parents,have a clear understanding of the current circumstances and make informed choices

What it does

  • Our web-application crafts multiple graphs of relevant COVID-19 data and compiles them into a personalized email. Users who subscribe with their name and email receive weekly newsletter updates containing:
    • Lightweight visualizations of recent data
    • Useful links to stay safe
    • An evaluation of school reopening metrics
  • In case users have trouble viewing our newsletter on their emails, we provided an online version of every weekly newsletter on our website stylized with additional CSS.
  • On our website we also provide MoCo residents with...
    • Important updates about county guidelines, vaccines, and school reopenings in “Our COVID Blog” section
    • Display the most recent Maryland COVID-19 news in our “Local Headlines” section, refreshed daily.

How we built it

Using our skills with server-side languages we were able to categorize our tasks into three crucial subsystems. Exclusively Python, Cross-Over connections between Python and PHP, and PHP exclusive functions (frontend designs and forms). The Language Flow:

  • PHP
    • Uses a GET request to retrieve data from the HTML form submission
    • Logs the user’s name and email into the MySQL database
    • Starts a background Python process, and passes name and email parameters via the shell (possible because Python and PHP are both server-side languages)
  • Python
    • API’s, data retrieval
    • Requests Library → collects data from various datasets on https://coronavirus.maryland.gov/, gathers recent news from GNews API, and gets HTML pages
    • BeautifulSoup → parses HTML websites from reputable sources to write onto blog section
    • Matplotlib → uses the data scraped off of the internet and organizes it into an easily-readable graph
    • SMTPLib → sends the final email to the user

Challenges we ran into

Github’s Deprecation of Password Based Access

  • Due to this we had trouble uploading our code to the pi server in an efficient manner
    • To combat this we researched alternatives such as sftp (secure file transfer protocol) and SCP (Secure Copy) to transfer files between the pi and the server
    • Although these methods were extremely time consuming
  • Eventually we went back to the /root (pun-intended) cause and read Github's documentation on using ssh to transfer files with public/private key encryption
    • Although initially it took some time to understand, the efficiency that followed was well worth it

MySQL Database Python Access

  • We developed a Python Script to gather top headlines for a particular query. For this reason we decided to use a MySQL database
    • MySQL has a very specific format when receiving information
  • The challenge arrived when we had to relearn different data types and formats in order to pass the data from MySQL to Python (which would eventually go to PHP where it would be displayed)

Data Retrieval

  • Finding the correct dataset
  • There were misleading datasets on https://coronavirus.maryland.gov/
  • Some datasets that we considered using were not organized and up-to-date
    • School data
    • Vaccine data

Web Scraping

  • Using BeautifulSoup library
  • Websites did not have descriptive class names in their HTML
    • This made it difficult to distinguish between HTML elements of the same tag

Data visualization

  • Formatting Matplotlib graphs to emphasize data values
  • Font size of X and Y axes
  • Image width of graphs on email and web newsletters to enhance mobile experience

Accomplishments that we're proud of

  • Testing for SQL injection (Our 3 Steps) --> Security:
    • Data validation on JavaScript side
    • Data validation on Python
    • Database protection
  • HTTPS --> Security:
    • Requesting a certificate from a root authority
    • Automatic redirect HTTP --> HTTPS
    • High-Encryption standards
  • Tested for a smooth mobile experience
    • adjusted HTML styling on both the email and website
  • We started with a small application and began adding features one-by-one, creating a complete user experience:
    • Email newsletter presents coherent visualizations and informs users of weekly trends
    • "Online Newsletter" provides users greater flexibility to view newsletters
    • "Local Headlines" to gather information from local sources
    • Launched "Our COVID Blog" containing hand-crafted articles related to COVID

What we learned

  • Cross-functional teams are highly pivotal to the functioning and the efficiency of an application
    • With the help of Github, we were able to work simultaneously on two different tasks and then reconvene to test, style, and debug before we moved on to our next stage of development
  • Iterative design process
    • Built our application in blocks to ensure functionality and reveal flaws early
    • Crucial to stick to our time constraints
    • Allowed us to keep our full-project redesigns to a minimum

What's next for MoCo COVID-19 Informative Web & Email App

  • Most components of this app are highly fluid and dynamic. With that said, we would love to move this web-app into the open-source platform
    • In an effort to allow other dev communities to adopt this tool into their own counties and personalize it to fit their atmosphere and environment
  • We would love find passionate writers from Montgomery County to eluminate how how our communities are adapting to new challenges
  • We would love to partner with local businesses, schools, and individuals to support and inform our communities during a devastating time like this
  • Working closely with local governments to help spread important COVID data and resources to residents
Share this project:

Updates