ArticleController :: show
Request
GET Parameters
None
POST Parameters
None
Uploaded Files
None
Request Attributes
Key | Value |
---|---|
_controller | "App\Controller\ArticleController::show" |
_firewall_context | "security.firewall.map.context.main" |
_links | Symfony\Component\WebLink\GenericLinkProvider {#3662 -links: [ 3783 => Symfony\Component\WebLink\Link {#3783 -href: "/build/runtime.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3781 => Symfony\Component\WebLink\Link {#3781 -href: "/build/644.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3780 => Symfony\Component\WebLink\Link {#3780 -href: "/build/502.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3779 => Symfony\Component\WebLink\Link {#3779 -href: "/build/app.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3778 => Symfony\Component\WebLink\Link {#3778 -href: "/build/view-more.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3777 => Symfony\Component\WebLink\Link {#3777 -href: "/build/term-condition.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3776 => Symfony\Component\WebLink\Link {#3776 -href: "/build/contact.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3775 => Symfony\Component\WebLink\Link {#3775 -href: "/build/scroll-infinite-article.js" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "script" ] } 3774 => Symfony\Component\WebLink\Link {#3774 -href: "/build/app.css" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "style" ] } 3773 => Symfony\Component\WebLink\Link {#3773 -href: "/build/cookie-style.css" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "style" ] } 3772 => Symfony\Component\WebLink\Link {#3772 -href: "/build/term-condition-css.css" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "style" ] } 3771 => Symfony\Component\WebLink\Link {#3771 -href: "/build/contact-css.css" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "style" ] } 3770 => Symfony\Component\WebLink\Link {#3770 -href: "/build/comment-css.css" -rel: [ "preload" => "preload" ] -attributes: [ "as" => "style" ] } ] } |
_route | "article_show" |
_route_params | [ "category" => "technology" "slug" => "scraping-data-from-wikipedia-tables" ] |
_security_firewall_run | "_security_main" |
_stopwatch_token | "ffd213" |
category | "technology" |
slug | "scraping-data-from-wikipedia-tables" |
Request Headers
Header | Value |
---|---|
accept | "*/*" |
accept-encoding | "gzip, br, zstd, deflate" |
connection | "close" |
cookie | "PHPSESSID=adar9e9fhj8orcbgkuao036gqs" |
host | "rct.dev.bbntimes.com" |
user-agent | "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)" |
x-php-ob-level | "1" |
Request Content
Request content not available (it was retrieved as a resource).
Response
Response Headers
Header | Value |
---|---|
cache-control | "no-cache, private" |
content-type | "text/html; charset=UTF-8" |
date | "Sat, 22 Feb 2025 09:01:40 GMT" |
link | "</build/runtime.js>; rel="preload"; as="script",</build/644.js>; rel="preload"; as="script",</build/502.js>; rel="preload"; as="script",</build/app.js>; rel="preload"; as="script",</build/view-more.js>; rel="preload"; as="script",</build/term-condition.js>; rel="preload"; as="script",</build/contact.js>; rel="preload"; as="script",</build/scroll-infinite-article.js>; rel="preload"; as="script",</build/app.css>; rel="preload"; as="style",</build/cookie-style.css>; rel="preload"; as="style",</build/term-condition-css.css>; rel="preload"; as="style",</build/contact-css.css>; rel="preload"; as="style",</build/comment-css.css>; rel="preload"; as="style"" |
x-debug-token | "95562f" |
Cookies
Request Cookies
Key | Value |
---|---|
PHPSESSID | "adar9e9fhj8orcbgkuao036gqs" |
Response Cookies
No response cookies
Session 6
Session Metadata
Key | Value |
---|---|
Created | "Sat, 22 Feb 25 09:01:23 +0000" |
Last used | "Sat, 22 Feb 25 09:01:38 +0000" |
Lifetime | 0 |
Session Attributes
Attribute | Value |
---|---|
_csrf/https-comment | "Et0eKM0km--o4ofprZ4eAk4DThbxpgDCs8mNvYM2X8o" |
_csrf/https-cookie_accept | "MGzRMIxxArJwRn5SH3Z5rcu3e4Twqwz4Y_26DGCMj14" |
Session Usage
6
Usages
Stateless check enabled
Usage |
---|
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:76
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php" "line" => 76 "function" => "start" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/CsrfTokenManager.php" "line" => 69 "function" => "hasToken" "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php" "line" => 82 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 134 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 128 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Form.php" "line" => 908 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/ArticleController.php" "line" => 220 "function" => "createView" "class" => "Symfony\Component\Form\Form" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "show" "class" => "App\Controller\ArticleController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:79
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php" "line" => 79 "function" => "has" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/CsrfTokenManager.php" "line" => 69 "function" => "hasToken" "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php" "line" => 82 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 134 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 128 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Form.php" "line" => 908 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/ArticleController.php" "line" => 220 "function" => "createView" "class" => "Symfony\Component\Form\Form" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "show" "class" => "App\Controller\ArticleController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:52
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php" "line" => 52 "function" => "has" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/CsrfTokenManager.php" "line" => 70 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php" "line" => 82 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 134 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 128 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Form.php" "line" => 908 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/ArticleController.php" "line" => 220 "function" => "createView" "class" => "Symfony\Component\Form\Form" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "show" "class" => "App\Controller\ArticleController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage:56
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php" "line" => 56 "function" => "get" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-csrf/CsrfTokenManager.php" "line" => 70 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php" "line" => 82 "function" => "getToken" "class" => "Symfony\Component\Security\Csrf\CsrfTokenManager" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 134 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/ResolvedFormType.php" "line" => 128 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php" "line" => 95 "function" => "finishView" "class" => "Symfony\Component\Form\ResolvedFormType" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/form/Form.php" "line" => 908 "function" => "finishView" "class" => "Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/ArticleController.php" "line" => 220 "function" => "createView" "class" => "Symfony\Component\Form\Form" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "show" "class" => "App\Controller\ArticleController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage:41
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php" "line" => 41 "function" => "getMetadataBag" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/twig-bridge/AppVariable.php" "line" => 103 "function" => "getToken" "class" => "Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Extension/CoreExtension.php" "line" => 1635 "function" => "getUser" "class" => "Symfony\Bridge\Twig\AppVariable" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/var/cache/dev/twig/a4/a456f2f504a18cd81037fa69e543310c.php" "line" => 200 "function" => "twig_get_attribute" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 394 "function" => "doDisplay" "class" => "__TwigTemplate_824a013e4f3f4a68e03a2d244e765025" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 367 "function" => "displayWithErrorHandling" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 379 "function" => "display" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/TemplateWrapper.php" "line" => 38 "function" => "render" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Environment.php" "line" => 280 "function" => "render" "class" => "Twig\TemplateWrapper" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 448 "function" => "render" "class" => "Twig\Environment" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 453 "function" => "doRenderView" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 253 "function" => "doRender" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/AppController.php" "line" => 126 "function" => "render" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "renderHeader" "class" => "App\Controller\AppController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php" "line" => 86 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php" "line" => 78 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpCache\SubRequestHandler" "type" => "::" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Fragment/FragmentHandler.php" "line" => 83 "function" => "render" "class" => "Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php" "line" => 47 "function" => "render" "class" => "Symfony\Component\HttpKernel\Fragment\FragmentHandler" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/twig-bridge/Extension/HttpKernelRuntime.php" "line" => 44 "function" => "render" "class" => "Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/var/cache/dev/twig/b9/b9cb140abab7ef4ef8cb398831c75ac0.php" "line" => 207 "function" => "renderFragment" "class" => "Symfony\Bridge\Twig\Extension\HttpKernelRuntime" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 171 "function" => "block_header" "class" => "__TwigTemplate_dc67cdc305f050f0a27ba7ef152f05af" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/var/cache/dev/twig/b9/b9cb140abab7ef4ef8cb398831c75ac0.php" "line" => 91 "function" => "displayBlock" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 394 "function" => "doDisplay" "class" => "__TwigTemplate_dc67cdc305f050f0a27ba7ef152f05af" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 367 "function" => "displayWithErrorHandling" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/var/cache/dev/twig/c3/c336f4e76fc20e4db84e3be131276b68.php" "line" => 52 "function" => "display" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 394 "function" => "doDisplay" "class" => "__TwigTemplate_3ce0324a396de697d1fad9fabd68df72" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 367 "function" => "displayWithErrorHandling" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Template.php" "line" => 379 "function" => "display" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/TemplateWrapper.php" "line" => 38 "function" => "render" "class" => "Twig\Template" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/twig/twig/src/Environment.php" "line" => 280 "function" => "render" "class" => "Twig\TemplateWrapper" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 448 "function" => "render" "class" => "Twig\Environment" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 453 "function" => "doRenderView" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/framework-bundle/Controller/AbstractController.php" "line" => 253 "function" => "doRender" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/src/Controller/ArticleController.php" "line" => 277 "function" => "render" "class" => "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 181 "function" => "show" "class" => "App\Controller\ArticleController" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Symfony\Component\Security\Http\Firewall\ContextListener:171
[ [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/security-http/Firewall/ContextListener.php" "line" => 171 "function" => "remove" "class" => "Symfony\Component\HttpFoundation\Session\Session" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/event-dispatcher/Debug/WrappedListener.php" "line" => 116 "function" => "onKernelResponse" "class" => "Symfony\Component\Security\Http\Firewall\ContextListener" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/event-dispatcher/EventDispatcher.php" "line" => 220 "function" => "__invoke" "class" => "Symfony\Component\EventDispatcher\Debug\WrappedListener" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/event-dispatcher/EventDispatcher.php" "line" => 56 "function" => "callListeners" "class" => "Symfony\Component\EventDispatcher\EventDispatcher" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php" "line" => 139 "function" => "dispatch" "class" => "Symfony\Component\EventDispatcher\EventDispatcher" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 214 "function" => "dispatch" "class" => "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 202 "function" => "filterResponse" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/HttpKernel.php" "line" => 76 "function" => "handleRaw" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/http-kernel/Kernel.php" "line" => 197 "function" => "handle" "class" => "Symfony\Component\HttpKernel\HttpKernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php" "line" => 35 "function" => "handle" "class" => "Symfony\Component\HttpKernel\Kernel" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" "line" => 29 "function" => "run" "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner" "type" => "->" ] [ "file" => "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" "line" => 5 "args" => [ "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/vendor/autoload_runtime.php" ] "function" => "require_once" ] ] |
Flashes
Flashes
No flash messages were created.
Server Parameters
Server Parameters
Defined in .env
Key | Value |
---|---|
APP_ENV | "dev" |
APP_SECRET | "0a988e63f011514eaabfc650b599af4d" |
CORS_ALLOW_ORIGIN | "*" |
DATABASE_URL | "mysql://bbndb_rctuser:33F5W25z40or0f7@localhost:3306/rct_bbntimes" |
GOOGLE_RECAPTCHA_SECRET_KEY | "6LdV5fgpAAAAANxzTG8ZMfIjil1wu-1vrQvnUt-x" |
GOOGLE_RECAPTCHA_SITE_KEY | "6LdV5fgpAAAAAENKcn73MJAhQrbtQeqgyC4wDLMP" |
MAILER_DSN | "smtp://no-reply%40rct.dev.bbntimes.com:Bl6%26gLD48%26Of919@rct.dev.bbntimes.com:465" |
MARIADB_PASSWORD | "i!87pK&!85ezc8" |
Defined as regular env variables
Key | Value |
---|---|
APP_DEBUG | "1" |
BASE | "/public" |
CONTEXT_DOCUMENT_ROOT | "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com" |
CONTEXT_PREFIX | "" |
DOCUMENT_ROOT | "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com" |
FCGI_ROLE | "RESPONDER" |
GATEWAY_INTERFACE | "CGI/1.1" |
HTTPS | "on" |
HTTP_ACCEPT | "*/*" |
HTTP_ACCEPT_ENCODING | "gzip, br, zstd, deflate" |
HTTP_CONNECTION | "close" |
HTTP_COOKIE | "PHPSESSID=adar9e9fhj8orcbgkuao036gqs" |
HTTP_HOST | "rct.dev.bbntimes.com" |
HTTP_USER_AGENT | "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)" |
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | "0" |
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | "0" |
PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" |
PHP_SELF | "/public/index.php" |
PP_CUSTOM_PHP_CGI_INDEX | "plesk-php81-fastcgi" |
PP_CUSTOM_PHP_INI | "/var/www/vhosts/system/rct.dev.bbntimes.com/etc/php.ini" |
QUERY_STRING | "" |
REDIRECT_BASE | "/public" |
REDIRECT_HTTPS | "on" |
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | "0" |
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | "0" |
REDIRECT_REDIRECT_HTTPS | "on" |
REDIRECT_REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | "0" |
REDIRECT_REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | "0" |
REDIRECT_REDIRECT_SCRIPT_URI | "https://rct.dev.bbntimes.com/technology/scraping-data-from-wikipedia-tables" |
REDIRECT_REDIRECT_SCRIPT_URL | "/technology/scraping-data-from-wikipedia-tables" |
REDIRECT_REDIRECT_SSL_TLS_SNI | "rct.dev.bbntimes.com" |
REDIRECT_REDIRECT_STATUS | "200" |
REDIRECT_REDIRECT_UNIQUE_ID | "Z7mSc7iBoyj8JZ8-HGx27AAAAA4" |
REDIRECT_SCRIPT_URI | "https://rct.dev.bbntimes.com/technology/scraping-data-from-wikipedia-tables" |
REDIRECT_SCRIPT_URL | "/technology/scraping-data-from-wikipedia-tables" |
REDIRECT_SSL_TLS_SNI | "rct.dev.bbntimes.com" |
REDIRECT_STATUS | "200" |
REDIRECT_UNIQUE_ID | "Z7mSc7iBoyj8JZ8-HGx27AAAAA4" |
REDIRECT_URL | "/public/technology/scraping-data-from-wikipedia-tables" |
REMOTE_ADDR | "18.118.255.51" |
REMOTE_PORT | "29809" |
REQUEST_METHOD | "GET" |
REQUEST_SCHEME | "https" |
REQUEST_TIME | 1740214899 |
REQUEST_TIME_FLOAT | 1740214899.762 |
REQUEST_URI | "/technology/scraping-data-from-wikipedia-tables" |
SCRIPT_FILENAME | "/var/www/vhosts/dev.bbntimes.com/rct.dev.bbntimes.com/public/index.php" |
SCRIPT_NAME | "/public/index.php" |
SCRIPT_URI | "https://rct.dev.bbntimes.com/technology/scraping-data-from-wikipedia-tables" |
SCRIPT_URL | "/technology/scraping-data-from-wikipedia-tables" |
SERVER_ADDR | "5.196.1.209" |
SERVER_ADMIN | "[no address given]" |
SERVER_NAME | "rct.dev.bbntimes.com" |
SERVER_PORT | "443" |
SERVER_PROTOCOL | "HTTP/1.1" |
SERVER_SIGNATURE | "<address>Apache Server at rct.dev.bbntimes.com Port 443</address>\n" |
SERVER_SOFTWARE | "Apache" |
SSL_TLS_SNI | "rct.dev.bbntimes.com" |
SYMFONY_DOTENV_VARS | "APP_ENV,APP_SECRET,DATABASE_URL,MARIADB_PASSWORD,CORS_ALLOW_ORIGIN,MAILER_DSN,GOOGLE_RECAPTCHA_SECRET_KEY,GOOGLE_RECAPTCHA_SITE_KEY" |
UNIQUE_ID | "Z7mSc7iBoyj8JZ8-HGx27AAAAA4" |
Sub Requests 5
CookieController :: renderAnalysis (token = ec0b7c)
Key | Value |
---|---|
_controller | "App\Controller\CookieController::renderAnalysis" |
_format | "html" |
_locale | "en" |
_stopwatch_token | "680c24" |
ArticleController :: trendingArticle (token = 151f1d)
Key | Value |
---|---|
_controller | "App\Controller\ArticleController::trendingArticle" |
_format | "html" |
_locale | "en" |
_stopwatch_token | "c14547" |
category | "Technology" |
ArticleController :: relatedArticles (token = 7a994f)
Key | Value |
---|---|
_controller | "App\Controller\ArticleController::relatedArticles" |
_format | "html" |
_locale | "en" |
_stopwatch_token | "cf207b" |
current_article | App\Entity\Article {#1094 -id: 8512 -title: "Scraping Data from Wikipedia Tables" -slug: "scraping-data-from-wikipedia-tables" -introtext: "<p id="6280" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;">A few weeks ago, I wrote an <span style="color: #808080;"><a class="ds je" style="color: #808080;" href="science/data-storytelling-with-population-visualizations">article</a></span> using historical population data from numerous US cities. </span></p>\r\n" -content: """ \r\n <p id="6280" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;">While much of this data came from directly from the US Census, I also scraped population data from Wikipedia tables which compile all available data for each city in one place. While it’s worth verifying the original sources of data found through Wikipedia, this online encyclopedia contains a wealth of information that is often worth scraping.</span></p>\r\n <p id="0302" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;">In this article I will share<span id="rmm"><span id="rmm"><span id="rmm"><span id="rmm"><span id="rmm"><span id="rmm"></span></span></span></span></span></span>the code I used to scrape one Wikipedia table containing historical population data for Houston, Texas. This code can easily be adapted to scrape tables from other Wikipedia pages or other webpages entirely. The approach I will walk through is based off of material taught in one of my graduate school Data Science courses. </span></p>\r\n <p id="bfeb" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;">First, let’s take a look at the table that we’ll be scraping (outlined in red):</span></p>\r\n <p><span style="color: #000000;"><img src="/images/Demographics.png" alt="Demographics.png" width="603" height="342" /></span></p>\r\n <p id="60db" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;"><br />It’s a simple enough table, although we can already see that there may be some formatting to clean up when we bring this data into R.</span></p>\r\n <p id="8b73" class="jf jg fy jh b gw ji jj jk gz jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka dm gu" data-selectable-paragraph><span style="color: #000000;">Once you’ve had a chance to look at the webpage, let’s get to the code. First, load the “tidyverse” and “rvest” packages. We’ll use the tidyverse to manipulate and clean the data that we scrape, as well as the rvest package to do the actual scraping:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Library_tidyverse.png" alt="Library_tidyverse.png" width="603" height="65" /></span></p>\r\n <p><span style="color: #000000;"><br />Next, we need to give R the url for the webpage that we’re interested in:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/URL_Wikipedia.png" alt="URL_Wikipedia.png" width="601" height="46" /></span></p>\r\n <p><span style="color: #000000;"><br />We then use the read_html() function to translate this webpage to information that R can use, followed by the html_nodes() function to focus exclusively on the table objects contained within the webpage:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Houston_HML.png" alt="Houston_HML.png" width="599" height="101" /></span></p>\r\n <p><span style="color: #000000;"><br />It looks like the Houston Wikipedia page contains 19 tables, although some of these class descriptions are more informative than others:</span></p>\r\n <p><span style="color: #000000;"><img src="/images/XM_Nodset.png" alt="XM_Nodset.png" width="599" height="206" /></span></p>\r\n <p><span style="color: #000000;"><br />Next, we pull out our table of interest from these available tables. The nth() function specifies that we want the 4th table from the above list. Determining the right table to specify here may take some trial and error when there are multiple tables on a webpage. You can do your best to guess the correct number by looking at the webpage, as well as just viewing different tables until you see what you’re looking for:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Pop_Table.png" alt="Pop_Table.png" width="603" height="111" /></span></p>\r\n <p><span style="color: #000000;"><br />We get the following output, and the Wikipedia table is now in R! As often happens with web scraping, however, this table isn’t really usable yet. All four columns have the same name, the first and last rows don’t contain data, and there is an extra column in the middle of our data frame:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Historial_Population.png" alt="Historial_Population.png" width="600" height="303" /></span></p>\r\n <p><span style="color: #000000;"><br />Let’s do some quick clean-up with this table to make it more usable. We can’t do much of anything before our columns have unique names, and we also need to restrict this table to its 2nd-19th rows:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/colnamespoptable.png" alt="colnamespoptable.png" width="601" height="101" /></span></p>\r\n <p><span style="color: #000000;"><br />We’re not quite there yet, but the output is looking much better:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Year_Table.png" alt="Year_Table.png" width="600" height="744" /></span></p>\r\n <p><span style="color: #000000;"><br />Let’s do some final cleaning. First, we’ll get rid of the blank column. All columns are also currently stored as character variables, whereas year should be a date and population and percent_change should be numeric. We remove unnecessary strings from the percent_change and population columns, then convert all columns to their appropriate formats:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/Poptable.png" alt="Poptable.png" width="600" height="206" /></span></p>\r\n <p><span style="color: #000000;"><br />It’s as simple as that. Everything in the table now looks as we would expect it to:<br /><br /></span></p>\r\n <p><span style="color: #000000;"><img src="/images/New_Stat_Table.png" alt="New_Stat_Table.png" /></span></p>\r\n <p><span style="color: #000000;"><br />The population data is now fully usable and ready to be analyzed. Web scraping is a great tool for accessing a wide range of data sources, and is far preferable to manually copying values contained within online tables given its reproducibility and reduced likelihood for human error. The code contained in this article can additionally be built upon to scrape numerous tables at once, allowing for even greater efficiency and access to even more data.</span></p> """ -user: Proxies\__CG__\App\Entity\User {#1092 …} -createdAt: DateTime @1620238685 {#1145 : 2021-05-05 18:18:05.0 UTC (+00:00) } -updatedAt: DateTime @1620238797 {#1150 : 2021-05-05 18:19:57.0 UTC (+00:00) } -deletedAt: null -category: App\Entity\Category {#445 …} -status: "published" -imageCard: Proxies\__CG__\App\Entity\File {#1184 …} -ImageHeader: Proxies\__CG__\App\Entity\File {#1184 …} -featured: false -mainView: false -clicks: 2313 -comments: Doctrine\ORM\PersistentCollection {#1125 …} -reviewed_at: DateTime @1620238685 {#1148 : 2021-05-05 18:18:05.0 UTC (+00:00) } -metakey: "Scraping Data from Wikipedia Tables" -metadesc: "Unlock a valuable data source with just a few lines of code" -robots: null -publishedAt: DateTime @1620238685 {#1147 : 2021-05-05 18:18:05.0 UTC (+00:00) } -canonical: null -superTag: null } |
AppController :: renderFooter (token = dc39b6)
Key | Value |
---|---|
_controller | "App\Controller\AppController::renderFooter" |
_format | "html" |
_locale | "en" |
_stopwatch_token | "78dc9e" |
CookieController :: renderCookie (token = 5a6cfe)
Key | Value |
---|---|
_controller | "App\Controller\CookieController::renderCookie" |
_format | "html" |
_locale | "en" |
_stopwatch_token | "292347" |