Coder Social home page Coder Social logo

geodacenter / covid-atlas Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 96.26 MB

An interactive map of COVID-19 data with spatial analysis tools

License: GNU General Public License v3.0

HTML 35.70% CSS 6.66% JavaScript 57.13% Jupyter Notebook 0.41% Python 0.10%
covid-19 geoda gis spatial-analysis

covid-atlas's People

Contributors

ariisrael avatar bertday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

covid-atlas's Issues

How to visualize national data?

In the alpha app, the data panel shows national data until you click on a state/county. @ariisrael and I discussed that currently it may not be clear to the user that the graphs have been updated to reflect a different geography.

A few thoughts on how to handle this going forward:

  • The data panel could always be visible and show national data to start. When you click on a state/county, there would need to be a way to return to national data (back button on data panel?)
  • The national data could be be side-by-side with the county-/state-level data, in its own section?

GeoDa integration

The current Atlas uses GeoDa wrapped as a WebAssembly module for a few spatial analysis tasks:

  • Hotspot/cluster analysis (aka LISA)
  • Cartograms
  • Possibly others (wondering if @lixun910 might have more insights?)

This is a really interesting approach and has been fun to explore from an engineering standpoint—however, I did want to bring up a few discussion points as we start to migrate these features into the refactored app.

  • Browser support: WebAssembly has wide support on modern browsers, but is not implemented on legacy browsers such as Internet Explorer. Based on our user analytics, about 2.2% of visits came from IE. That's a small number to be sure, but my concern is that some of these folks are key stakeholders at less-resourced institutions, or are working under IT policies that bar them from installing their own browser (this is common at hospitals and gov't agencies). As we consider the overall accessibility of the site, we may want to keep these users in mind.
  • Performance/scaling: My understanding was that there were some issues with the in-browser LISA analysis taking too long when the app started, which is why we've been caching the results as JSON files and checking them into the repo (if I got any of that wrong, please feel free to weigh in @lixun910). As our data grows over time and as we add new sources, this will likely become a larger issue.
  • Packaging: the current WebAssembly module injects a variable called Module into the global JavaScript scope, which presents some challenges when integrating with a Node-based project such as the refactored app. I've started a repo that would turn the module into a Node package, but this may take more time than we've allocated for the refactor.

At the same time I think we can all recognize that GeoDa is driving some of the most important insights in the Atlas, so I wanted to make a few suggestions around how we could modify the stack to provide the best user experience possible without compromising on spatial analysis.

  • Preprocessing: One option would be to preprocess the data with GeoDa so that the WebAssembly module isn't needed for things like viewing clusters; this would address both browser support and performance issues. As I mentioned above, we may already be doing this to some extent, so it would just be a matter of formalizing the caching process and possibly using pygeoda in place of the browser workflow. I think this would be the most straightforward approach and would be my recommendation.
  • Server-side processing: Another option would be to deploy pygeoda as a lightweight backend service, such as an AWS Lambda function, that the browser app could call when it needs to run analysis. We could use something like this in the case of the cartogram, which I'm not sure could be pre-processed as easily.

I was wondering if the group had any additional thoughts or ideas re: Geoda on the front end. Once again, I think this is a fantastic feature of the app and looking forward to finding a long-term solution for supporting it in the Atlas 😄

/cc @jkoschinsky @Makosak @lixun910 @linqinyu

Time slider

We need a new solution for the time slider that lets you see a cut of data from a particular date, reflected on the map and in the data panel.

Load in static data for counties

The alpha app loads in a file called /data/counties_usfacts.geojson that seems to contain static data for counties, i.e. population and hospital beds. Need to do the same in the beta app.

Data fetching infrastructure

Set up a pattern for loading data in from the existing (alpha) repo and normalizing it for use in the new app. This data should go into the Redux store.

Add top-level nav

We would like to have a nav bar at the top of the app (above map) for accessing secondary content (about, press, etc.)

App styles

The first iteration of this looked like:

image

Since then we decided to use Bootstrap in favor of Semantic UI (see #2). As of now it's not being styled.

We should formalize what our style guidelines for the app and implement them for the beta release of the Atlas.

Use Bootstrap instead of Semantic UI

Ari (I can't tag you for some reason), you sold me on this—it looks like Semantic UI is not actively developed and Bootstrap has really nice React bindings, so it seems like that's the way to go. I'll try to work on swapping those components out today or tomorrow. Also, just to touch on what we had talked about last week, I'd prefer to use Bootstrap just for small components that would be tedious to write ourselves (like form elements) rather than broader layout and styling—just don't want this to get that "yet another Bootstrap app" look and feel. But let me know if you have any other thoughts, happy to discuss.

Map visualizations

This is a task to recreate the existing map visualizations in the alpha app in this code base.

Write README

Currently this is just the create-react-app boilerplate.

App routing

We should plan how routing should work vis-a-vis navigation, browser history, bookmarks, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.