Giter VIP home page Giter VIP logo

ukraine-timemap's Introduction

Civilian Harm in Ukraine TimeMap

Explore it in ukraine.bellingcat.com
Download/integrate the data from here (regularly updated dataset)

Read Bellingcat's article about this project in English (UK), Русский (Россия)

TimeMap is a tool for exploration, monitoring and classification of incidents in time and space, originally forked from forensic-architecture/timemap.



ukraine.bellingcat.com timemap preview

Development

  • npm install to setup
  • adjust any local configs in config.js
  • CONFIG=config.js npm run dev or npm run dev if the file is named config.js
  • For more info visit the original repo

Deployment

This project is now living in github pages and the API has switched to auto-updated S3 files. Access it at https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json

Release with npm run deploy.

Contributing

Please read our Contribution Guide and check our Issues Page for desired contributions, and feel free to suggest your own.

Configurations

Documentation of config.js
  • SERVER_ROOT - points to the API base address
  • XXXX_EXT - points to the respective JSONs of the data, for events, sources, and associations
  • API_DATA - S3 file address that can be downloaded or integrated into external apps/visualizations
  • MAPBOX_TOKEN - used to load the custom styles
  • DATE_FMT and TIME_FMT - how to consume the events' date/time from the API
  • store.app.map - configures the initial map view and the UX limits
  • store.app.cluster - configures how clusters/bubbles are grouped into larger clusters, larger radius means bigger cluster bubbles
  • store.app.timeline - configure timeline ranges, zoom level options, and default range
  • store.app.intro - the intro panel that shows on start
  • store.app.cover - configuration for the full page cover, the description is a list of markdown entities, can also contain html
  • store.ui.colors and store.ui.maxNumOfColors are applied to filters, as they are selected

Easiest way to deploy the static files is through

  • nvm use 16
  • npm run build (rather: CI=false npm run build)
  • copy the files to your server, for example to /var/www/html

ukraine-timemap's People

Contributors

1cgonza avatar araneline avatar breezycool avatar breezykermo avatar delucis avatar dependabot[bot] avatar divinecurationbot avatar ebefarooqui avatar francamps avatar frasercrichton avatar fspoettel avatar gaearon avatar galenreich avatar hgrsd avatar ilyabo avatar loganwilliams avatar msmych avatar msramalho avatar phildenoncourt avatar rentry avatar samludford avatar scztt avatar sol-austin avatar wattroll avatar zacoppotamus avatar zlester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ukraine-timemap's Issues

Add full-screen button

This would allow the map to be maximized from within an iframe.

This button should not appear on mobile, probably.

Add support for multiple languages

Add support for multiple languages

This issue requires:

  1. updating the project to always use a strategy similar to this one that uses the copy.js files for language-specific translations.
  2. adding a UI component to easily switch between languages (suitable for mobile so ideally something subtle in the top-right corner, for example)
  3. creating the placeholders for the translations in English, Ukrainian, and Russian. we could then help with getting the translated strings there.

keep final date in timeline dynamically

Currently when we build and deploy the timemap, the final date that loads up on the timeline is the date of the last build, this is because that configuration is coming from config.js (store.app.timeline.range config value).

We would like to refactor the app so that the final date is always today, and the initial date is a given number of days in the past, calculated from today.

This print is from 28th and since the last deploy was on the 24th, that's the max date we see in the timeline.
image

Pressing a timeline event during zoom in animation crashes the app

The crash happens here:

index.js:84 Uncaught TypeError: Cannot read properties of undefined (reading 'range')
    at Supercluster.getClusters (index.js:84:1)
    at Map.updateClusters (Map.js:210:1)
    at Map.<anonymous> (Map.js:238:1)
    at callCallback (react-dom.development.js:13092:1)

Repro video:

crash.mov

Replace webpack-based tooling with vite

While fixing #65, I noticed that without a complex migration webpack 5, we are stuck on Node 16. I took this as motivation to try and migrate this repo to vite and manged to get to a working state at fspoettel#1.

Results of the migration:

  • gets rid of a large amount of config code in this repo
  • removes 1800 packages from the npm tree
  • reduces final bundle size by 100kb gzipped - this is a product of a few node libraries having been packaged accidentally previously.
  • development server is much faster.
  • tests are working again (moved them vitest to avoid duplicate config)
  • deprecated sass syntax has been removed

If this is something you would be interested in, I'm happy to finish the PR. cc @breezykermo, maybe this is interesting for upstream. I'm not willing to do this work again any time soon though. ^^

Clean up mobile support features

I implemented mobile support very quickly over the weekend. This should be cleaned up a bit before we make the repository public.

Idea: Update base styles for map

Some ideas for our map after looking at #43. Feel free to close the issue if you don't think these are improvements.

You can copy these styles here if you want to try them:

Use satellite-streets istd. of satellite

Having labels on the satellite map helps a great deal with identifying cities, regions and streets. Screenshot below is a custom mapbox style created from the satellite streets preset, no other adjustments.

I also used a lighter accent color to help with contrast with the dark satellite layer.

image

Use monochrome as default layer

Screenshot below is a custom mapbox style created from the monchrome light preset, no other adjustments. Labels and lines are a bit less constrasted in this style and help clusters stick out more.

image

image

Language switch design

Initial discussion here #25 (review). I will add a button to sidebar that opens a panel with language selection, but it would be very helpful if somebody contributed to the overall design.

For the sidebar button it would be amazing to have a Cyrillic-Latin-flavoured icon like this, but with characters unique to Latin/Ukrainian/Russian alphabets. There is a good range of possible combinations like LЪҐ, SЭЄ, WЫЇ.

For the language selection large touch-screen-friendly buttons with texts in respective languages would be ideal. The currently selected option needs to stand out as such, and hover/focus/active states need to be supported.

I would advice against using flags for a list of languages because flags are not languages. There is a great number of Russian-speaking people (or even peoples) who don't identify with the state symbols of Russia.

Add timeline support to mobile versions

Add timeline support to mobile versions

Currently, the TimeMap is usable in a mobile device but the timeline at the bottom is hidden (see image below).

We want to allow for the use of this timeline in mobile devices, the challenge being the screen width forcing the days in the timeline to be unusable. Perhaps we could have a tab/overlay which would be "toggleable" that would show/hide the timeline in a readable format that could even use the fullscreen size (maybe in a vertical version compared to the current desktop horizontal version)

Current desktop timeline (not readable if it's directly show in mobile)

image

Current mobile view

mobile view

Add filter-panel support to mobile versions #1

Add filter-panel support to mobile versions

(This issue is similar to #1 )

Currently, the TimeMap is usable in a mobile device but the filter-panel at the bottom is hidden (see image below).

We want to allow for the use of the filters in mobile devices, the challenge being the screen width forcing the filters to go outside the screen. Perhaps we could have a tab/overlay which would be "toggleable" that would show/hide the filters with an extra Done button to close and see the map with the filters.

Current desktop filters (they overflow if directly show in mobile)

image

Current mobile view

mobile view

Dates are off in exported JSON

The dates of the incidents appear to be one day earlier in the exported JSON file. Could be due to incorrect treatment of the timezone during conversion?

The attack on Kramatorsk:

The very first incident:

Feedback form inaccessible to people outside the form owner's organisation

Hello!

Thank you for this important work. Here's a bug report:

Steps to reproduce

  1. Go to the home page of the site.
  2. Scroll down to "Feedback".
  3. Click on the link to the feedback form.

image

Current Behavior

The form is inaccessible to people outside the organisation of the form's owner (presumably, Bellingcat).

Expected Behavior

The form should be accessible so that people can submit feedback.

Kind regards,
Jakub

Clusters are flickering on zoom in

As a side note, thanks for all the hard work on this map! As a Ukrainian and also the creator of Leaflet (and other deps like Supercluster), I really appreciate what you're doing.

Environment

  • Your version (in package.json) or git commit hash: the one currently deployed on Bellingcat (as of April 5)
  • Your operating system and version: macOS, reproducible in all browsers

Steps to reproduce

  1. Zoom in the map.

Current Behavior

Clusters are flickering annoyingly:

Screen.Recording.2022-04-05.at.22.17.35.mov

Expected Behavior

No flickering, everything's smooth.

Event stack is missing event when selecting time range

When selecting a date in the timeline, the event stack is missing an element. in below example, 8 events are (correctly) displayed on the map while 7 events are displayed in the stack.

Screenshot from 2022-03-22 14-10-55

Digging a bit into this, I noticed that there might be a problem with how the selection range is determined in the Layout component. handleSelect receives a selected event and then calls this.findEventIdx which performs a binary search. In the example screenshot above, the selected event has id 208 while the binary search returns id 176. The pointer then starts one id below 176 which leads to 176 being ignored for this time range - yet showing up on the map.

  handleSelect(selected, axis) {
    if (selected.length <= 0) {
      this.props.actions.updateSelected([]);
      return;
    }

    const matchedEvents = [];
    const TIMELINE_AXIS = 0;
    if (axis === TIMELINE_AXIS) {
      matchedEvents.push(selected);
      // find in events
      const { events } = this.props.domain;
      const idx = this.findEventIdx(selected);
      // check events before
      let ptr = idx - 1;

      while (
        ptr >= 0 &&
        events[idx].datetime.getTime() === events[ptr].datetime.getTime()
      ) {
        if (events[ptr].id !== selected.id) {
          matchedEvents.push(events[ptr]);
        }
        ptr -= 1;
      }
      // check events after
      ptr = idx + 1;

      while (
        ptr < events.length &&
        events[idx].datetime.getTime() === events[ptr].datetime.getTime()
      ) {
        if (events[ptr].id !== selected.id) {
          matchedEvents.push(events[ptr]);
        }
        ptr += 1;
      }
    } else {
      // Map..
      const std = { ...selected };
      delete std.sources;
      Object.values(std).forEach((ev) => matchedEvents.push(ev));
    }

    this.props.actions.updateSelected(matchedEvents);
  }

Conflicting peer dependencies- clean run of `npm install` is failing.

Environment

  • version: 0.1.0 - master
  • running on Mac OS 12.4, M1 Hardware
  • npm -v -> 8.15.0

Steps to reproduce (for bugs only)

  1. clean clone of master branch, no changes to source. git status is clean.
  2. run npm install in top dir of repo
  3. peer dependency conflict error 💥

(I have attached logs)

Current Behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!   peer react@"^18.2.0" from [email protected]
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^18.0.0" from the root project
npm ERR!     peer react-dom@"^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0" from [email protected]
npm ERR!     node_modules/react-portal
npm ERR!       react-portal@"^4.2.0" from the root project
npm ERR!     2 more (react-twitter-embed, @testing-library/react)
npm ERR!   3 more (react-portal, react-twitter-embed, @testing-library/react)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">= 0.14.0 < 18.0.0" from [email protected]
npm ERR! node_modules/react-device-detect
npm ERR!   react-device-detect@"^1.6.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@">= 0.14.0 < 18.0.0" from [email protected]
npm ERR!   node_modules/react-device-detect
npm ERR!     react-device-detect@"^1.6.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See ~/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!    ~/.npm/_logs/2022-08-12T21_59_45_584Z-debug-0.log

Expected Behavior

Successful installation of dependencies without conflicting dependencies.
eresolve-report.txt
2022-08-12T21_59_45_584Z-debug-0.log

eresolve-report.txt
2022-08-12T21_59_45_584Z-debug-0.log

Add a "satellite map" layer and a switcher button

Add an option to switch the basemap tiles to a satellite/aerial view from Mapbox tiles (Historic, not current imagery.)

This issue requires:

  1. Creating a new component for a map switcher that changes the active map layers in Leaflet.

fix gdpr issues

From this comment

As for GDPR:
you need explicit Consent if the underlying iframe sets cookies. some embeds have a noCookie param or domain in which case you don't. Telegram and Twitter both set cookies so you need consent here.
All external data connections need to be documented in a privacy policy. Anything making a connection to a service not owned by Bellingcat would need to be documented here. This includes stuff like Google Fonts (yes, really). This also includes 3rd iframe embeds that do not set cookies as they might still log a user's IP.
The use of the injected Google TagManager script w/o consent is a direct violation of GDPR as well.

We need to have a standard consent overlay when 1st visiting the platform. This overlay should not appear when ?cover=false.

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.