<commit_before>import React from 'react';

export const SET_COMMUNITY_DATA = 'SET_COMMUNITY_DATA';
export const SET_USERS_ACTIVITY_DATA = 'SET_USERS_ACTIVITY_DATA';
export const SET_EVENTS_LIST = 'SET_EVENTS_LIST';
export const SET_GEOMS = 'SET_GEOMS';
export const SET_COUNTRIES_LIST = 'SET_COUNTRIES_LIST';
export const SET_SELECTED_COUNTRY = 'SET_SELECTED_COUNTRY';

export function setCommunityData() {
  const tag = $('#parallax').length > 0 && $('#parallax').data('hashtag') !== undefined ? $('#parallax').data('hashtag') : 'logging-roads';
  const url = 'http://osmstats.redcross.org/hashtags/'+tag;

  return function(dispatch) {
    $.get(url).then(function(communityData){
      dispatch({
        type: SET_COMMUNITY_DATA,
        communityData
      });
    })
  };
}

export function setUsersActivityData(data) {
  const tag = $('#parallax').length > 0 && $('#parallax').data('hashtag') !== undefined ? $('#parallax').data('hashtag') : 'logging-roads';
  const url = 'http://osmstats.redcross.org/hashtags/'+tag;

  return function(dispatch) {<commit_msg>switch stats to use https proxy<commit_after>import React from 'react';

export const SET_COMMUNITY_DATA = 'SET_COMMUNITY_DATA';
export const SET_USERS_ACTIVITY_DATA = 'SET_USERS_ACTIVITY_DATA';
export const SET_EVENTS_LIST = 'SET_EVENTS_LIST';
export const SET_GEOMS = 'SET_GEOMS';
export const SET_COUNTRIES_LIST = 'SET_COUNTRIES_LIST';
export const SET_SELECTED_COUNTRY = 'SET_SELECTED_COUNTRY';

export function setCommunityData() {
  const tag = $('#parallax').length > 0 && $('#parallax').data('hashtag') !== undefined ? $('#parallax').data('hashtag') : 'logging-roads';
  const url = 'https://loggingroads.org/hashtags/'+tag;

  return function(dispatch) {
    $.get(url).then(function(communityData){
      dispatch({
        type: SET_COMMUNITY_DATA,
        communityData
      });
    })
  };
}

export function setUsersActivityData(data) {
  const tag = $('#parallax').length > 0 && $('#parallax').data('hashtag') !== undefined ? $('#parallax').data('hashtag') : 'logging-roads';
  const url = 'https://loggingroads.org/hashtags/'+tag;

  return function(dispatch) {
{'fraction_non_alphanumeric': 0.15843429636533085, 'fraction_numerical': 0.001863932898415657, 'mean_word_length': 5.277777777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5382288', 'n_tokens_mistral': 738, 'n_tokens_neox': 719, 'n_words': 135}